fit.only.model {OmicsMarkeR} | R Documentation |
Applies models to high-dimensional data for classification.
fit.only.model(X, Y, method, p = 0.9, optimize = TRUE, tuning.grid = NULL, k.folds = if (optimize) 10 else NULL, repeats = if (optimize) 3 else NULL, resolution = if (optimize) 3 else NULL, metric = "Accuracy", allowParallel = FALSE, verbose = "none", ...)
X |
A scaled matrix or dataframe containing numeric values of each feature |
Y |
A factor vector containing group membership of samples |
method |
A vector listing models to be fit.
Available options are |
p |
Percent of data to by 'trained' |
optimize |
Logical argument determining if each model should be
optimized. Default |
tuning.grid |
Optional list of grids containing parameters to optimize
for each algorithm. Default |
k.folds |
Number of folds generated during cross-validation.
Default |
repeats |
Number of times cross-validation repeated.
Default |
resolution |
Resolution of model optimization grid.
Default |
metric |
Criteria for model optimization.
Available options are |
allowParallel |
Logical argument dictating if parallel processing
is allowed via foreach package.
Default |
verbose |
Logical argument if should output progress |
... |
Extra arguments that the user would like to apply to the models |
Methods |
Vector of models fit to data |
performance |
Performance metrics of each model and bootstrap iteration |
specs |
List with the following elements: |
total.samples: Number of samples in original dataset
number.features: Number of features in orginal dataset
number.groups: Number of groups
group.levels: The specific levels of the groups
number.observations.group: Number of observations in each group
Charles Determan Jr
dat.discr <- create.discr.matrix( create.corr.matrix( create.random.matrix(nvar = 50, nsamp = 100, st.dev = 1, perturb = 0.2)), D = 10 ) vars <- dat.discr$discr.mat groups <- dat.discr$classes fit <- fit.only.model(X=vars, Y=groups, method="plsda", p = 0.9)