Created
July 17, 2017 20:22
-
-
Save gavi/0deabaacde665e73626634cefa482ba6 to your computer and use it in GitHub Desktop.
Convert Scikit-Learn model to CoreML .mlmodel file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Now lets export to .mlmodel format | |
import coremltools | |
coreml_model = coremltools.converters.sklearn.convert(clf,['Sepal.Length','Sepal.Width','Petal.Length','Petal.Width'],'Species') | |
coreml_model.author = 'Gavi Narra' | |
coreml_model.license = 'BSD' | |
coreml_model.short_description = 'Predicts the iris species provided the sepal length, sepal width, petal length and petal width.' | |
coreml_model.save('iris.mlmodel') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment