Create ML

Create machine learning models for use in your app.


Use Create ML with familiar tools like Swift and macOS playgrounds to create and train custom machine learning models on your Mac. You can train models to perform tasks like recognizing images, extracting meaning from text, or finding relationships between numerical values.

Diagram showing how you use images, text, and other structured data with Create ML to train a Core ML model.

You train a model to recognize patterns by showing it representative samples. For example, you can train a model to recognize dogs by showing it lots of images of different dogs. After you’ve trained the model, you test it out on data it hasn’t seen before, and evaluate how well it performed the task. When the model is performing well enough, you’re ready to integrate it into your app using Core ML.

Diagram showing the Create ML workflow: Gather data, train the model, and evaluate the trained model.

Create ML leverages the machine learning infrastructure built in to Apple products like Photos and Siri. This means your image classification and natural language models are smaller and take much less time to train.


Computer Vision

Creating an Image Classifier Model

Train a machine learning model to classify images.

class MLImageClassifierBuilder

An Xcode playground UI that you use to train a model to classify images.

struct MLImageClassifier

A model you train to classify images programmatically.

Natural Language

Creating a Text Classifier Model

Train a machine learning model to classify natural language text.

struct MLTextClassifier

A model you train to classify natural language text.

struct MLWordTagger

A model you train to classify natural language text at the word level.

Categorization and Quantity Estimation

Models useful for more general tasks having to do with labeling information or estimating new quantities.

enum MLClassifier

A model you train to classify data into discrete categories.

enum MLRegressor

A model you train to estimate continuous values.

Model Evaluation

Improving Your Model’s Accuracy

Use metrics to tune the performance of your machine learning model.

struct MLClassifierMetrics

Metrics used to evaluate a classifier’s performance.

struct MLRegressorMetrics

Metrics used to evaluate a regressor’s performance.

Structured Data

Creating Data Tables for Training and Evaluation

Import and format data to create and evaluate a machine learning model.

struct MLDataTable

A table of data for training or evaluating a machine learning model.

enum MLDataValue

The value of a cell in a data table.


enum MLCreateError

Errors thrown by Create ML.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software