Comments (4)
I just fixed the compatibility with pyhthon3. Just do a pip install sklearn-deap --upgrade
from sklearn-deap.
I just ran into this issue too.
from sklearn-deap.
Running the example on the README file just gives this error:
Running it in Python 3.5.1 on OSX in a Jupyter notebook.
Types [2, 2, 1] and maxint [24, 24, 0] detected
--- Evolve in 625 possible combinations ---
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-9446b1aeccef> in <module>()
28 generations_number=5,
29 n_jobs=4)
---> 30 cv.fit(X, y)
/usr/local/lib/python3.5/site-packages/evolutionary_search/__init__.py in fit(self, X, y)
286 self.best_params_ = None
287 for possible_params in self.possible_params:
--> 288 self._fit(X, y, possible_params)
289 if self.refit:
290 self.best_estimator_ = clone(self.estimator)
/usr/local/lib/python3.5/site-packages/evolutionary_search/__init__.py in _fit(self, X, y, parameter_dict)
346 pop, logbook = algorithms.eaSimple(pop, toolbox, cxpb=0.5, mutpb=0.2,
347 ngen=self.generations_number, stats=stats,
--> 348 halloffame=hof, verbose=self.verbose)
349
350 current_best_score_ = hof[0].fitness.values[0]
/usr/local/lib/python3.5/site-packages/deap/algorithms.py in eaSimple(population, toolbox, cxpb, mutpb, ngen, stats, halloffame, verbose)
145 # Evaluate the individuals with an invalid fitness
146 invalid_ind = [ind for ind in population if not ind.fitness.valid]
--> 147 fitnesses = toolbox.map(toolbox.evaluate, invalid_ind)
148 for ind, fit in zip(invalid_ind, fitnesses):
149 ind.fitness.values = fit
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/pool.py in map(self, func, iterable, chunksize)
258 in a list that is returned.
259 '''
--> 260 return self._map_async(func, iterable, mapstar, chunksize).get()
261
262 def starmap(self, func, iterable, chunksize=None):
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/pool.py in get(self, timeout)
606 return self._value
607 else:
--> 608 raise self._value
609
610 def _set(self, i, obj):
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/pool.py in _handle_tasks(taskqueue, put, outqueue, pool, cache)
383 break
384 try:
--> 385 put(task)
386 except Exception as e:
387 job, ind = task[:2]
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/connection.py in send(self, obj)
204 self._check_closed()
205 self._check_writable()
--> 206 self._send_bytes(ForkingPickler.dumps(obj))
207
208 def recv_bytes(self, maxlength=None):
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/reduction.py in dumps(cls, obj, protocol)
48 def dumps(cls, obj, protocol=None):
49 buf = io.BytesIO()
---> 50 cls(buf, protocol).dump(obj)
51 return buf.getbuffer()
52
TypeError: can't pickle dict_items objects
from sklearn-deap.
Same problem here. Is there any solution?
from sklearn-deap.
Related Issues (20)
- Running Search with n_jobs>1 throws Deap Attribute Error. Official sklearn example HOT 2
- Enabling early-stopping in cv with proper eval_set HOT 1
- scores for individuals in score_results are wrong
- Add return_train_score flag HOT 2
- Can't instantiate abstract class EvolutionaryAlgorithmSearchCV with abstract methods _run_search HOT 6
- AttributeError: Can't get attribute 'Individual' on HOT 6
- stuck after gen 1... HOT 1
- NSGA and SPEA2 HOT 1
- Tests no longer pass with newest sklearn HOT 2
- Does not work with pipelines HOT 4
- Can you please add callback into EvolutionaryAlgorithmSearchCV().fit()? HOT 2
- ValueError when calling cv.fit() for optimising a neural network
- njobs > 1 throws error AttributeError: Can't get attribute 'Individual' on <module 'deap.creator' from '\\site-packages\\deap\\creator.py'> HOT 1
- Problem with scikit 0.24 HOT 5
- .score method throws up error: "AttributeError: 'EvolutionaryAlgorithmSearchCV' object has no attribute 'multimetric_'" HOT 1
- 这个模型能否为回归模型进行调整参数呢? HOT 1
- It would be nice if there was a random_state parameter
- cannot install evolutionary_search and doesnot present on any source --see the comment HOT 2
- Not compatible with scikit-learn 1.1 and above HOT 1
- Can we achieve nesting.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sklearn-deap.