CreateML on iOS

Hi everyone! In my app I need to re-train my MLRecommendation model everyday based on user data. Can I use Create ML directly from iOS or how to use Core ML for this task?

CreateML is simply a nice looking UI to make it easier for train machine learning models, thus it cannot be called on in your codebase. CoreML is the framework which allows you to integrate the models into your application. CoreML is a pretty strong framework that allows user specific model "tweaking/personalization" and even full retraining (although be cautious with the latter). You could manually acquire the data you wish to train on, and retain everyday using CreateML, although this might be quite tedious depending on the size of your data. You could manually train the model using the CoreML framework which would give you more flexibility but would require much more code on you behalf. If you have the time, check out https://machinethink.net/blog/coreml-training-part1/. This blog is one of the most useful resources on the internet related to CoreML information

Side Note: From a general machine learning standpoint, it may not be in your best interest to retrain your model everyday on new data. This of course depends on your particular problem, but you may encounter time bias in some of your models if you approach the problem this way. Good luck.

As of iOS 15 (beta), CreateML can be used within an app to create (or replace) a model within the app, with access to prediction accuracy to determine whether the latest training improves on a previous model.  This requires Xcode 13 (beta) and Mac OS Monterey (beta).  There's also a new TabularData framework that works similarly to CreateML for data input (e.g. from CSV), but appears to have expanded features (not that I've explored them all).

CreateML is a set of types and methods for ingesting data, preprocessing those data (e.g. filtering, mapping, transforming), then using the data for training models. Typically, a user would not be aware that these actions are taking place, so it's not, strictly speaking, a UI (i.e there's nothing on-screen). TabularData is an alternative to CreateML's ingestion and preprocessing features, although there are some annoying issues (beta??).

I'm trying this out (e.g. time prediction) with a running app that I've developed over the years, and for which I have a lot of historical data. It makes sense to retrain the model after running a new course and also every few weeks as the user improves (or, in my case, degrades).

Good luck and regards, Michaela

CreateML on iOS
 
 
Q