9d0ed839dc9df4c9afc5966c1e3276c478a58d53,scripts/update_metadata_util.py,,load_task,#Any#,24

Before Change


    cat = ["categorical" if c else "numerical" for c in cat]

    unique = np.unique(y_train)
    mapping = {unique_value: i for i, unique_value in enumerate(unique)}
    y_train = np.array([mapping[value] for value in y_train])
    y_test = np.array([mapping[value] for value in y_test])

    return X_train, y_train, X_test, y_test, cat

After Change


    del dataset
    cat = ["categorical" if c else "numerical" for c in cat]

    if isinstance(task, openml.tasks.OpenMLClassificationTask):
        task_type = "classification"
    elif isinstance(task, openml.tasks.OpenMLRegressionTask):
        task_type = "regression"
    else:
        raise ValueError("Unknown task type")

    return X_train, y_train, X_test, y_test, cat, task_type
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: automl/auto-sklearn
Commit Name: 9d0ed839dc9df4c9afc5966c1e3276c478a58d53
Time: 2020-09-16
Author: feurerm@informatik.uni-freiburg.de
File Name: scripts/update_metadata_util.py
Class Name:
Method Name: load_task


Project Name: pysb/pysb
Commit Name: 590e29dd3dca1f837ab70c67f3a628c7ee032ac9
Time: 2017-05-01
Author: alubbock@users.noreply.github.com
File Name: pysb/simulator/cupsoda.py
Class Name: CupSodaSimulator
Method Name: _get_cmatrix


Project Name: pfnet/optuna
Commit Name: 9ffd284227062ed4c0a4865641169c1748edf239
Time: 2018-07-27
Author: sano@preferred.jp
File Name: pfnopt/config.py
Class Name:
Method Name: load_pfnopt_config


Project Name: open-mmlab/mmdetection
Commit Name: 9d38a278eacd64cfe45ab92054d03731102c3331
Time: 2018-12-11
Author: chenkaidev@gmail.com
File Name: mmdet/datasets/voc.py
Class Name: VOCDataset
Method Name: __init__