Skip to content

Commit

Permalink
Make attribute fusion optional
Browse files Browse the repository at this point in the history
  • Loading branch information
arnedb committed May 27, 2022
1 parent 0522978 commit 29b8e47
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion tsfuse/construction/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def construct(
task="auto",
transformers="full",
max_depth=2,
series_fusion=True,
attribute_fusion=False,
return_graph=False,
**kwargs
):
Expand All @@ -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.
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion tsfuse/construction/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
GradientBoostingClassifier,
GradientBoostingRegressor,
)
from sklearn_gbmi import *


class TSFuseExtractor(object):
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 29b8e47

Please sign in to comment.