Classification using the partial least square distcriminant analysis algorithm.
plsdaClassification(
object,
assessRes,
scores = c("prediction", "all", "none"),
ncomp,
fcol = "markers",
...
)
An instance of class "MSnSet"
.
An instance of class
"GenRegRes"
, as generated by
plsdaOptimisation
.
One of "prediction"
, "all"
or
"none"
to report the score for the predicted class
only, for all classes or none.
If assessRes
is missing, a ncomp
must
be provided.
The feature meta-data containing marker definitions.
Default is markers
.
Additional parameters passed to plsda
from package caret
.
An instance of class "MSnSet"
with
plsda
and plsda.scores
feature variables storing
the classification results and scores respectively.
# \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: 0x561e88e96250>
#> <environment: 0x561e88e90a68>
#> 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 in eval(expr, envir, enclos): object 'res' not found
# }