---
title: MLRegressor
framework: createml
role: symbol
role_heading: Enumeration
path: createml/mlregressor
---

# MLRegressor

A model you train to estimate continuous values.

## Declaration

```swift
enum MLRegressor
```

## Mentioned in

Improving Your Model’s Accuracy

## Overview

Overview Use an MLRegressor to estimate continuous values like price, time, or temperature. A regressor differs from a classifier because it can predict output values not seen during the training process. By contrast, a classifier can only classify input into the categories you provide in the training data. For example, when estimating housing prices on Mars, a regressor can interpolate between the examples to estimate prices not seen during training. The figure below shows a linear regressor for Mars real-estate prices similar to the Integrating a Core ML Model into Your App sample.

In this case, there are no data points with three solar panels, but the regressor can make an informed prediction about the housing price. When you create an MLRegressor, Create ML inspects your data and automatically chooses a specific regressor (see Supporting Regressor Types).

## Topics

### Creating and training a regressor

- [init(trainingData:targetColumn:featureColumns:)](createml/mlregressor/init(trainingdata:targetcolumn:featurecolumns:).md)
- [targetColumn](createml/mlregressor/targetcolumn.md)
- [featureColumns](createml/mlregressor/featurecolumns.md)

### Evaluating a regressor

- [evaluation(on:)](createml/mlregressor/evaluation(on:).md)
- [trainingMetrics](createml/mlregressor/trainingmetrics.md)
- [validationMetrics](createml/mlregressor/validationmetrics.md)

### Testing a regressor

- [predictions(from:)](createml/mlregressor/predictions(from:).md)

### Saving a regressor

- [write(to:metadata:)](createml/mlregressor/write(to:metadata:).md)
- [write(toFile:metadata:)](createml/mlregressor/write(tofile:metadata:).md)

### Describing a regressor

- [model](createml/mlregressor/model.md)
- [description](createml/mlregressor/description.md)
- [debugDescription](createml/mlregressor/debugdescription.md)
- [playgroundDescription](createml/mlregressor/playgrounddescription.md)

### Regressor cases

- [MLRegressor.linear(_:)](createml/mlregressor/linear(_:).md)
- [MLRegressor.decisionTree(_:)](createml/mlregressor/decisiontree(_:).md)
- [MLRegressor.boostedTree(_:)](createml/mlregressor/boostedtree(_:).md)
- [MLRegressor.randomForest(_:)](createml/mlregressor/randomforest(_:).md)

### Supporting regressor types

- [MLLinearRegressor](createml/mllinearregressor.md)
- [MLDecisionTreeRegressor](createml/mldecisiontreeregressor.md)
- [MLRandomForestRegressor](createml/mlrandomforestregressor.md)
- [MLBoostedTreeRegressor](createml/mlboostedtreeregressor.md)

### Default Implementations

- [CustomDebugStringConvertible Implementations](createml/mlregressor/customdebugstringconvertible-implementations.md)
- [CustomPlaygroundDisplayConvertible Implementations](createml/mlregressor/customplaygrounddisplayconvertible-implementations.md)
- [CustomStringConvertible Implementations](createml/mlregressor/customstringconvertible-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomPlaygroundDisplayConvertible](swift/customplaygrounddisplayconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Escapable](swift/escapable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Tabular models

- [Creating a model from tabular data](createml/creating-a-model-from-tabular-data.md)
- [MLClassifier](createml/mlclassifier.md)
- [MLRecommender](createml/mlrecommender.md)
