088b10a9b6621472af54635e761bda0dd775836f,Orange/classification/majority.py,MajorityLearner,__call__,#MajorityLearner#Any#,8
Before Change
return DefaultClassifier(data.domain, bn.nanmedian(y))
else:
n_values = data.domain.class_var.values()
if y.dtype != int:
nans = y.isnan()
y = np.array(y, dtype=int)
y[nans] = len(n_values)
if data.W.shape[-1] == 0:
distr = np.bincount(y, minlength=n_values)
else:
distr = np.bincount(y, data.W, minlength=n_values)
After Change
if N > 0:
dist /= sum(dist)
else:
dist.fill(1/len(dist))
return ConstantClassifier(data.domain, dist=dist)
class ConstantClassifier(classification.Classifier):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: biolab/orange3
Commit Name: 088b10a9b6621472af54635e761bda0dd775836f
Time: 2012-09-26
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/classification/majority.py
Class Name: MajorityLearner
Method Name: __call__
Project Name: Theano/Theano
Commit Name: b7d23606db54f1b60d0efae50922549234b20661
Time: 2017-07-31
Author: abergeron@gmail.com
File Name: theano/configdefaults.py
Class Name:
Method Name:
Project Name: Theano/Theano
Commit Name: f8a7c0edb2c4123d032fa32073c7356a7a17d9f0
Time: 2017-08-07
Author: stevenbocco@gmail.com
File Name: theano/configdefaults.py
Class Name:
Method Name: