You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the exact code sample, when I ran the code, I get an import error.
Traceback (most recent call last):
File "test.py", line 18, in
from evolutionary_search import EvolutionaryAlgorithmSearchCV
File "D:\Anaconda2\lib\site-packages\evolutionary_search_init_.py", line 1, in
from .cv import *
File "D:\Anaconda2\lib\site-packages\evolutionary_search\cv.py", line 6, in
from deap import base, creator, tools, algorithms
File "D:\Python\zillow\deap.py", line 25, in
from evolutionary_search import EvolutionaryAlgorithmSearchCV
ImportError: cannot import name EvolutionaryAlgorithmSearchCV
`import sklearn.datasets
import numpy as np
import random
data = sklearn.datasets.load_digits()
X = data["data"]
y = data["target"]
from sklearn.svm import SVC
from sklearn.model_selection import StratifiedKFold
paramgrid = {"kernel": ["rbf"],
"C" : np.logspace(-9, 9, num=25, base=10),
"gamma" : np.logspace(-9, 9, num=25, base=10)}
random.seed(1)
from evolutionary_search import EvolutionaryAlgorithmSearchCV
cv = EvolutionaryAlgorithmSearchCV(estimator=SVC(),
params=paramgrid,
scoring="accuracy",
cv=StratifiedKFold(n_splits=4),
verbose=1,
population_size=50,
gene_mutation_prob=0.10,
gene_crossover_prob=0.5,
tournament_size=3,
generations_number=5,
n_jobs=4)
cv.fit(X, y)`
The text was updated successfully, but these errors were encountered:
I installed per instruction as follows (I used Windows 10 and Anaconda, 2x on main, 3x on env): pip install sklearn-deap
I just also tried installing from a cloned source under git and it still created the same issue.
I tried under Python v2.7.13 and Python v3.6.2 - same results.
Is there a way around this?
Using the exact code sample, when I ran the code, I get an import error.
Traceback (most recent call last):
File "test.py", line 18, in
from evolutionary_search import EvolutionaryAlgorithmSearchCV
File "D:\Anaconda2\lib\site-packages\evolutionary_search_init_.py", line 1, in
from .cv import *
File "D:\Anaconda2\lib\site-packages\evolutionary_search\cv.py", line 6, in
from deap import base, creator, tools, algorithms
File "D:\Python\zillow\deap.py", line 25, in
from evolutionary_search import EvolutionaryAlgorithmSearchCV
ImportError: cannot import name EvolutionaryAlgorithmSearchCV
The text was updated successfully, but these errors were encountered: