Closed dzubo closed 6 years ago
Thank you for the work, it's amazing!
Thanks!
Hmmm, I have not done much work with the seeding feature in python. Is there any chance you can post a minimal working example that I can debug to figure out what the problem is? Thanks for reporting this bug.
Here is the example:
import numpy as np
from sklearn.datasets import make_regression
from ellyn import ellyn
X, y = make_regression(n_samples=100, n_features=10)
learner = ellyn(g=10, popsize=100, verbosity=2, seeds='(x_1+x_2)')
learner.fit(X, y)
The output:
==========
params
==========
g : 10
seeds : (x_1+x_2)
popsize : 100
verbosity : 2
classification : False
scoring_function : <function mean_squared_error at 0x7fd04a3acd08>
random_state : 0
selection : tournament
best_estimator_ : []
hof : []
return_pop : False
class_m4gp : False
sel : 1
{'g': 10, 'seeds': '(x_1+x_2)', 'popsize': 100, 'verbosity': 2, 'classification': False, 'scoring_function': <function mean_squared_error at 0x7fd04a3acd08>, 'random_state': 0, 'selection': 'tournament', 'best_estimator_': [], 'hof': [], 'return_pop': False, 'class_m4gp': False, 'sel': 1}
op2node failed.
stoffinal model(s):
Traceback (most recent call last):
File "train_ellyn_seeds.py", line 9, in <module>
learner.fit(X, y)
File "/opt/notebooks/ellyn.py", line 214, in fit
print('best model:',self.stack_2_eqn(self.best_estimator_))
File "/opt/notebooks/ellyn.py", line 384, in stack_2_eqn
return stack_eqn[-1]
IndexError: list index out of range
checkout https://github.com/EpistasisLab/ellyn/commit/ad1692ca7b409cd001047550089fef9fbfdedacd
the issue was that the seeds needed to be converted to a list in ellyn.py . I ran it with the example fine. Let me know if this works for you.
closing this based on example fix
Thank you for the work, it's amazing!
Could you please elaborate on parameter
seeds
?But when I use the code like this
or this
I get this error message: