MetOffice / XBTs_classification

Project for the classification of eXpendable Bathy Thermographs
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Build tensorflow classifiers #39

Open stevehadd opened 4 years ago

stevehadd commented 4 years ago

We're currently running in to a limitatin of scikit-learn when we want to deploy the trained model. One can pickle the classifier object, but this is not a robust way to save the trained model. https://scikit-learn.org/stable/modules/model_persistence.html

Other packages have better options for saving a trained model built in to the library, for example tensorflow. Tensor flow does not have a decision tree classifier, but does have a Gradient Boosted trees and random forest classifiers, which have shown similar results to DTs in scikit learn. We should thus try to move to using tensorflow (or other library potentially e.g. pyTorch, azure ML, AWS sagemaker etc.)

https://www.tensorflow.org/tutorials/estimator/boosted_trees https://www.tensorflow.org/api_docs/python/tf/estimator/BoostedTreesClassifier https://www.tensorflow.org/api_docs/python/tf/saved_model/save