9405c0b9efe36aef14a7c6fa5e93d82d54188e1e,pyod/test/test_lscp.py,TestLSCP,setUp,#TestLSCP#,34

Before Change



class TestLSCP(unittest.TestCase):
    def setUp(self):
        self.n_train = 200
        self.n_test = 100
        self.contamination = 0.1
        self.roc_floor = 0.8
        self.X_train, self.y_train, self.X_test, self.y_test = generate_data(
            n_train=self.n_train, n_test=self.n_test,
            contamination=self.contamination, random_state=42)
        self.X_train, self.X_test = standardizer(self.X_train, self.X_test)
        self.detector_list = [LOF(), LOF()]
        self.clf = LSCP(self.detector_list, contamination=self.contamination)
        self.clf.fit(self.X_train)

After Change


        // Define data file and read X and y
        // Generate some data if the source data is missing
        this_directory = path.abspath(path.dirname(__file__))
        mat_file = "cardio.mat"
        try:
            mat = loadmat(path.join(*[this_directory, "data", mat_file]))

        except TypeError:
            print("{data_file} does not exist. Use generated data".format(
                data_file=mat_file))
            X, y = generate_data(train_only=True)  // load data
        except IOError:
            print("{data_file} does not exist. Use generated data".format(
                data_file=mat_file))
            X, y = generate_data(train_only=True)  // load data
        else:
            X = mat["X"]
            y = mat["y"].ravel()
            X, y = check_X_y(X, y)

        self.X_train, self.X_test, self.y_train, self.y_test = \
            train_test_split(X, y, test_size=0.4, random_state=42)

        self.detector_list = [LOF(), LOF()]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 30

Instances


Project Name: yzhao062/pyod
Commit Name: 9405c0b9efe36aef14a7c6fa5e93d82d54188e1e
Time: 2019-07-29
Author: zhaoy@cmu.edu
File Name: pyod/test/test_lscp.py
Class Name: TestLSCP
Method Name: setUp


Project Name: yzhao062/pyod
Commit Name: 93415e1b45f6accda29a7b3fa104c38dcca35394
Time: 2018-12-08
Author: yuezhao@cs.toronto.edu
File Name: pyod/test/test_xgbod.py
Class Name: TestXGBOD
Method Name: setUp


Project Name: yzhao062/pyod
Commit Name: b431b3c6629a967c4919b87e0da6567defd51419
Time: 2019-10-15
Author: zhaoy@cmu.edu
File Name: pyod/test/test_lscp.py
Class Name: TestLSCP
Method Name: setUp


Project Name: yzhao062/pyod
Commit Name: 9405c0b9efe36aef14a7c6fa5e93d82d54188e1e
Time: 2019-07-29
Author: zhaoy@cmu.edu
File Name: pyod/test/test_lscp.py
Class Name: TestLSCP
Method Name: setUp