af0d98898e2be517096c18335ab10b43b9fd461e,mlxtend/classifier/adaline.py,Adaline,fit,#Adaline#,42

Before Change


        if not len(X.shape) == 2:
            raise ValueError("X must be a 2D array. Try X[:,np.newaxis]")

        if not (np.unique(y) == np.array([-1,  1])).all():
            raise ValueError("Supports only binary class labels -1 and 1")

        if not isinstance(init_weights, np.ndarray):

After Change


            raise ValueError("X must be a 2D array. Try X[:,np.newaxis]")

        // check if {0, 1} or {-1, 1} class labels are used
        self.classes_ = np.unique(y)
        if not len(self.classes_) == 2 \
                or not self.classes_[0] in (-1, 0) \
                or not self.classes_[1] == 1:
            raise ValueError("Only supports binary class labels {0, 1} or {-1, 1}.")
        if self.classes_[0] == -1:
            self.thres_ = 0
        else:
            self.thres_ = 0.5

        // initialize weights
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: rasbt/mlxtend
Commit Name: af0d98898e2be517096c18335ab10b43b9fd461e
Time: 2015-03-17
Author: se.raschka@me.com
File Name: mlxtend/classifier/adaline.py
Class Name: Adaline
Method Name: fit


Project Name: HazyResearch/fonduer
Commit Name: 1d6771befb95f4ae94f308899633294a003dcfd6
Time: 2020-07-24
Author: hiromu.hota@hal.hitachi.com
File Name: src/fonduer/utils/data_model_utils/structural.py
Class Name:
Method Name: common_ancestor


Project Name: rasbt/mlxtend
Commit Name: af0d98898e2be517096c18335ab10b43b9fd461e
Time: 2015-03-17
Author: se.raschka@me.com
File Name: mlxtend/classifier/perceptron.py
Class Name: Perceptron
Method Name: fit


Project Name: HazyResearch/fonduer
Commit Name: 1d6771befb95f4ae94f308899633294a003dcfd6
Time: 2020-07-24
Author: hiromu.hota@hal.hitachi.com
File Name: src/fonduer/utils/data_model_utils/structural.py
Class Name:
Method Name: lowest_common_ancestor_depth