Hello,
I would like to ask how can i use the train data subset to fit a model, and test data to test it
i already split the data into data.train and data.test, but i got an error invalid list type when using the lda function
data.lda <- lda(g ~ ., data = mydata,subset = data.train), where the g is the group column in mydata.
Can anyone help me ?
Thanks
Checkout:
Bindings for additional classification models for use with
the parsnip package. Models include flavors of discriminant
analysis, such as linear (Fisher (1936)
), regularized (Friedman
(1989) ), and flexible (Hastie,
Tibshirani,...
By the way, if you are after specific help, please provide a reproducible example:
A minimal reproducible example consists of the following items:
A minimal dataset, necessary to reproduce the issue
The minimal runnable code necessary to reproduce the issue, which can be run
on the given dataset, and including the necessary information on the used packages.
Let's quickly go over each one of these with examples:
Minimal Dataset (Sample Data)
You need to provide a data frame that is small enough to be (reasonably) pasted on a post, but big enough to reproduce your issue.
Let's say, as an example, that you are working with the iris data frame
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.…
Thanks i will check it out first
system
Closed
December 22, 2020, 11:04pm
4
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.