Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Added example to plot_series & fixed example for plot_lags #3400

Merged
merged 13 commits into from
Sep 18, 2022
Merged
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,15 @@
"test"
]
},
{
"login": "shagn",
"name": "Sebastian Hagn",
"avatar_url": "https://avatars.githubusercontent.com/u/16029092?v=4",
"profile": "https://github.com/shagn",
"contributions": [
"doc",
]
},
],
"projectName": "sktime",
"projectOwner": "alan-turing-institute",
Expand Down
1 change: 1 addition & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ Virtual environments
~~~~~~~~~~~~~~~~~~~~

Two good options for virtual environment managers are:

* `conda <https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/20/conda/>`_ (many sktime community members us this)
* `venv <https://realpython.com/python-virtual-environments-a-primer/>`_ (also quite good!).

Expand Down
10 changes: 10 additions & 0 deletions sktime/registry/_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ def all_estimators(
passed in return_tags will serve as column names for all columns of
tags that were optionally requested.

Examples
--------
>>> from sktime.registry import all_estimators
>>> # return a complete list of estimators as pd.Dataframe
>>> all_estimators(as_dataframe=True)
>>> # return all forecasters by filtering for estimator type
>>> all_estimators("forecaster")
>>> # return all forecasters which handle missing data in the input by tag filtering
>>> all_estimators("forecaster", filter_tags={"handles-missing-data": True})

References
----------
Modified version from scikit-learn's `all_estimators()`.
Expand Down
15 changes: 15 additions & 0 deletions sktime/utils/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ def plot_series(
-------
fig : plt.Figure
ax : plt.Axis

Examples
--------
>>> from sktime.utils.plotting import plot_series
>>> from sktime.datasets import load_airline
>>> y = load_airline()
>>> fig, ax = plot_series(y)
"""
_check_soft_dependencies("matplotlib", "seaborn")
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -159,6 +166,7 @@ def plot_lags(series, lags=1, suptitle=None):

Examples
--------
>>> from sktime.utils.plotting import plot_lags
>>> from sktime.datasets import load_airline
>>> y = load_airline()
>>> fig, ax = plot_lags(y, lags=2) # plot of y(t) with y(t-2) # doctest: +SKIP
Expand Down Expand Up @@ -266,6 +274,13 @@ def plot_correlations(

axes : np.ndarray
Array of the figure's Axe objects

Examples
--------
>>> from sktime.utils.plotting import plot_correlations
>>> from sktime.datasets import load_airline
>>> y = load_airline()
>>> fig, ax = plot_correlations(y)
"""
_check_soft_dependencies("matplotlib")
import matplotlib.pyplot as plt
Expand Down