predict: predict mixxo from

predictR Documentation

predict mixxo from

Description

copied from mixOmicsTeam/mixOmics/refs/heads/master/R/predict.R on 2025 Jan 30. Some components omitted that are not used in planet.

Usage

## 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,
  ...
)

Arguments

object

object of class inheriting from "(mint).(block).(s)pls(da)".

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 newdata are from the same study. Overlap with object$study are allowed.

dist

distance to be applied for discriminant methods to predict the class of new data, should be a subset of "centroids.dist", "mahalanobis.dist" or "max.dist" (see Details). Defaults to "all".

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 ?splsda and ?spls).

...

not used currently.

Value

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 predict output)

WeightedPredict

if more than one block, returns the weighted average of the predicted values over the blocks (using the predict and weights outputs)

class

predicted class of newdata for each 1,...,ncomp components.

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).

Author(s)

Florian Rohart, Sébastien Déjean, Ignacio González, Kim-Anh Lê Cao, Al J Abadi

References

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.

See Also

http://www.mixOmics.org for more details.

Examples

# example code


wvictor14/planet documentation built on Feb. 6, 2025, 6:40 a.m.