How to acquire the index of equations picked by model.predict() #459
Answered
by
MilesCranmer
GodfreyL023
asked this question in
Q&A
-
Hi Miles, The method model.sympy() and other export methods need user to input the list of indices of the equations wanted. What makes me confused is that I haven't found any effective way to obtain the indices of those functions picked by model.predict other than searching for them manually in the return of model.fit. Is there any way to get them automatically? Appreciate any generous response. Version Operating System |
Beta Was this translation helpful? Give feedback.
Answered by
MilesCranmer
Nov 9, 2023
Replies: 1 comment
-
Hi @GodfreyL023, You can do this as follows: from pysr.sr import idx_model_selection
idx = idx_model_selection(model.equations_, "best") |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
GodfreyL023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @GodfreyL023,
Thanks, I am glad to hear it is useful for you.
You can do this as follows: