Skip to content
This repository has been archived by the owner on Mar 6, 2021. It is now read-only.

TypeError: unsupported operand type(s) for -: 'map' and 'map' #13

Open
harshinielath opened this issue Jan 30, 2018 · 1 comment
Open

Comments

@harshinielath
Copy link

elmc.fit(x_train,y_train)
Traceback (most recent call last):
File "", line 1, in
File "/home/analytics/anaconda3/lib/python3.6/site-packages/sklearn_extensions/extreme_learning_machines/elm.py", line 596, in fit
super(ELMClassifier, self).fit(X, y_bin)
File "/home/analytics/anaconda3/lib/python3.6/site-packages/sklearn_extensions/extreme_learning_machines/elm.py", line 464, in fit
self.genelm_regressor.fit(X, y)
File "/home/analytics/anaconda3/lib/python3.6/site-packages/sklearn_extensions/extreme_learning_machines/elm.py", line 183, in fit
self.hidden_activations
= self.hidden_layer.fit_transform(X)
File "/home/analytics/anaconda3/lib/python3.6/site-packages/sklearn/base.py", line 517, in fit_transform
return self.fit(X, **fit_params).transform(X)
File "/home/analytics/anaconda3/lib/python3.6/site-packages/sklearn_extensions/extreme_learning_machines/random_layer.py", line 108, in fit
self._generate_components(X)
File "/home/analytics/anaconda3/lib/python3.6/site-packages/sklearn_extensions/extreme_learning_machines/random_layer.py", line 360, in _generate_components
self._compute_centers(X, sp.issparse(X), rs)
File "/home/analytics/anaconda3/lib/python3.6/site-packages/sklearn_extensions/extreme_learning_machines/random_layer.py", line 322, in _compute_centers
spans = max_Xs - min_Xs
TypeError: unsupported operand type(s) for -: 'map' and 'map'

I get this error when fitting and not able to solve it. My x_train is csr matrix and y_train is ndarray.Any suggestions on this?

@mfouesneau
Copy link

You're using python 3. I do not know where map is used but this is no list anymore

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

No branches or pull requests

2 participants