-
Notifications
You must be signed in to change notification settings - Fork 67
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
Evaluating trees with features not in dataset #133
Comments
Hi @Jgmedina95, Thanks for raising this! So this should be because I just looked at the code, and it seems like sometimes SymbolicRegression.jl/src/EvaluateEquation.jl Line 163 in 6075f13
Whereas, SymbolicRegression.jl/src/EvaluateEquation.jl Line 189 in 6075f13
So perhaps for some trees, this would raise an error, and sometimes it would not. Will think more whether we should add a bounds check. Best, |
Hi, im working on a process that uses the equation returned in the Pareto Frontier.
![image](https://user-images.githubusercontent.com/97254349/190234583-397a66d5-7b5a-4caf-b114-e21d44767e45.png)
![image](https://user-images.githubusercontent.com/97254349/190234319-7f319ff2-bf33-4ea3-a9f7-7a498d8ba9b9.png)
I was playing around with it and found the following:
Setting a tree like:
and evaluating with a dataset with 6 features, gives no problem, as expected.
but if i create a tree that uses more features than in the original dataset like:
![image](https://user-images.githubusercontent.com/97254349/190234730-02b87178-9f8b-47e0-b44a-2e496fd32175.png)
I expected an error, but the function eval_tree_array gave an output and completion ==true.
![image](https://user-images.githubusercontent.com/97254349/190235092-5dfc449c-48e0-4dde-a7ff-e61ea3f33dc1.png)
I've realized this will not impact what I'm doing as trees made by the program will never (right?) have more features than the dataset, but I suppose its interesting enough of a bug to share.
The text was updated successfully, but these errors were encountered: