dssg / triage

General Purpose Risk Modeling and Prediction Toolkit for Policy and Social Good Problems
Other
182 stars 61 forks source link

Make a generic scaler class that can take a learner class as a parameter #860

Open ecsalomon opened 3 years ago

ecsalomon commented 3 years ago

More model types than LR should have scaled features, and scaling can aid in postmodeling analysis for all model types. Abstract the scaler that @shaycrk wrote and allow it to take a learner class (e.g., xgboost.XGBClassifier or sklearn.linear_model.LogisticRegression) and apply the same scaling at test and train.

ecsalomon commented 2 years ago

One potential implementation is to make scaling a top-level key in the config (with sklearn class and params) and to pass all learners to the scaler. Another option would be to make scaling an optional key for model grid.