---
title: "encode(_:to:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/lineartimeseriesforecaster/encode(_:to:)"
---

# encode(_:to:)

Encodes a fitted model.

## Declaration

```swift
func encode(_ model: LinearTimeSeriesForecaster<Scalar>.Transformer, to encoder: inout any EstimatorEncoder) throws
```
