-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SegmentedRegressionModel #32
Conversation
If not a Series it should refer to a column in the choosers table. We're usually passing in a column from the choosers table anyway, so it makes sense to allow it to be specified this way.
This is somewhere between a RegressionModel and the RegressionModelGroup. Unlike the group the individual models are not fully configurable: only the model expression and ytransform can be customized. Fit and predict filters are global across all segments. YAML interface is still to be done.
Changes Unknown when pulling dcd1e24 on segmented-regression into * on master*. |
Changes Unknown when pulling 8e0ddb8 on segmented-regression into * on master*. |
Another feature of |
Changes Unknown when pulling 7f7b16d on segmented-regression into * on master*. |
This appears to be working with my workflow where I edit the yaml directly. The biggest issue was when using numpy types as the segmented keys (when building_type_ids are ints). Also edited the yamlmodelrunner to peek into the config file and choose the segmented or non-segmented model based on the model_type. I will definitely be making these segmented models most of the time so I'm not sure if the forking strategy is really necessary.
Adding the segmented regression model.
This adds a
SegmentedRegressionModel
class that falls in between a singleRegressionModel
and aRegressionModelGroup
in terms of configurability. As withRegressionModelGroup
you can specify models individually per segment, but filters apply globally across all segments and are in fact applied before doing and fit or prediction on the segments.The
SegmentedRegressionModel
may optionally be configured with a default model and ytransform that can be overridden for individual segments.