37f1544cb19794294029aa64e7b119b69ef09f51,category_encoders/basen.py,BaseNEncoder,fit,#BaseNEncoder#Any#Any#,92
Before Change
// drop all output columns with 0 variance.
if self.drop_invariant:
self.drop_cols = []
X_temp = self.transform(X)
generated_cols = util.get_generated_cols(X, X_temp, self.cols)
self.drop_cols = [x for x in generated_cols if X_temp[x].var() <= 10e-5]
return self
After Change
self.drop_cols = []
generated_cols = util.get_generated_cols(X, X_temp, self.cols)
self.drop_cols = [x for x in generated_cols if X_temp[x].var() <= 10e-5]
try:
[self.feature_names.remove(x) for x in self.drop_cols]
except KeyError as e:
if self.verbose > 0:
print("Could not remove column from feature names."
"Not found in generated cols.\n{}".format(e))
return self
def transform(self, X, override_return_df=False):
Perform the transformation to new categorical data.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 37f1544cb19794294029aa64e7b119b69ef09f51
Time: 2018-11-20
Author: contact@againstthecurrent.ch
File Name: category_encoders/basen.py
Class Name: BaseNEncoder
Method Name: fit
Project Name: biolab/orange3
Commit Name: ee27c11166d39aafb9bf6196a037346c73ed2ae6
Time: 2015-02-20
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/preprocess/transformation.py
Class Name: Transformation
Method Name: __call__
Project Name: beancount/smart_importer
Commit Name: e8ae9c212e4d274b3254d292adc4347f78e0499e
Time: 2018-08-19
Author: johannesjh@users.noreply.github.com
File Name: smart_importer/predict_postings.py
Class Name: PredictPostings
Method Name: enhance_transactions