getPredictions | R Documentation |
Convenience accessor to the predicted feature localisation in an 'MSnSet'.
This function returns the predictions of an
MSnSet
instance. As a side effect, it prints out a prediction table.
getPredictions(object, fcol, scol, mcol = "markers", t = 0, verbose = TRUE)
object |
An instance of class |
fcol |
The name of the prediction column in the
|
scol |
The name of the prediction score column in the
|
mcol |
The feature meta data column containing the labelled training data. |
t |
The score threshold. Predictions with score < t are set
to 'unknown'. Default is 0. It is also possible to define
thresholds for each prediction class, in which case, |
verbose |
If |
An instance of class "MSnSet" with fcol.pred
feature
variable storing the prediction results according to the chosen threshold.
Laurent Gatto and Lisa Breckels
orgQuants
for calculating organelle-specific
thresholds.
library("pRolocdata")
data(dunkley2006)
res <- svmClassification(dunkley2006, fcol = "pd.markers",
sigma = 0.1, cost = 0.5)
fData(res)$svm[500:510]
fData(res)$svm.scores[500:510]
getPredictions(res, fcol = "svm", t = 0) ## all predictions
getPredictions(res, fcol = "svm", t = .9) ## single threshold
## 50% top predictions per class
ts <- orgQuants(res, fcol = "svm", t = .5)
getPredictions(res, fcol = "svm", t = ts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.