h2oai / wave-apps

Sample AI Apps built with H2O Wave.
MIT License
144 stars 51 forks source link

Refactor insurance churn risk to use wave-ml #61

Closed vopani closed 3 years ago

vopani commented 3 years ago

Using Wave ML

Bare minimum refactoring to use wave-ml for modelling. There is more that can be done but this is a good place to start. Part of #41

Have tested this locally ✅

cc: @mtanco @geomodular

vopani commented 3 years ago

Looks great Rohan. I see self.wave_model.predict() could have been used but test_dataset_path would have needed to be loaded twice because of predict_contribution(). We should be able to accept H2O frame, no?

The test dataset is also required in some other methods of the class like _get_explanation so instead of loading twice, I kept it separate.

I think we can do an updated refactor of this once we bring in the interpretability part into Wave ML, then we can remove all those other methods altogether and just use Wave ML for everything.

vopani commented 3 years ago

@mtanco This is ready to be merged. Things to note: