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

Missing function atleast2d_or_csr() - scikit-learn 0.17.0 #3

Open
srimalj opened this issue Mar 11, 2016 · 4 comments
Open

Missing function atleast2d_or_csr() - scikit-learn 0.17.0 #3

srimalj opened this issue Mar 11, 2016 · 4 comments

Comments

@srimalj
Copy link

srimalj commented Mar 11, 2016

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.

@StevenLOL
Copy link

From its name , I think it is checking whether the input is at least 2d or a csr matrix .

@stgrmks
Copy link

stgrmks commented Nov 4, 2016

@markuskreitzer
Copy link

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.

@PavithranRick
Copy link

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

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

5 participants