We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c322825 commit a5145afCopy full SHA for a5145af
R/mlPrediction.R
@@ -286,7 +286,7 @@ is.jaspMachineLearning <- function(x) {
286
dataset <- jaspBase::excludeNaListwise(dataset, options[["predictors"]])
287
# Select only the predictors in the model to prevent accidental double column names
288
dataset <- dataset[, which(decodeColNames(colnames(dataset)) %in% model[["jaspVars"]][["decoded"]]$predictors), drop = FALSE]
289
- if (NCOL(dataset) > 0) {
+ if (NCOL(dataset) == length(model[["jaspVars"]][["decoded"]]$predictors)) {
290
# Ensure the column names in the dataset match those in the training data
291
colnames(dataset) <- .matchDecodedNames(colnames(dataset), model)
292
# Scale the features with the same scaling as the original dataset
0 commit comments