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
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.
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.
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
The text was updated successfully, but these errors were encountered: