xgboostClassification: xgboost classification

xgboostClassificationR Documentation

xgboost classification

Description

Classification using the xgboost algorithm.

Usage

xgboostClassification(
  object,
  assessRes,
  scores = c("prediction", "all", "none"),
  max_depth,
  gamma,
  nrounds = 1000,
  fcol = "markers",
  ...
)

Arguments

object

An instance of class "MSnSet".

assessRes

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

scores

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

max_depth

If assessRes is missing, a max_depth must be provided.

gamma

If assessRes is missing, a gamma must be provided.

fcol

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

...

Additional parameters passed to xgb.train from package xgboost.

Value

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

Examples

library(pRolocExtra)
data(tan2009r1)
# reducing iterations
params <- xgboostOptimisation(tan2009r1, times = 3)
params
plot(params)
f1Count(params)
levelPlot(params)
getParams(params)
res <- xgboostClassification(tan2009r1, params)
getPredictions(res, fcol = "xgboost")
getPredictions(res, fcol = "xgboost", t = 0.75)
plot2D(res, fcol = "xgboost")

mgerault/pRolocExtra documentation built on Sept. 15, 2022, 9:26 a.m.