Learn R Programming

plsmod (version 0.1.2)

multi_predict._mixo_pls: Model predictions across many sub-models

Description

Model predictions across many sub-models

Usage

# S3 method for `_mixo_pls`
multi_predict(object, new_data, num_comp = NULL, type = NULL, ...)

# S3 method for `_mixo_spls` multi_predict(object, new_data, num_comp = NULL, type = NULL, ...)

# S3 method for `_mixo_plsda` multi_predict(object, new_data, num_comp = NULL, type = NULL, ...)

# S3 method for `_mixo_splsda` multi_predict(object, new_data, num_comp = NULL, type = NULL, ...)

Arguments

object

An object of class model_fit

new_data

A rectangular data object, such as a data frame.

num_comp

An integer vector for the number of PLS terms to retain.

type

A single character value or NULL. Possible values are "numeric", "class", or "prob". When NULL, predict() will choose an appropriate value based on the model's mode.

...

Not currently used.

Examples

Run this code
# NOT RUN {
data(meats, package = "modeldata")

mv_meats <-
  pls(num_comp = 20) %>%
  set_engine("mixOmics") %>%
  set_mode("regression") %>%
  fit_xy(x = meats[-(1:5), 1:100], y = meats[-(1:5), 101:103])

# }

Run the code above in your browser using DataLab