GeoscienceAustralia / uncover-ml

Machine Learning system for Geoscience Australia uncover project
Apache License 2.0
30 stars 20 forks source link

Providing get_params and set_params to make cubist work in a pipeline #36

Closed ritviksahajpal closed 5 years ago

ritviksahajpal commented 6 years ago

Thanks for an excellent library. I had a query regarding using uncover-ml cubist functionality in a scikit pipeline. It seems like that it cannot be used in a pipeline because the functions set_params and get_params have not been implemented as per here: http://danielhnyk.cz/creating-your-own-estimator-scikit-learn/

Can you provide those? I am happy to submit a pull request as well if it is ok with the authors? Enabling pipeline usage will help with hyperparameter optimization as well.

thanks!

basaks commented 6 years ago

Hi @ritviksahajpal, cubist works with the uncoverml learn/predict pipeline. I have just tested it. We call the cubist binary using a system call in python. I can add some geotifs and a configuration file that worked for me. Will that help?

Any PR that will make this class fully scikit-learn compatible is most welcome.

basaks commented 6 years ago

@ritviksahajpal I have added some data in configs/data/ and you can use the configs/cubist.yaml to use that data as a test.

Change the path to the data and then use:

uncoverml learn /path/to/cubist.yaml -p 4
uncoverml predict /path/to/cubist.model -p 4
ritviksahajpal commented 6 years ago

thanks @basaks ! I will check these and update you