cesium-ml / cesium

Machine Learning Time-Series Platform
Other
670 stars 101 forks source link

More `sklearn`-like API #243

Open bnaul opened 7 years ago

bnaul commented 7 years ago

Currently we have a functional API with static methods like build_model.build_model_from_featureset and predict.model_predictions. Not only are these a bit of a mouthful, they're also a bit unintuitive because of how differently they are used than the corresponding sklearn functionality. I suggest that we try to modify our API to be more like that of sklearn, specifically:

1) Add a Model class that wraps a sklearn model and provides an sklearn-like API (.fit, .predict, .predict_proba) for interacting with Featureset objects. 2) (optional) Also change featurize to behave more like an sklearn preprocessor; maybe you'd initialize a Featureset and call .transform on a dataset? This is less obvious but there's probably some improvement to be made here as well.

stefanv commented 7 years ago

I am very much in favor of this proposal.

acrellin commented 7 years ago

Me too, and would like to hear more about what you have in mind regarding point 2. :+1:

bnaul commented 7 years ago

e.g. http://scikit-learn.org/stable/modules/feature_extraction.html

arita37 commented 7 years ago

Additionnally, keeping api matching with Pandas and numpy would be a plus for better usage.