f7e9f59ba8ab154067565560cc5040f31df928f5,mlxtend/classifier/adaline.py,Adaline,fit,#Adaline#,54
Before Change
// check array shape
if not len(X.shape) == 2:
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:
After Change
// Gradient descent or stochastic gradient descent learning
else:
self.init_time_ = time()
for i in range(self.epochs):
if self.shuffle:
X, y = self._shuffle(X, y)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: rasbt/mlxtend
Commit Name: f7e9f59ba8ab154067565560cc5040f31df928f5
Time: 2016-02-22
Author: mail@sebastianraschka.com
File Name: mlxtend/classifier/adaline.py
Class Name: Adaline
Method Name: fit
Project Name: rasbt/mlxtend
Commit Name: f7e9f59ba8ab154067565560cc5040f31df928f5
Time: 2016-02-22
Author: mail@sebastianraschka.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/logistic_regression.py
Class Name: LogisticRegression
Method Name: fit