m8_model class Model object returned by pca(), pls(), and opls().
Source: R/00-s4_classes.R, R/03-s4_methods.R
m8_model-class.RdUsage
# S4 method for class 'm8_model'
summary(object)
# S4 method for class 'm8_model'
show(object)Functions
summary(m8_model): Summarise model performance and component selection.show(m8_model): Show a compact model header.
Slots
engineCharacter. Model engine ("pca", "pls", "opls").
ctrlList. Engine-specific control and performance information.
fitList. Fitted data (engine specific).
cvResampling instance (may be NULL if not used).
prepScaling and centering information
provenancePreprocessing attributes of spectral matrix X
sessionR-session information
callFunction call
dimsList with
nandp.
Examples
data(covid)
cv <- balanced_mc(k=5, split=2/3)
scaling <- uv_scaling(center=TRUE)
model <-opls(X=covid$X, Y=covid$an$type, scaling, cv)
#> Performing discriminant analysis.
#> An O-PLS-DA model with 1 predictive and 1 orthogonal components was fitted.
class(model)
#> [1] "m8_model"
#> attr(,"package")
#> [1] "metabom8"
show(model)
#>
#> m8_model <opls>
#> ----------------------------------------
#> Dimensions : 10 samples x 27819 variables
#> Mode : classification
#> Preprocess : center | UV
#> Components : 2 (3 tested)
#> Validation : BalancedMonteCarlo (k = 5)
#> Stop rule : cv_improvement_negligible
#> ----------------------------------------
#> Use summary() for performance metrics.
#>