简体   繁体   中英

Custom MLModel File

I am new with machine learning and want to do following implementation

  • Want to create a custom .mlmodel with input of "xls or csv or nsdata of this files" and output should be double or array.
  • Pythone file should be able to read input data because i am going to use train_data from this input.
  • Pythone will do some calculation on this input data and provide prediction on this (i will do this calculation using sklearn,LinearRegression)

Can any one please help me how i can do this ?

You can use python to train your model with SKLearn as you suggested. This is a good post on getting started with that (make sure you use Sklearn and not Statsmodels).

https://towardsdatascience.com/simple-and-multiple-linear-regression-in-python-c928425168f9

When you have trained your model, you can convert it using Apple's coremltools:

https://github.com/apple/coremltools

When you've converted it you can add your .mlmodel file to your xcode project. You'll then need to write some code to get all of the your model inputs collected from your app and pass them as inputs to the model.

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM