2c2cd31a1450bc5557459cd4a45048322e016cc4,mlxtend/classifier/adaline.py,Adaline,fit,#Adaline#Any#Any#Any#,42

Before Change


        if not isinstance(init_weights, np.ndarray):
            self.w_ = np.random.random(1 + X.shape[1])
        else:
            self.w_ = init_weights

        self.cost_ = []

        for _ in range(self.epochs):

            if self.learning == "gd":
                y_val = self.net_input(X)
                errors = (y - y_val)
                self.w_[1:] += self.eta * X.T.dot(errors)
                self.w_[0] += self.eta * errors.sum()
                cost = (errors**2).sum() / 2.0

            elif self.learning == "sgd":

After Change


        for _ in range(self.epochs):
            
            if self.shuffle:
                X, y = self._shuffle(X, y)

            if self.learning == "gd":
                y_val = self.net_input(X)
                errors = (y - y_val)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rasbt/mlxtend
Commit Name: 2c2cd31a1450bc5557459cd4a45048322e016cc4
Time: 2015-04-02
Author: se.raschka@me.com
File Name: mlxtend/classifier/adaline.py
Class Name: Adaline
Method Name: fit


Project Name: rasbt/mlxtend
Commit Name: 2c2cd31a1450bc5557459cd4a45048322e016cc4
Time: 2015-04-02
Author: se.raschka@me.com
File Name: mlxtend/classifier/perceptron.py
Class Name: Perceptron
Method Name: fit


Project Name: rasbt/mlxtend
Commit Name: f7e9f59ba8ab154067565560cc5040f31df928f5
Time: 2016-02-22
Author: mail@sebastianraschka.com
File Name: mlxtend/classifier/neuralnet_mlp.py
Class Name: NeuralNetMLP
Method Name: fit