Skip to content

Add STLTransform #158

Merged
merged 7 commits into from
Oct 11, 2021
Merged

Add STLTransform #158

merged 7 commits into from
Oct 11, 2021

Conversation

Mr-Geekman
Copy link
Contributor

@Mr-Geekman Mr-Geekman commented Oct 8, 2021

IMPORTANT: Please do not create a Pull Request without creating an issue first.

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Proposed Changes

Add STLTransform class that subtracts trend and seasonal components.

Related Issue

#130.

Closing issues

Closes #130.

@Mr-Geekman Mr-Geekman added the enhancement New feature or request label Oct 8, 2021
@Mr-Geekman Mr-Geekman self-assigned this Oct 8, 2021
@Mr-Geekman Mr-Geekman marked this pull request as ready for review October 8, 2021 10:01
Copy link
Contributor

@martins0n martins0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

stl_kwargs: Optional[Dict[str, Any]] = None,
):
"""
Init _OneSegmentSTLTransform.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Init _OneSegmentSTLTransform.
Init STLTransform.

if isinstance(model, str):
if model == "arima":
self.model = ARIMA
model_kwargs = {"order": (1, 1, 0)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different default verisions in docstring and this line.

raise ValueError(f"Not a valid option for model: {model}")
elif isinstance(model, TimeSeriesModel):
self.model = model

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we shoud add else block too

@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2021

Codecov Report

Merging #158 (9018bdf) into master (9e9e0c4) will increase coverage by 0.11%.
The diff coverage is 93.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #158      +/-   ##
==========================================
+ Coverage   87.01%   87.12%   +0.11%     
==========================================
  Files          73       74       +1     
  Lines        3180     3239      +59     
==========================================
+ Hits         2767     2822      +55     
- Misses        413      417       +4     
Impacted Files Coverage Δ
etna/transforms/stl.py 93.10% <93.10%> (ø)
etna/transforms/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e9e0c4...9018bdf. Read the comment docs.

martins0n
martins0n previously approved these changes Oct 11, 2021
@martins0n martins0n merged commit 8d09303 into master Oct 11, 2021
@martins0n martins0n deleted the issue-130 branch October 11, 2021 12:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

STLTransform
3 participants