Closed sfd99 closed 1 week ago
iris <- iris[iris$Species == "setosa", ] # Binary classification - WITH equal instead of != )
This results in a dataset containing only one class, which leads to errors during model training.
fastml is designed for binary or multiclass classification, which requires at least two distinct classes in the target variable. Filtering the dataset to include only "setosa" eliminates the second class, making it impossible for the models to perform classification. Consequently, metrics like Accuracy and Kappa cannot be computed, resulting in missing values and errors.
We will update the function to give an informative error in such cases.
Thank you for your feedback.
Hi Selçuk,
Thanks f/ fastml Pkg, looks really interesting.
Error in Example when I tried testing: iris <- iris[iris$Species == "setosa", ] # equal to setosa instead of: iris <- iris[iris$Species != "setosa", ] # NOT equal to setosa in your example
The R code:
Rstudio returns:
Something is wrong; all the Accuracy metric values are missing: Accuracy Kappa
Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA
Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA
NA's :486 NA's :486
Something is wrong; all the Accuracy metric values are missing: Accuracy Kappa
Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA
Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA
NA's :1 NA's :1
Something is wrong; all the Accuracy metric values are missing: Accuracy Kappa
Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA
Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA
NA's :9 NA's :9
Error in fastml(data = iris, label = "Species") : No models were successfully trained. Please check your data and parameters. In addition: There were 50 or more warnings (use warnings() to see the first 50)
I must be missing something basic... SFd99 San Francisco