---
title: "prediction(from:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/temporaltransformer/prediction(from:)"
---

# prediction(from:)

Performs a prediction on a single input.

## Declaration

```swift
func prediction<S, Label>(from input: S) async throws -> Self.OutputSequence where S : TemporalSequence, Label : Hashable, Self.Input == S.Feature, Self.Output == ClassificationDistribution<Label>
```

## Parameters

- `input`: The input feature.

## Return Value

Return Value A classification array.

## See Also

### Transforming and predicting

- [callAsFunction(_:eventHandler:)](createmlcomponents/temporaltransformer/callasfunction(_:eventhandler:).md)
- [callAsFunction(to:eventHandler:)](createmlcomponents/temporaltransformer/callasfunction(to:eventhandler:).md)
