fcc2624ae4d70e050424b7786775e39c81357aa6,sklearn/dummy.py,DummyClassifier,fit,#DummyClassifier#Any#Any#Any#,86
Before Change
self.n_classes_,
self.class_prior_) = class_distribution(y, sample_weight)
if (self.strategy == "constant" and
any(constant[k] not in self.classes_[k]
for k in range(self.n_outputs_))):
// Checking in case of constant strategy if the constant
// provided by the user is in y.
raise ValueError("The constant target value must be "
"present in training data")
if self.n_outputs_ == 1 and not self.output_2d_:
self.n_classes_ = self.n_classes_[0]
self.classes_ = self.classes_[0]
self.class_prior_ = self.class_prior_[0]
After Change
self.class_prior_) = class_distribution(y, sample_weight)
if self.strategy == "constant":
for k in range(self.n_outputs_):
if not any(constant[k][0] == c for c in self.classes_[k]):
// Checking in case of constant strategy if the constant
// provided by the user is in y.
err_msg = ("The constant target value must be present in "
"the training data. You provided constant={}. "
"Possible values are: {}."
.format(self.constant, list(self.classes_[k])))
raise ValueError(err_msg)
if self.n_outputs_ == 1 and not self.output_2d_:
self.n_classes_ = self.n_classes_[0]
self.classes_ = self.classes_[0]
self.class_prior_ = self.class_prior_[0]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: scikit-learn/scikit-learn
Commit Name: fcc2624ae4d70e050424b7786775e39c81357aa6
Time: 2019-09-09
Author: martinagonzalezvilas@gmail.com
File Name: sklearn/dummy.py
Class Name: DummyClassifier
Method Name: fit
Project Name: apache/incubator-mxnet
Commit Name: a960f5a6eb5b39b3e702b3be4c938a313fcec572
Time: 2020-04-07
Author: 40382964+Tommliu@users.noreply.github.com
File Name: python/mxnet/ndarray/numpy/_op.py
Class Name:
Method Name: vsplit
Project Name: apache/incubator-mxnet
Commit Name: a960f5a6eb5b39b3e702b3be4c938a313fcec572
Time: 2020-04-07
Author: 40382964+Tommliu@users.noreply.github.com
File Name: python/mxnet/ndarray/numpy/_op.py
Class Name:
Method Name: dsplit