predict | R Documentation |
copied from mixOmicsTeam/mixOmics/refs/heads/master/R/predict.R on 2025 Jan 30. Some components omitted that are not used in planet.
## S3 method for class 'mixo_pls'
predict(
object,
newdata,
study.test,
dist = c("all", "max.dist", "centroids.dist", "mahalanobis.dist"),
multilevel = NULL,
...
)
## S3 method for class 'mixo_spls'
predict(
object,
newdata,
study.test,
dist = c("all", "max.dist", "centroids.dist", "mahalanobis.dist"),
multilevel = NULL,
...
)
object |
object of class inheriting from
|
newdata |
data matrix in which to look for for explanatory variables to be used for prediction. Please note that this method does not perform multilevel decomposition or log ratio transformations, which need to be processed beforehand. |
study.test |
For MINT objects, grouping factor indicating which samples
of |
dist |
distance to be applied for discriminant methods to predict the
class of new data, should be a subset of |
multilevel |
Design matrix for multilevel analysis (for repeated
measurements). A numeric matrix or data frame. For a one level factor
decomposition, the input is a vector indicating the repeated measures on
each individual, i.e. the individuals ID. For a two level decomposition with
splsda models, the two factors are included in Y. Finally for a two level
decomposition with spls models, 2nd AND 3rd columns in design indicate those
factors (see example in |
... |
not used currently. |
predict
produces a list with the following components:
predict |
predicted response values. The dimensions correspond to the observations, the response variables and the model dimension, respectively. For a supervised model, it corresponds to the predicted dummy variables. |
variates |
matrix of predicted variates. |
B.hat |
matrix of regression coefficients (without the intercept). |
AveragedPredict |
if more than one block, returns the average predicted
values over the blocks (using the |
WeightedPredict |
if more than one block, returns the weighted average
of the predicted values over the blocks (using the |
class |
predicted class of |
MajorityVote |
if more than one block, returns the majority class over the blocks. NA for a sample means that there is no consensus on the predicted class for this particular sample over the blocks. |
WeightedVote |
if more than one block, returns the weighted majority class over the blocks. NA for a sample means that there is no consensus on the predicted class for this particular sample over the blocks. |
weights |
Returns the weights of each block used for the weighted predictions, for each nrepeat and each fold |
centroids |
matrix of coordinates for centroids. |
dist |
type of distance requested. |
vote |
majority vote result for multi block analysis (see details above). |
Florian Rohart, Sébastien Déjean, Ignacio González, Kim-Anh Lê Cao, Al J Abadi
Rohart F, Gautier B, Singh A, Lê Cao K-A. mixOmics: an R package for 'omics feature selection and multiple data integration. PLoS Comput Biol 13(11): e1005752
Tenenhaus, M. (1998). La regression PLS: theorie et pratique. Paris: Editions Technic.
http://www.mixOmics.org for more details.
# example code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.