diff --git a/code/bolsonaro/data/dataset_loader.py b/code/bolsonaro/data/dataset_loader.py index df132fc46a012184ab02adeaea1c536e3ad6be4d..7d05f200728c275b5781e61fd85516d3361c46ef 100644 --- a/code/bolsonaro/data/dataset_loader.py +++ b/code/bolsonaro/data/dataset_loader.py @@ -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)) diff --git a/code/bolsonaro/utils.py b/code/bolsonaro/utils.py index f594f9274a9527e43266622470281d5757868a96..ee316bcf0a9049288e93841c362fa0cc55b542c5 100644 --- a/code/bolsonaro/utils.py +++ b/code/bolsonaro/utils.py @@ -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])