-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue: Error with Prediction Method in Random Forest and Gradient Boost Regression #771
Comments
Thanks for reporting. But I cannot reproduce the issue. Here is the output of your code in jshell:
|
Hi! I run into similar issue when trying to upgrade from 2.6.0 to 3.1.0. Predict requires DataFrame that contains the predicted variable. Code below works in 2.6.0, but not 3.1.0. public class TestSmileRegression {
}` Exception:
|
yes exactly "predict requires DataFrame that contains the predicted variable" indeed I had solved the issue the past week by implementing the following solution:
|
Describe the bug
I encountered an issue with the prediction method when attempting regression using Random Forest and Gradient Boost algorithms. The problem arises specifically in versions higher than 3.0.0. In version 2.6.0, this problem does not occur.
Reproduction Steps
1.Use the provided code snippets for setting up the regression.
2.Attempt to run regression using Random Forest or Gradient Boost with versions > 3.0.0.
3.Observe the error message mentioned below.
Code Snippet
Expected behavior
The regression should execute prediction successfully without any errors, similar to the behavior observed in version 2.6.0.
Actual behavior
Illegal argument exception is thrown :
Field deflator doesn't exist java.lang.IllegalArgumentException: Field deflator doesn't exist at smile.data.type.StructType.indexOf(StructType.java:103) at smile.data.formula.Variable$1.<init>(Variable.java:80) at smile.data.formula.Variable.bind(Variable.java:78) at smile.data.formula.Formula.bind(Formula.java:360) at smile.data.formula.Formula.x(Formula.java:433) at smile.regression.RandomForest.predict(RandomForest.java:455)
Additional context
Request for Assistance
Could someone kindly provide insights into what might be causing this error? I'd greatly appreciate any guidance or suggestions for troubleshooting steps.
The text was updated successfully, but these errors were encountered: