Skip to content

[Bug]: Cannot find object in prediction using various models #3048

@vladimirsim

Description

@vladimirsim

JASP Version

0.19.1

Commit ID

No response

JASP Module

Machine Learning

What analysis are you seeing the problem on?

Prediction

What OS are you seeing the problem on?

Windows 11

Bug Description

The prediction table based on a trained KNN model did not load.

Expected Behaviour

The prediction table should load.

Steps to Reproduce

  1. Train a KNN model on a training dataset and save it
  2. Open Machine Learning> Prediction>Prediction
  3. Load a test or prediction dataset (different from the training dataset) and load the trained model
  4. Load the features from the trained model. The prediction table fails to load.
    I am attaching a printscreen:
    image

This is the trained KNN model:
KNNTrainedModelVladimirsim.zip

...

Log (if any)

JASP 2024-11-28 10_52_36 Desktop vladimirsim.zip

More Debug Information

This is the error message which I got while trying to predict values using a trained KNN model:
This analysis terminated unexpectedly.

Error in eval(predvars, data, env): object 'Good' not found

Stack trace
jaspStateR$new(object = object, dependencies = dependencies)

initialize(...)

.mlPredictionGetPredictions(model, dataset)

.mlPredictionGetPredictions.kknn(model, dataset)

kknn:::predict.train.kknn(model[['predictive']], dataset)

kknn(formula(terms(object)), object$data, newdata, k = object$best.parameters$k, kernel = object$best.parameters$kernel, distance = object$distance)

model.frame(formula, data = train)

model.frame.default(formula, data = train)

eval(predvars, data, env)

eval(predvars, data, env)

To receive assistance with this problem, please report the message above at: https://jasp-stats.org/bug-reports

Final Checklist

  • I have included a screenshot showcasing the issue, if possible.
  • I have included a JASP file (zipped) or data file that causes the crash/bug, if applicable.
  • I have accurately described the bug, and steps to reproduce it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions