Future Warning from sklearn
ayhokuyan opened this issue · 1 comments
ayhokuyan commented
Hello all,
I am using this repo to create a two-way split for a multi-label medical segmentation dataset. However, when I use it as the following, I get a future warning, which turns into an error after version 0.25 (which turned into 1.0).
The code:
from iterstrat.ml_stratifiers import MultilabelStratifiedShuffleSplit
def stratified_split(X, y, split_size, random_state=0):
msss = MultilabelStratifiedShuffleSplit(n_splits=1, test_size=split_size, random_state=random_state)
for train_index, test_index in msss.split(X, y):
X_train, X_test = X[train_index], X[test_index]
y_train, y_test = y[train_index], y[test_index]
return X_train, X_test
The warning:
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sklearn/utils/validation.py:72: FutureWarning: Pass test_size=0.3, train_size=None, random_state=0 as keyword args. From version 1.0 (renaming of 0.25) passing these as positional arguments will result in an error
"will result in an error", FutureWarning)
Can someone tell me is there anything that I am doing wrong?