diff --git a/tsfuse/construction/__init__.py b/tsfuse/construction/__init__.py index 98bc963..6953779 100755 --- a/tsfuse/construction/__init__.py +++ b/tsfuse/construction/__init__.py @@ -11,6 +11,8 @@ def construct( task="auto", transformers="full", max_depth=2, + series_fusion=True, + attribute_fusion=False, return_graph=False, **kwargs ): @@ -32,6 +34,10 @@ def construct( transformers. max_depth : int, default: 2 Maximum computation graph depth. + series_fusion : bool, defaut: True + Construct features that use time series fusion. + attribute_fusion : bool, defaut: True + Construct features that use attribute fusion. return_graph : bool, default: False Return computation graph. @@ -44,7 +50,12 @@ def construct( Only returned if ``return_graph == True`` """ extractor = TSFuseExtractor( - transformers=transformers, task=task, max_depth=max_depth, **kwargs + transformers=transformers, + task=task, + max_depth=max_depth, + series_fusion=series_fusion, + attribute_fusion=attribute_fusion, + **kwargs ) features = extractor.fit_transform(X, pd.Series(y)) if return_graph: diff --git a/tsfuse/construction/algorithm.py b/tsfuse/construction/algorithm.py index 99f317e..6985b76 100644 --- a/tsfuse/construction/algorithm.py +++ b/tsfuse/construction/algorithm.py @@ -17,7 +17,6 @@ GradientBoostingClassifier, GradientBoostingRegressor, ) -from sklearn_gbmi import * class TSFuseExtractor(object): @@ -444,6 +443,8 @@ def check_non_redundant_series(transformer_stats): return selected def select_interactions(self, data, y, permutations): + from sklearn_gbmi import h + # Collect data for the nodes in the permutations only permutations_nodes = set() for permutation in permutations: