ksvmClassification {pRoloc} | R Documentation

## ksvm classification

### Description

Classification using the support vector machine algorithm.

### Usage

    ksvmClassification(object, assessRes, scores = c("prediction", "all",
      "none"), cost, fcol = "markers", ...)

### Arguments

`object` | An instance of class `"MSnSet"`.
`assessRes` | An instance of class `"GenRegRes"`, as generated by `ksvmOptimisation`.
`scores` | One of `"prediction"`, `"all"` or `"none"` to report the score for the predicted class only, for all classes or none.
`cost` | If `assessRes` is missing, a `cost` must be provided.
`fcol` | The feature meta-data containing marker definitions. Default is `markers`.
`...` | Additional parameters passed to `ksvm` from package `kernlab`.

### Value

An instance of class `"MSnSet"` with `ksvm` and `ksvm.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 <- ksvmOptimisation(dunkley2006, cost = 2^seq(-1,4,5), times = 3)
    params
    plot(params)
    f1Count(params)
    levelPlot(params)
    getParams(params)
    res <- ksvmClassification(dunkley2006, params)
    getPredictions(res, fcol = "ksvm")
    getPredictions(res, fcol = "ksvm", t = 0.75)
    plot2D(res, fcol = "ksvm")

[Package pRoloc version 1.26.0 Index]