plot.gspcrcv {gspcr} | R Documentation |
Plot the cross-validation solution path for the GSPCR algorithm
Description
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).
Usage
## S3 method for class 'gspcrcv'
plot(
x,
y = NULL,
labels = TRUE,
errorBars = FALSE,
discretize = TRUE,
y_reverse = FALSE,
print = TRUE,
...
)
Arguments
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. |
Details
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.
Value
A scatter plot of ggplot
class
Author(s)
Edoardo Costantini, 2023