sktime/sktime

[ENH] Integrate pypots for Partially Observed Time Series (POTS) as Imputers in sktime

Open

#7.895 aberto em 25 de fev. de 2025

Ver no GitHub
 (13 comments) (0 reactions) (0 assignees)Python (1.192 forks)batch import
enhancementgood first issueinterfacing algorithmsmodule:transformations

Métricas do repositório

Stars
 (7.162 stars)
Métricas de merge de PR
 (Mesclagem média 26d 10h) (86 fundiu PRs em 30d)

Description

Updated by @fkiraly.

This issue is a request to integrate the pypots framework into sktime - the type would be transformers, since imputers are transformers.

Interfacing estimators guide: https://www.sktime.net/en/latest/developer_guide/add_estimators.html

The right extension template is probably the transformer_simple template: https://github.com/sktime/sktime/blob/main/extension_templates/transformer_simple.py

For implementation details, I would suggest:

  • setting the tests:vm tag as true, since pypots would be a dependency occurring only in a single estimator
  • moving the current impute module to a private _impute file inside an impute folder
  • adding _pypots as an alternative imputation option, and exporting the classes there

One question also is, pypots does multi-series imputation, so should we ultimately move the impute module into the root of transformations?

There also is an abandoned PR here, in #7916 - it does some things well, but the internals look a bit AI generated (e.g., boilerplate is replicated and it seems it assumes the scikit-learn interface, not the sktime API).

So maybe it is a better idea to start from scratch.


Original post by @Spinachboul :

Is your feature request related to a problem? Please describe. Handling Partially Observed Time Series (POTS) is a common challenge in real-world scenarious. Currently Sktime lacks the native support for models specifically designed to handle POTS The pypots library offers specialized models for imputation and forecasting on partially observed time series. Integrating pypots into sktime would extend its capabilities, for users dealing with incomplete datasets, and provide more robust solutions for missing data..

Describe the solution you'd like Integrate pyplots into sktime as part of series-to-series transformers network, specifically under imputers. Since many pypost models can also be used for forecasting, the integration should consider the following:

  • Designing the interface so that pypots models can act as imputers while enabling potential forecasting use cases.
  • Investigating if common neural network components, in pypots can be factored out to create multi-purpose models (usable for both imputation and forecasting)
  • Evaluating whether pypots is compatible with imputation-by-forecasting strategies, and if so, aligning the integration with sktime's forecasting API, which will serve the users with dual features..

For context, you can checkout this official documentation of PyPots : https://pypots.com/ Also you can checkout their CodeBase: https://github.com/WenjieDu/PyPOTS Additionally, you can checkout the BaseImputer class (which needs to interfaced) : https://github.com/WenjieDu/PyPOTS/blob/8c89c1a19ef0d7d7e8bcbbba594c0956fa2ea81e/pypots/imputation/base.py#L4

Guia do colaborador