Classification using the partial least square distcriminant analysis algorithm.
Usage
plsdaClassification(
object,
assessRes,
scores = c("prediction", "all", "none"),
ncomp,
fcol = "markers",
...
)
Arguments
- object
An instance of class
"MSnSet"
.- assessRes
An instance of class
"GenRegRes"
, as generated byplsdaOptimisation
.- scores
One of
"prediction"
,"all"
or"none"
to report the score for the predicted class only, for all classes or none.- ncomp
If
assessRes
is missing, ancomp
must be provided.- fcol
The feature meta-data containing marker definitions. Default is
markers
.- ...
Additional parameters passed to
plsda
from packagecaret
.
Value
An instance of class "MSnSet"
with
plsda
and plsda.scores
feature variables storing
the classification results and scores respectively.
Examples
# \donttest{
## not running this one for time considerations
library(pRolocdata)
data(dunkley2006)
## reducing parameter search space and iterations
params <- plsdaOptimisation(dunkley2006, ncomp = c(3, 10), times = 2)
#>
|
| | 0%
#> Error: package klaR is required
params
#> new("standardGeneric", .Data = function (x, ...)
#> standardGeneric("params"), generic = "params", package = "S4Vectors",
#> group = list(), valueClass = character(0), signature = "x",
#> default = NULL, skeleton = (function (x, ...)
#> stop(gettextf("invalid call in method dispatch to '%s' (no default method)",
#> "params"), domain = NA))(x, ...))
#> <bytecode: 0x563405122ff8>
#> <environment: 0x5634051bfa10>
#> attr(,"generic")
#> [1] "params"
#> attr(,"generic")attr(,"package")
#> [1] "S4Vectors"
#> attr(,"package")
#> [1] "S4Vectors"
#> attr(,"group")
#> list()
#> attr(,"valueClass")
#> character(0)
#> attr(,"signature")
#> [1] "x"
#> attr(,"default")
#> `\001NULL\001`
#> attr(,"skeleton")
#> (function (x, ...)
#> stop(gettextf("invalid call in method dispatch to '%s' (no default method)",
#> "params"), domain = NA))(x, ...)
#> attr(,"class")
#> [1] "standardGeneric"
#> attr(,"class")attr(,"package")
#> [1] "methods"
plot(params)
#> Error: unable to find an inherited method for function ‘params’ for signature ‘x = "numeric"’
f1Count(params)
#> Error: unable to find an inherited method for function ‘f1Count’ for signature ‘object = "standardGeneric"’
levelPlot(params)
#> Error: unable to find an inherited method for function ‘levelPlot’ for signature ‘object = "standardGeneric"’
getParams(params)
#> Error: unable to find an inherited method for function ‘getParams’ for signature ‘object = "standardGeneric"’
res <- plsdaClassification(dunkley2006, params)
#> Error: unable to find an inherited method for function ‘getParams’ for signature ‘object = "standardGeneric"’
getPredictions(res, fcol = "plsda")
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'res' not found
getPredictions(res, fcol = "plsda", t = 0.9)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'fData': object 'res' not found
plot2D(res, fcol = "plsda")
#> Error: object 'res' not found
# }