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

Weird error when 'OP' argument is set #12

Open
freicaneca opened this issue Jan 3, 2018 · 1 comment
Open

Weird error when 'OP' argument is set #12

freicaneca opened this issue Jan 3, 2018 · 1 comment

Comments

@freicaneca
Copy link

When calling ELM.train(data, labels, "CV", "OP", 'c', k=5) on the data and labels attached, I get the following error:

Traceback (most recent call last):
File "parameter_analysis_elm.py", line 81, in
elm.train(data, labels, "CV", 'OP', 'c', k=5)
File "/usr/local/lib/python3.5/dist-packages/hpelm/elm.py", line 198, in train
e = train_cv(self, X, T, k)
File "/usr/local/lib/python3.5/dist-packages/hpelm/mss_cv.py", line 53, in train_cv
rank, L = self._ranking(Hvl.shape[1], Hvl, Tvl)
File "/usr/local/lib/python3.5/dist-packages/hpelm/elm.py", line 503, in _ranking
rank = mrsr2(H, T, L)
File "/usr/local/lib/python3.5/dist-packages/hpelm/modules/mrsr2.py", line 66, in mrsr2
nonrank.remove(j_current)
AttributeError: 'range' object has no attribute 'remove'

I couldn't figure out how to solve it, unless by removing "OP" flag. The flag works for another data file, much smaller than this one.

data_and_labels.zip

@popcornell
Copy link
Contributor

I've encountered the same problem actually. I've issued a pull request which seems to have fixed that.
The problem is due to the fact that in Python 3 the range function don't return a list but a range type.

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

2 participants