41e44f86351cee490fea0bb728a3e0eb1e7670f2,pyod/models/ocsvm.py,OCSVM,fit,#OCSVM#Any#Any#Any#,110
Before Change
def fit(self, X, y=None, sample_weight=None, **params):
self.classes_ = 2 // default as binary classification
if y is not None:
check_classification_targets(y)
self.classes_ = len(np.unique(y))
warnings.warn(
"y should not be presented in unsupervised learning.")
self.detector_ = OneClassSVM(kernel=self.kernel,
degree=self.degree,
gamma=self.gamma,
coef0=self.coef0,
After Change
def fit(self, X, y=None, sample_weight=None, **params):
// Validate inputs X and y (optional)
X = check_array(X)
self._set_n_classes(y)
self.detector_ = OneClassSVM(kernel=self.kernel,
degree=self.degree,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: yzhao062/pyod
Commit Name: 41e44f86351cee490fea0bb728a3e0eb1e7670f2
Time: 2018-06-02
Author: yuezhao@cs.toronto.edu
File Name: pyod/models/ocsvm.py
Class Name: OCSVM
Method Name: fit
Project Name: yzhao062/pyod
Commit Name: 41e44f86351cee490fea0bb728a3e0eb1e7670f2
Time: 2018-06-02
Author: yuezhao@cs.toronto.edu
File Name: pyod/models/lof.py
Class Name: LOF
Method Name: fit
Project Name: yzhao062/pyod
Commit Name: 41e44f86351cee490fea0bb728a3e0eb1e7670f2
Time: 2018-06-02
Author: yuezhao@cs.toronto.edu
File Name: pyod/models/iforest.py
Class Name: IForest
Method Name: fit