TimeSeriesDataset¶
A time series dataset maps feature to a target column. It can be used to train machine learning models.
Data can be segmented into windows when loading it into the models.
Parent type: Dataset<Table, Column<Any?>>
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data |
union<Map<String, List<Any>>, Table> |
The data. | - |
targetName |
String |
The name of the target column. | - |
windowSize |
Int |
The number of consecutive sample to use as input for prediction. | - |
extraNames |
List<String>? |
Names of the columns that are neither features nor target. If null, no extra columns are used, i.e. all but the target column are used as features. | null |
forecastHorizon |
Int |
The number of time steps to predict into the future. | 1 |
continuous |
Boolean |
Whether or not to continue the forecast in the steps before forecast horizon. | false |
Examples:
pipeline example {
val dataset = TimeSeriesDataset(
{"time": [1, 2, 3], "feature": [4, 5, 6], "target": [1, 2, 3], "id": [1, 2, 3]},
targetName = "target",
windowSize = 1,
extraNames = ["id"]
);
}
Stub code in TimeSeriesDataset.sdsstub
continuous¶
True if the time series will make a continuous prediction.
Type: Boolean
extras¶
Additional columns of the time series dataset that are neither features nor target.
These can be used to store additional information about instances, such as IDs.
Type: Table
features¶
The feature columns of the time series dataset.
Type: Table
forecastHorizon¶
The number of time steps to predict into the future.
Type: Int
target¶
The target column of the time series dataset.
Type: Column<Any>
windowSize¶
The number of consecutive sample to use as input for prediction.
Type: Int
toTable¶
Return a new Table containing the feature columns, the target column and the extra columns.
The original TimeSeriesDataset is not modified.
Results:
| Name | Type | Description |
|---|---|---|
table |
Table |
A table containing the feature columns, the target column and the extra columns. |
Examples: