plot.gspcrcv | R Documentation |
Produces a scatter plot showing the CV score obtained by cv_gspcr
(Y-axis) with different threshold values (X-axis) for a different number of components (lines).
## S3 method for class 'gspcrcv'
plot(
x,
y = NULL,
labels = TRUE,
errorBars = FALSE,
discretize = TRUE,
y_reverse = FALSE,
print = TRUE,
...
)
x |
An object of class |
y |
The CV fit measure to report on the Y axis. Default is the fit measure specified in |
labels |
Logical value. |
errorBars |
Logical value. |
discretize |
Logical value. |
y_reverse |
Logical value. |
print |
Logical value. TRUE prints the plot when the function is called. The default is |
... |
Other arguments passed on to methods. Not currently used. |
The bounds defining the error bars are computed by cv_gspcr()
. First, the K-fold cross-validation score of the statistic of interest (e.g., the F score, the MSE) is computed. Then, the standard deviation of the statistic across the K folds is computed. Finally, the bounds used for the error bars are computed by summing and subtracting this standard deviation to and from the K-fold cross-validation score of the statistic.
Reversing the y-axis with y_reverse
can be helpful to compare results obtained by different fit measures.
A scatter plot of ggplot
class
Edoardo Costantini, 2023
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.