I want to use partial least squares discriminant analysis (PLS-DA) to solve a classification problem where there are multiple classes to be predicted. I know PLS-DA is not limited to the two class problem, and I believe that using plsda from the Caret package can handle this ok, but when I try to build a PLS-DA model in the mlr package, I get an error telling me my task is a "multiclass-problem, but learner 'classif.plsdaCaret' does not support that!"
Is it possible to build a multiclass PLS-DA model using mlr and am I simply using the wrong learner? Here is a reproducible example:
# LOAD PACKAGES ----
#install.packages("BiocManager")
#BiocManager::install("mixOmics")
library(mlr)
library(tidyverse)
library(mixOmics)
# LOAD IN DATA ----
data(liver.toxicity)
liverTib <- as.tibble(cbind(liver.toxicity$treatment$Treatment.Group,
liver.toxicity$gene)
)
names(liverTib)[1] <- "Treatment"
liverTib
# MAKE TASK, LEARNER AND ATTEMPT TO BULD MODEL
liverTask <- makeClassifTask(data = liverTib, target = "Treatment")
plsda <- makeLearner("classif.plsdaCaret")
liverModel <- train(plsda, liverTask)