Create ML

Create machine learning models for use in your app.

Overview

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.

Topics

Computer Vision

Creating an Image Classifier Model

Train a machine learning model to classify images, and add it to your Core ML app.

struct MLImageClassifier

A model you train to classify images.

struct MLObjectDetector

A model you train to detect objects within an image.

Beta

Natural Language Processing

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 word tagging model you train to classify natural language text at the word level.

struct MLGazetteer

A collection of terms and their labels, which augments a tagger that analyzes natural language text.

Beta
struct MLWordEmbedding

Creates and saves a map of strings to vectors, enabling your app to find neighboring, similar strings.

Beta

Sound Classification

struct MLSoundClassifier

A structure used to train a model to classify audio data programmatically.

Beta

Activity Classification

struct MLActivityClassifier

A model you train to classify activities based on motion sensor data.

Beta

Tabular Data

Structures and models useful for more general tasks to do with labeling information, estimating new quantities, or finding similar observations.

Creating a Model from Tabular Data

Train a machine learning model by using Core ML to import and manage tabular data.

enum MLClassifier

A model you train to classify data into discrete categories.

enum MLRegressor

A model you train to estimate continuous values.

struct MLRecommender

A model you train to make recommendations based on item similarities, and optionally, user ratings.

Beta
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.

Model Accuracy

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.

Model Metadata

struct MLModelMetadata

Information about a model that’s stored in a Core ML model file.

Errors

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