From 3358454f5a235fa98b47bf19e10301d1cd94e051 Mon Sep 17 00:00:00 2001 From: Ivan Nedosekov Date: Thu, 18 Aug 2022 17:33:16 +0300 Subject: [PATCH] tsfresh stubs --- etna/libs/tsfresh/distribution.pyi | 1 + etna/libs/tsfresh/relevance.pyi | 25 ++++++++++++++++++++++++ etna/libs/tsfresh/significance_tests.pyi | 6 ++++++ 3 files changed, 32 insertions(+) create mode 100644 etna/libs/tsfresh/distribution.pyi create mode 100644 etna/libs/tsfresh/relevance.pyi create mode 100644 etna/libs/tsfresh/significance_tests.pyi diff --git a/etna/libs/tsfresh/distribution.pyi b/etna/libs/tsfresh/distribution.pyi new file mode 100644 index 000000000..7eeb505f7 --- /dev/null +++ b/etna/libs/tsfresh/distribution.pyi @@ -0,0 +1 @@ +def initialize_warnings_in_workers(show_warnings: bool) -> None: ... diff --git a/etna/libs/tsfresh/relevance.pyi b/etna/libs/tsfresh/relevance.pyi new file mode 100644 index 000000000..79568ade1 --- /dev/null +++ b/etna/libs/tsfresh/relevance.pyi @@ -0,0 +1,25 @@ +from typing import List +from typing import Optional + +import pandas as pd + +def calculate_relevance_table( + X: pd.DataFrame, + y: pd.Series, + ml_task: str = ..., + multiclass: bool = ..., + n_significant: int = ..., + n_jobs: int = ..., + show_warnings: bool = ..., + chunksize: Optional[int] = ..., + test_for_binary_target_binary_feature: str = ..., + test_for_binary_target_real_feature: str = ..., + test_for_real_target_binary_feature: str = ..., + test_for_real_target_real_feature: str = ..., + fdr_level: float = ..., + hypotheses_independent: bool = ..., + ) -> pd.DataFrame: ... + +def infer_ml_task(y: pd.Series) -> str: ... +def combine_relevance_tables(relevance_tables: List[pd.DataFrame]) -> pd.DataFrame: ... +def get_feature_type(feature_column: pd.Series) -> str: ... diff --git a/etna/libs/tsfresh/significance_tests.pyi b/etna/libs/tsfresh/significance_tests.pyi new file mode 100644 index 000000000..bf589824a --- /dev/null +++ b/etna/libs/tsfresh/significance_tests.pyi @@ -0,0 +1,6 @@ +import pandas as pd + +def target_binary_feature_binary_test(x: pd.Series, y: pd.Series) -> float: ... +def target_binary_feature_real_test(x: pd.Series, y: pd.Series, test: str) -> float: ... +def target_real_feature_binary_test(x: pd.Series, y: pd.Series) -> float: ... +def target_real_feature_real_test(x: pd.Series, y: pd.Series) -> float: ...