-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Docstring bootstrap plot #20166
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
Docstring bootstrap plot #20166
Changes from 3 commits
2a1e0d8
65fd12e
d783d20
da6ee1d
bb99426
b76ca7b
20cf017
d87f016
b2ab30f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -323,20 +323,49 @@ def f(t): | |
|
||
|
||
def bootstrap_plot(series, fig=None, size=50, samples=500, **kwds): | ||
"""Bootstrap plot. | ||
""" | ||
Bootstrap plot on mean, median and mid-range statistics. | ||
|
||
The bootstrap plot is used to estimate the uncertainty of a statistic | ||
by relaying on random sampling with replacement. This function will | ||
generate bootstrapping plots for mean, median and mid-range statistics | ||
for the given number of samples of the given size. | ||
|
||
Parameters | ||
---------- | ||
series: Time series | ||
fig: matplotlib figure object, optional | ||
size: number of data points to consider during each sampling | ||
samples: number of times the bootstrap procedure is performed | ||
kwds: optional keyword arguments for plotting commands, must be accepted | ||
by both hist and plot | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove newline. (should go right below the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this line still needs to be removed. |
||
series : pandas.Series | ||
Pandas Series from where to get the samplings for the bootstrapping. | ||
fig : matplotlib.figure.Figure, default None | ||
If given, it will use the `fig` reference for plotting instead of | ||
creating a new one with default parameters. | ||
size : int, default 50 | ||
Number of data points to consider during each sampling. It must be | ||
greater or equal than the length of the `series`. | ||
samples : int, default 500 | ||
Number of times the bootstrap procedure is performed. | ||
kwds : keywords | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dict, I think this needs to be **kwds. @TomAugspurger There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah we're doing Sorry @aydevosotros you can ignore the validation script here. Haven't updated it yet. |
||
Options to pass to matplotlib plotting method. | ||
|
||
Returns | ||
------- | ||
fig: matplotlib figure | ||
fig : matplotlib.figure.Figure | ||
Matplotlib figure | ||
|
||
See Also | ||
-------- | ||
pandas.DataFrame.plot : Basic plotting for DataFrame objects. | ||
pandas.Series.plot : Basic plotting for Series objects. | ||
|
||
Examples | ||
-------- | ||
|
||
.. plot:: | ||
:context: close-figs | ||
|
||
>>> import numpy as np | ||
>>> s = pd.Series(np.random.uniform(size=100)) | ||
>>> fig = pd.plotting.bootstrap_plot(s) | ||
""" | ||
import random | ||
import matplotlib.pyplot as plt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a wikipedia reference in Reference