-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Is your feature request related to a problem? Please describe.
Chaining of methods is generally easier to read compared to nested functions.
# Nested functions
best_dt = ensemble_model(tune_model(create_model('dt'), choose_better=True), choose_better=True)Describe the solution you'd like
Chaining of methods in OOP API. Example here
best_model = (
experiment
.create_model('lr')
.tune_model(choose_better=True)
.ensemble_model(choose_better=True)
)Additional context
- We could provide an argument in setup called
enable_chaining = Truethat will switch from returning the models to returning the experiment object which will enable the chaining. - Also, internally, we will have to store the results from all steps so that they can be referenced in the next step.