paddlets.models.utils
- get_target_from_tsdataset(tsdataset: TSDataset)[source]
Just reserve target in tsdataset.
- Parameters
tsdataset (TSDataset) – Data to be converted.
- check_tsdataset(tsdataset: TSDataset)[source]
Ensure the robustness of input data (consistent feature order), at the same time, check whether the data types are compatible. If not, the processing logic is as follows.
1> Integer: Convert to np.int64.
2> Floating: Convert to np.float32.
3> Missing value: Warning.
4> Other: Illegal.
- Parameters
tsdataset (TSDataset) – Data to be checked.
- to_tsdataset(scenario: str = 'forecasting') Callable[[...], Callable[[...], TSDataset]][source]
A decorator, used for converting ndarray to tsdataset (compatible with both DL and ML, compatible with both forecasting and anomaly).
- Parameters
scenario (str) – The task type. [“forecasting”, “anomaly_label”, “anomaly_score”] is optional.
- Returns
Wrapped core function.
- Return type
Callable[…, Callable[…, TSDataset]]