Python-ELM
Python-ELM copied to clipboard
Missing function atleast2d_or_csr() - scikit-learn 0.17.0
Hi
Thanks for the code.
The function atleast2d_or_csr() used in random_layer.py does not seem to be available any more with the new scikit-learn 0.17.0
I managed to work around this temporarily by defining a function by that name which simply returns the matrix without performing any checks.
def atleast2d_or_csr(X): return X
I'm not sure what checks should be in there or what the equivalent function in the new scikit is though.
Hope this helps
Cheers
Srimal.
From its name , I think it is checking whether the input is at least 2d or a csr matrix .
https://github.com/scikit-learn/scikit-learn/issues/4457
I fixed this by replacing it with check_array which does the same thing. Trying to figure out how to push this change back to you, but I'm not sure how.
Go to the file random_layer.py
Change the line no 27 as "from sklearn.utils import check_random_state, check_array" Line numbers 111 and 133 as "X = check_array(X)"
This should work fine