rfClassification: rf classification

View source: R/machinelearning-functions-rf.R

rfClassificationR Documentation

rf classification

Description

Classification using the random forest algorithm.

Usage

rfClassification(
  object,
  assessRes,
  scores = c("prediction", "all", "none"),
  mtry,
  fcol = "markers",
  ...
)

Arguments

object

An instance of class "MSnSet".

assessRes

An instance of class "GenRegRes", as generated by rfOptimisation.

scores

One of "prediction", "all" or "none" to report the score for the predicted class only, for all classes or none.

mtry

If assessRes is missing, a mtry must be provided.

fcol

The feature meta-data containing marker definitions. Default is markers.

...

Additional parameters passed to randomForest from package randomForest.

Value

An instance of class "MSnSet" with rf and rf.scores feature variables storing the classification results and scores respectively.

Author(s)

Laurent Gatto

Examples

library(pRolocdata)
data(dunkley2006)
## reducing parameter search space and iterations 
params <- rfOptimisation(dunkley2006, mtry = c(2, 5, 10),  times = 3)
params
plot(params)
f1Count(params)
levelPlot(params)
getParams(params)
res <- rfClassification(dunkley2006, params)
getPredictions(res, fcol = "rf")
getPredictions(res, fcol = "rf", t = 0.75)
plot2D(res, fcol = "rf")

lgatto/pRoloc documentation built on Oct. 23, 2024, 12:51 a.m.