Skip to content

Commit 7387200

Browse files
authored
Merge pull request statsmodels#8862 from bashtage/statespace-internet-docs
DOC: Small additional fixes
2 parents cbccff8 + 977751d commit 7387200

File tree

5 files changed

+34
-37
lines changed

5 files changed

+34
-37
lines changed

docs/source/release/version0.14.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ was already in statsmodels main and how much usage it has already
2121
seen. If there are specific known problems or limitations, then they
2222
are mentioned in the docstrings.
2323

24-
Stats
25-
-----
24+
Github Stats
25+
------------
2626
**Issues Closed**: 248
2727

2828
**Pull Requests Merged**: 335

statsmodels/distributions/copula/copulas.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def rvs(self, nobs=1, cop_args=None, marg_args=None, random_state=None):
6464
to be a list of tuples with the same length has the number of
6565
marginal distributions. The list can contain empty tuples for
6666
marginal distributions that do not take parameter arguments.
67-
random_state : {None, int, `numpy.random.Generator`}, optional
67+
random_state : {None, int, numpy.random.Generator}, optional
6868
If `seed` is None then the legacy singleton NumPy generator.
6969
This will change after 0.13 to use a fresh NumPy ``Generator``,
7070
so you should explicitly pass a seeded ``Generator`` if you
@@ -277,7 +277,7 @@ def rvs(self, nobs=1, args=(), random_state=None):
277277
args : tuple
278278
Arguments for copula parameters. The number of arguments depends
279279
on the copula.
280-
random_state : {None, int, `numpy.random.Generator`}, optional
280+
random_state : {None, int, numpy.random.Generator}, optional
281281
If `seed` is None then the legacy singleton NumPy generator.
282282
This will change after 0.13 to use a fresh NumPy ``Generator``,
283283
so you should explicitly pass a seeded ``Generator`` if you
@@ -371,7 +371,7 @@ def plot_scatter(self, sample=None, nobs=500, random_state=None, ax=None):
371371
is generated.
372372
nobs : int, optional
373373
Number of samples to generate from the copula.
374-
random_state : {None, int, `numpy.random.Generator`}, optional
374+
random_state : {None, int, numpy.random.Generator}, optional
375375
If `seed` is None then the legacy singleton NumPy generator.
376376
This will change after 0.13 to use a fresh NumPy ``Generator``,
377377
so you should explicitly pass a seeded ``Generator`` if you

statsmodels/robust/norms.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,12 @@ def rho(self, z):
406406
Returns
407407
-------
408408
rho : ndarray
409-
rho(z) = a**2 *(1-cos(z/a)) for \|z\| <= a*pi
409+
The elements of rho are defined as:
410410
411-
rho(z) = 2*a for \|z\| > a*pi
411+
.. math::
412+
413+
rho(z) & = a^2 *(1-cos(z/a)), |z| \leq a\pi \\
414+
rho(z) & = 2a, |z|>q\pi
412415
"""
413416

414417
a = self.a
@@ -878,7 +881,7 @@ class MQuantileNorm(RobustNorm):
878881
in QuantileRegression but replaces the L1 absolute value by a chosen
879882
base norm.
880883
881-
rho_q(u) = |q - I(q < 0)| * rho_base(u)
884+
rho_q(u) = abs(q - I(q < 0)) * rho_base(u)
882885
883886
or, equivalently,
884887
@@ -919,8 +922,6 @@ class MQuantileNorm(RobustNorm):
919922
.. [*] Newey, Whitney K., and James L. Powell. 1987. “Asymmetric Least
920923
Squares Estimation and Testing.” Econometrica 55 (4): 819–47.
921924
doi:10.2307/1911031.
922-
...
923-
924925
"""
925926

926927
def __init__(self, q, base_norm):

statsmodels/tsa/statespace/kalman_filter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,8 +1168,7 @@ def simulate(self, nsimulations, measurement_shocks=None,
11681168
Whether or not to return the simulator object. Typically used to
11691169
improve performance when performing repeated sampling. Default is
11701170
False.
1171-
random_state : {None, int, `numpy.random.Generator`,
1172-
`numpy.random.RandomState`}, optional
1171+
random_state : {None, int, Generator, RandomState}, optionall
11731172
If `seed` is None (or `np.random`), the `numpy.random.RandomState`
11741173
singleton is used.
11751174
If `seed` is an int, a new ``RandomState`` instance is used,

statsmodels/tsa/statespace/simulation_smoother.py

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ def check_random_state(seed=None):
2424
"""Turn `seed` into a `numpy.random.Generator` instance.
2525
Parameters
2626
----------
27-
seed : {None, int, `numpy.random.Generator`,
28-
`numpy.random.RandomState`}, optional
29-
If `seed` is None the `numpy.random.Generator` singleton is used.
30-
If `seed` is an int, a new ``Generator`` instance is used,
31-
seeded with `seed`.
32-
If `seed` is already a ``Generator`` or ``RandomState`` instance then
33-
that instance is used.
27+
seed : {None, int, Generator, RandomState}, optional
28+
If `seed` is None (or `np.random`), the `numpy.random.RandomState`
29+
singleton is used.
30+
If `seed` is an int, a new ``numpy.random.RandomState`` instance
31+
is used, seeded with `seed`.
32+
If `seed` is already a ``numpy.random.Generator`` or
33+
``numpy.random.RandomState`` instance then that instance is used.
3434
Returns
3535
-------
3636
seed : {`numpy.random.Generator`, `numpy.random.RandomState`}
@@ -210,14 +210,13 @@ class must extend from `SimulationSmoothResults`.
210210
than -1, only simulation will be performed (i.e. simulation
211211
smoothing will not be performed), so that only the `generated_obs`
212212
and `generated_state` attributes will be available.
213-
random_state : {None, int, `numpy.random.Generator`,
214-
`numpy.random.RandomState`}, optional
213+
random_state : {None, int, Generator, RandomState}, optional
215214
If `seed` is None (or `np.random`), the `numpy.random.RandomState`
216215
singleton is used.
217-
If `seed` is an int, a new ``RandomState`` instance is used,
218-
seeded with `seed`.
219-
If `seed` is already a ``Generator`` or ``RandomState`` instance
220-
then that instance is used.
216+
If `seed` is an int, a new ``numpy.random.RandomState`` instance
217+
is used, seeded with `seed`.
218+
If `seed` is already a ``numpy.random.Generator`` or
219+
``numpy.random.RandomState`` instance then that instance is used.
221220
**kwargs
222221
Additional keyword arguments, used to set the simulation output.
223222
See `set_simulation_output` for more details.
@@ -298,14 +297,13 @@ class SimulationSmoothResults:
298297
A Statespace representation
299298
simulation_smoother : {{prefix}}SimulationSmoother object
300299
The Cython simulation smoother object with which to simulation smooth.
301-
random_state : {None, int, `numpy.random.Generator`,
302-
`numpy.random.RandomState`}, optional
300+
random_state : {None, int, Generator, RandomState}, optional
303301
If `seed` is None (or `np.random`), the `numpy.random.RandomState`
304302
singleton is used.
305-
If `seed` is an int, a new ``RandomState`` instance is used,
306-
seeded with `seed`.
307-
If `seed` is already a ``Generator`` or ``RandomState`` instance
308-
then that instance is used.
303+
If `seed` is an int, a new ``numpy.random.RandomState`` instance
304+
is used, seeded with `seed`.
305+
If `seed` is already a ``numpy.random.Generator`` or
306+
``numpy.random.RandomState`` instance then that instance is used.
309307
310308
Attributes
311309
----------
@@ -606,14 +604,13 @@ def simulate(self, simulation_output=-1,
606604
then it is assumed to contain draws from the standard Normal
607605
distribution that must be transformed using the `initial_state_cov`
608606
covariance matrix. Default is False.
609-
random_state : {None, int, `numpy.random.Generator`,
610-
`numpy.random.RandomState`}, optional
607+
random_state : {None, int, Generator, RandomState}, optional
611608
If `seed` is None (or `np.random`), the `numpy.random.RandomState`
612609
singleton is used.
613-
If `seed` is an int, a new ``RandomState`` instance is used,
614-
seeded with `seed`.
615-
If `seed` is already a ``Generator`` or ``RandomState`` instance
616-
then that instance is used.
610+
If `seed` is an int, a new ``numpy.random.RandomState`` instance
611+
is used, seeded with `seed`.
612+
If `seed` is already a ``numpy.random.Generator`` or
613+
``numpy.random.RandomState`` instance then that instance is used.
617614
disturbance_variates : bool, optional
618615
Deprecated, please use pretransformed_measurement_shocks and
619616
pretransformed_state_shocks instead.

0 commit comments

Comments
 (0)