e9c5be365179c1ffe32c0dfb7c8dc3d589a07b04,skmultiflow/classification/lazy/knn.py,KNN,fit,#KNN#Any#Any#Any#,24
Before Change
def fit(self, X, y, classes=None):
r, c = 1, 1
if isinstance(X, type([])):
if isinstance(X[0], type([])):
r, c = len(X), len(X[0])
else:
c = len(X)
elif isinstance(X, type(np.array([0]))):
if hasattr(X, "shape"):
r, c = X.shape
elif hasattr(X, "size"):
r, c = 1, X.size
if self.window is None:
self.window = InstanceWindow(max_size=self.max_window_size)
for i in range(r):
After Change
self.categorical_list = categorical_list
def fit(self, X, y, classes=None):
r, c = get_dimensions(X)
if self.window is None:
self.window = InstanceWindow(max_size=self.max_window_size)
for i in range(r):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: scikit-multiflow/scikit-multiflow
Commit Name: e9c5be365179c1ffe32c0dfb7c8dc3d589a07b04
Time: 2017-07-20
Author: guilhermekmatsumoto@gmail.com
File Name: skmultiflow/classification/lazy/knn.py
Class Name: KNN
Method Name: fit
Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 3546ba97854e6707fd370b53147596f8b2dfcba9
Time: 2017-08-10
Author: guilhermekmatsumoto@gmail.com
File Name: skmultiflow/filtering/one_hot_to_categorical.py
Class Name: OneHotToCategorical
Method Name: transform
Project Name: scikit-multiflow/scikit-multiflow
Commit Name: e9c5be365179c1ffe32c0dfb7c8dc3d589a07b04
Time: 2017-07-20
Author: guilhermekmatsumoto@gmail.com
File Name: skmultiflow/classification/lazy/knn_adwin.py
Class Name: KNNAdwin
Method Name: partial_fit