Skip to content

Commit 5a29e3a

Browse files
committed
Make predictions add features work again
1 parent 072024b commit 5a29e3a

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

R/mlPrediction.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ is.jaspMachineLearning <- function(x) {
422422
selection <- predictions[indexes]
423423
cols <- list(row = indexes, pred = selection)
424424
if (options[["predictionsTableFeatures"]]) {
425-
for (i in model[["jaspVars"]][["encoded"]]$predictors) {
425+
for (i in colnames(dataset)) {
426426
if (.columnIsNominal(i)) {
427427
table$addColumnInfo(name = i, title = i, type = "string")
428428
var <- levels(dataset[[i]])[dataset[[i]]]

inst/help/mlPrediction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Prediction
22
===
33

4+
The prediction analysis enables you to load a trained machine learning model and apply it to new data. It is important that the features in the new dataset have the same names as in the original dataset used for training.
5+
46
### Input
57

68
#### Trained Model

inst/help/mlPrediction_nl.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Voorspellen
22
===
33

4+
Met de voorspellingsanalyse kun je een getraind machine-learningmodel laden en toepassen op nieuwe gegevens. Het is belangrijk dat de kenmerken in de nieuwe dataset dezelfde namen hebben als in de oorspronkelijke dataset die voor de training is gebruikt.
5+
46
### Invoer
57

68
#### Getraind model

inst/qml/mlPrediction.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import "./common/tables" as TAB
2626

2727
Form
2828
{
29-
info: qsTr("The prediction analysis enables you to load a trained machine learning model and apply it to new data.")
29+
info: qsTr("The prediction analysis enables you to load a trained machine learning model and apply it to new data. It is important that the features in the new dataset have the same names as in the original dataset used for training.")
3030

3131
FileSelector
3232
{

0 commit comments

Comments
 (0)