Skip to content
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

Error in example as coded in http://elm.readthedocs.io/en/latest/usage.html #2

Open
brunialti opened this issue Aug 9, 2016 · 6 comments

Comments

@brunialti
Copy link

No errors occours until the following statement (the loaded data matches the data set contained in the file):
elmk.search_param(data, cv="kfold", of="accuracy", eval=10)

I get the following error:

`##### Start search #####
Traceback (most recent call last):
  File "D:/elm/elm", line 18, in <module>
    elmk.search_param(data, cv="kfold", of="accuracy", eval=10)
  File "C:\Users\roberto\AppData\Local\Programs\Python\Python35\lib\site-packages\elm\elmk.py", line 489, in search_param
    param_kernel=param_ranges[1])
  File "C:\Users\roberto\AppData\Local\Programs\Python\Python35\lib\site-packages\optunity\api.py", line 212, in minimize
    pmap=pmap)
  File "C:\Users\roberto\AppData\Local\Programs\Python\Python35\lib\site-packages\optunity\api.py", line 245, in optimize
    solution, report = solver.optimize(f, maximize, pmap=pmap)
  File "C:\Users\roberto\AppData\Local\Programs\Python\Python35\lib\site-packages\optunity\solvers\CMAES.py", line 139, in optimize
    sigma=self.sigma)
  File "C:\Users\roberto\AppData\Local\Programs\Python\Python35\lib\site-packages\deap\cma.py", line 84, in __init__
    self.dim = len(self.centroid)
TypeError: len() of unsized object

Windows 10, python 3.5.2,, JetBrains PyCharm Community Edition 2016.2(64) as ide

@IITtense
Copy link

IITtense commented Oct 2, 2016

Anybody have any solution of this problem ?

@amir65gh
Copy link

amir65gh commented Jun 9, 2017

I have the same problem, anyone could fix this issue?

@renatoosousa
Copy link

If you found an error while using ELMKernel.search_param() or ELMRandom.search_param(), probably is because pip installed an outdated version of optunity (currently their pip package and github are not synced).

To fix it, do:
`
$ sudo pip install -d . elm

$ tar -xf elm*.tar.gz

$ cd elm*

$ sudo pip install -r requirements.txt`

@madarax64
Copy link

Conversely, you could also install Optunity directly from their Github, using:

sudo pip install git+git://github.com/claesenm/optunity

This will fetch the latest version of Optunity right from their repo and leave everything else intact.

@Abdou24MR
Copy link

Abdou24MR commented Aug 23, 2018

"Successfully installed Optunity-1.1.1"
but the problem still the same!
how to resolve it definitively?

@acba
Copy link
Owner

acba commented Nov 13, 2018

Could you try again ?

I just updated all libraries to their last versions, i got it working fine.
The only problem is some warinings from 'deap'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants