-
Notifications
You must be signed in to change notification settings - Fork 177
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Documentation of iterative_train_test_split incomplete #160
Comments
I'm having this issue as well. I've tried converting my inputs to a list of lists, a np.array of lists, a np.array or np.arrays, etc. I can only get the example to work with the test example, which will work for non-sparse matrices:
^^^ This works fine for me In this case, we have
Return
And
return
However, with my own data,
Which returns
And
Which returns
And coded another way as
Which returns
^^^ All of these give me errors:
Throws
^^^ The number of rows matches perfectly, so this is really unclear And
Gives me
I think this isn't an issue with my data, as
Runs successfully. I'd really love to use this package, but these errors and the documentation gaps are really preventing me from doing so. Any advice would be great! Also, as a side note, it's a little odd to me that sklearn's returned params are @edufonseca, did you ever find a solution? |
@AlexMRuch no, I did not. It's a pity. It'd be great to have this work. |
Yeah, looks like the last update was a year ago. Wonder if the package is dead :-( |
You may simply customize that function
|
@AlexMRuch You may try this, and look if it works
I also got some error when using this method but using double bracket solved the error for me |
As it states in the README, X and y must be matrices of two dimensions. For instance, if you have a pandas column that you want to use as X, you should first convert it to a numpy array of shape (n, 1):
To prepare the y parameter you can use MultiLabelBinarize from scikit-learn:
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
iterative_train_test_split
is briefly documented here (at the bottom), but the input paramsX
,y
are not explained. I tried passingy
as a list of lists, encoding the labels as categorical integers, eg[[2], [0,3], [1], [0,2,3]]
but it crashed.
By debugging the example provided here,
X
,y
turn out to bescipy.sparse.lil_matrix
. Is this the only format allowed?Any indication on the possible formats for
X
,y
initerative_train_test_split
? ThanksThe text was updated successfully, but these errors were encountered: