Skip to content
Snippets Groups Projects
Commit b5bbdccd authored by Léo Bouscarrat's avatar Léo Bouscarrat
Browse files

Removing inexisting parameter to fetch_openml

parent 96f51d9c
No related branches found
No related tags found
1 merge request!15Resolve "Adding new datasets"
......@@ -112,7 +112,7 @@ class DatasetLoader(object):
dataset_loading_func = change_binary_func_openml('kr-vs-kp')
task = Task.BINARYCLASSIFICATION
elif name == 'kin8nm':
X, y = fetch_openml('kin8nm', return_X_y=True, random_state=dataset_parameters.random_state)
X, y = fetch_openml('kin8nm', return_X_y=True)
task = Task.REGRESSION
else:
raise ValueError("Unsupported dataset '{}'".format(name))
......
......@@ -82,10 +82,7 @@ def change_binary_func_load(base_load_function):
def change_binary_func_openml(dataset_name):
def func_load(return_X_y=True, random_state=None):
if random_state:
X, y = fetch_openml(dataset_name, return_X_y=return_X_y, random_state=random_state)
else:
X, y = fetch_openml(dataset_name, return_X_y=return_X_y)
X, y = fetch_openml(dataset_name, return_X_y=return_X_y)
possible_classes = sorted(set(y))
assert len(possible_classes) == 2, "Function change binary_func_load only work for binary classfication"
y = binarize_class_data(y, possible_classes[-1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment