You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Time series classification is a critical capability beyond time series prediction, with extensive applications in industrial scenarios. Its typical paradigm is to input the recent sampling values of multiple measuring points, comprehensively judge the overall operating status of the equipment, and output a classification label for the current status. For example, it can be used for operating status classification of new energy battery pack equipment and other scenarios.
333
+
334
+
The AINode table model supports executing time series classification tasks by calling covariate classification models.
335
+
336
+
> Note: This feature is available starting from version V2.0.9.
337
+
338
+
1. **SQL Syntax**
339
+
```sql
340
+
SELECT * FROM CLASSIFY(
341
+
MODEL_ID,
342
+
INPUTS -- SQL to retrieve input variables
343
+
[TIMECOL,
344
+
MODEL_OPTIONS]?
345
+
)
346
+
```
347
+
348
+
* Parameter Description
349
+
350
+
| Parameter Name | Parameter Type | Parameter Attribute | Description | Required | Remarks |
| model_id | Scalar Parameter | String | Unique identifier of the model used for classification | Yes | - |
353
+
| inputs | Table Parameter | SET SEMANTIC | Input data to be classified. IoTDB will automatically sort the data in ascending chronological order before passing it to AINode. | Yes | Describes the input data to be classified via SQL; corresponding query errors will be thrown if the input SQL is invalid. |
354
+
| timecol | Scalar Parameter | String, Default: `time` | Name of the time column | No | Must be a column of TIMESTAMP type present in the `inputs` result set; otherwise, an error will be thrown. |
355
+
| model_options | Scalar Parameter | String, Default: Empty string | Model-related key-value pairs (e.g., whether input normalization is required). Different key-value pairs are separated by `;`. | No | Unsupported parameters for a specific model will be ignored without throwing errors. |
356
+
357
+
**Specifications**
358
+
359
+
***Input Data Requirements**
360
+
- Type Constraint: Only INT32, INT64, FLOAT, and DOUBLE data types are supported currently.
361
+
- Row Count Constraint: Varies by model. Errors will be thrown if the row count is below the minimum or above the maximum required by the model.
362
+
- Column Count Constraint**: Must include a time column. Univariate classification models support only one data column and will throw an error for multiple columns; multivariate classification models generally have no restrictions unless explicitly specified by the model itself.
363
+
- Order Constraint: Multivariate zero-shot classification models generally have no order restrictions unless explicitly specified by the model itself.
364
+
365
+
***Output Result**
366
+
The returned result is a table composed of time series data classification results, and its schema depends on the specific implementation of the model.
367
+
368
+
2. **Usage Example**
369
+
370
+
Suppose a project has 10time series variables with an input length of 192. The custom `mantis_custom` model is used as an example for time series classification inference.
371
+
372
+
* Model Registration
373
+
```sql
374
+
CREATE MODEL mantis_custom USING URI 'file:///path/to/mantis'
375
+
```
376
+
For detailed steps to register a custom model, refer to Section 4.3.
377
+
378
+
* Execute SQL
379
+
```sql
380
+
IoTDB:etth> SELECT * FROM CLASSIFY (
381
+
MODEL_ID => 'mantis_custom',
382
+
INPUTS => (
383
+
SELECT Time, HUFL,HULL,MUFL,MULL,LUFL,LULL,OT,UT,MT,LT
Time series classification is a critical capability beyond time series prediction, with extensive applications in industrial scenarios. Its typical paradigm is to input the recent sampling values of multiple measuring points, comprehensively judge the overall operating status of the equipment, and output a classification label for the current status. For example, it can be used for operating status classification of new energy battery pack equipment and other scenarios.
333
+
334
+
The AINode table model supports executing time series classification tasks by calling covariate classification models.
335
+
336
+
> Note: This feature is available starting from version V2.0.9.
337
+
338
+
1. **SQL Syntax**
339
+
```sql
340
+
SELECT * FROM CLASSIFY(
341
+
MODEL_ID,
342
+
INPUTS -- SQL to retrieve input variables
343
+
[TIMECOL,
344
+
MODEL_OPTIONS]?
345
+
)
346
+
```
347
+
348
+
* Parameter Description
349
+
350
+
| Parameter Name | Parameter Type | Parameter Attribute | Description | Required | Remarks |
| model_id | Scalar Parameter | String | Unique identifier of the model used for classification | Yes | - |
353
+
| inputs | Table Parameter | SET SEMANTIC | Input data to be classified. IoTDB will automatically sort the data in ascending chronological order before passing it to AINode. | Yes | Describes the input data to be classified via SQL; corresponding query errors will be thrown if the input SQL is invalid. |
354
+
| timecol | Scalar Parameter | String, Default: `time` | Name of the time column | No | Must be a column of TIMESTAMP type present in the `inputs` result set; otherwise, an error will be thrown. |
355
+
| model_options | Scalar Parameter | String, Default: Empty string | Model-related key-value pairs (e.g., whether input normalization is required). Different key-value pairs are separated by `;`. | No | Unsupported parameters for a specific model will be ignored without throwing errors. |
356
+
357
+
**Specifications**
358
+
359
+
***Input Data Requirements**
360
+
- Type Constraint: Only INT32, INT64, FLOAT, and DOUBLE data types are supported currently.
361
+
- Row Count Constraint: Varies by model. Errors will be thrown if the row count is below the minimum or above the maximum required by the model.
362
+
- Column Count Constraint**: Must include a time column. Univariate classification models support only one data column and will throw an error for multiple columns; multivariate classification models generally have no restrictions unless explicitly specified by the model itself.
363
+
- Order Constraint: Multivariate zero-shot classification models generally have no order restrictions unless explicitly specified by the model itself.
364
+
365
+
***Output Result**
366
+
The returned result is a table composed of time series data classification results, and its schema depends on the specific implementation of the model.
367
+
368
+
2. **Usage Example**
369
+
370
+
Suppose a project has 10time series variables with an input length of 192. The custom `mantis_custom` model is used as an example for time series classification inference.
371
+
372
+
* Model Registration
373
+
```sql
374
+
CREATE MODEL mantis_custom USING URI 'file:///path/to/mantis'
375
+
```
376
+
For detailed steps to register a custom model, refer to Section 4.3.
377
+
378
+
* Execute SQL
379
+
```sql
380
+
IoTDB:etth> SELECT * FROM CLASSIFY (
381
+
MODEL_ID => 'mantis_custom',
382
+
INPUTS => (
383
+
SELECT Time, HUFL,HULL,MUFL,MULL,LUFL,LULL,OT,UT,MT,LT
0 commit comments