Custom transformer to work with categorical variables
FactorLumpProp(prop = 0.05)
: Similar tofct_lump_prop()
in RFactorLumpN(top_n=5)
: Similar tofct_lump_n()
in R
Custom transformer DropHighlyCorrelated(threshold, candidate)
- Adapted from stackoverflow
Other utility functions
read_cp()
: read object using cloudpicklewrite_cp()
: write object using cloudpicklefind_lift()
: find lift and returns a dataframefind_prop()
: find the frequency and probability for apd.Series
Class FeatureImportance()
adapted from
- Soon,
OneHotEncoder()
will gain options to collapse infrequent factor levels - This code is a temporary solution when the new sklearn is not available
- Taekyun (TK) Kim: taekyunk@gmail.com