Skip to content

Fix bugs and documentation for stl_plot #685

Merged
merged 4 commits into from
May 12, 2022
Merged

Fix bugs and documentation for stl_plot #685

merged 4 commits into from
May 12, 2022

Conversation

Mr-Geekman
Copy link
Contributor

@Mr-Geekman Mr-Geekman commented May 11, 2022

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

Look #667

Related Issue

#667

Closing issues

Closes #667

@Mr-Geekman Mr-Geekman added bug Something isn't working documentation Improvements or additions to documentation labels May 11, 2022
@Mr-Geekman Mr-Geekman self-assigned this May 11, 2022
@Mr-Geekman Mr-Geekman changed the title Fix bugs for stl_plot Fix bugs and documentation for stl_plot May 11, 2022
@Mr-Geekman
Copy link
Contributor Author

Example script:

import pandas as pd
import matplotlib.pyplot as plt

from etna.datasets import TSDataset
from etna.analysis import stl_plot


df = pd.read_csv("examples/data/example_dataset.csv")
df = TSDataset.to_dataset(df)
ts = TSDataset(df, freq="D")

stl_plot(ts=ts, segments=["segment_a"], period=7)
plt.savefig("plot_one_segment.png")

stl_plot(ts=ts, segments=["segment_a", "segment_b"], period=7)
plt.savefig("plot_two_segments.png")

stl_plot(ts=ts, segments=["segment_a", "segment_b", "segment_c"], period=7)
plt.savefig("plot_three_segments.png")

stl_plot(ts=ts, period=7)
plt.savefig("plot_four_segments.png")

plot_one_segment:
plot_one_segment

plot_two_segments:
plot_two_segments

plot_three_segments:
plot_three_segments

plot_four_
plot_four_segments
segments:

@github-actions
Copy link

github-actions bot commented May 11, 2022

🚀 Deployed on https://deploy-preview-685--etna-docs.netlify.app

@github-actions github-actions bot temporarily deployed to pull request May 11, 2022 15:22 Inactive
@codecov-commenter
Copy link

codecov-commenter commented May 11, 2022

Codecov Report

Merging #685 (cf95be1) into master (672a60a) will increase coverage by 0.12%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #685      +/-   ##
==========================================
+ Coverage   83.69%   83.81%   +0.12%     
==========================================
  Files         119      119              
  Lines        6401     6402       +1     
==========================================
+ Hits         5357     5366       +9     
+ Misses       1044     1036       -8     
Impacted Files Coverage Δ
etna/analysis/eda_utils.py 48.65% <0.00%> (-0.17%) ⬇️
etna/transforms/nn/pytorch_forecasting.py 95.23% <0.00%> (+4.76%) ⬆️
etna/models/nn/tft.py 100.00% <0.00%> (+8.19%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@martins0n martins0n self-requested a review May 12, 2022 07:45
@martins0n
Copy link
Contributor

5. Replace lines with axes preparation with `prepare_axes` from utils

What does it mean, should we fix it?

@github-actions github-actions bot temporarily deployed to pull request May 12, 2022 08:29 Inactive
@Mr-Geekman
Copy link
Contributor Author

I haven't figured out how to do it with current prepare_axes because in this particular plot we need firstly to create subfigures and just after this create subplots.

I am planning to change prepare_axes a little for a #663 but it make it suitable for this plot.

@github-actions github-actions bot temporarily deployed to pull request May 12, 2022 09:02 Inactive
@martins0n martins0n enabled auto-merge (squash) May 12, 2022 09:03
@martins0n martins0n merged commit 290cb3c into master May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some fixes for stl_plot
3 participants