Skip to content

Commit 261ab3e

Browse files
committed
Updated morris docstring with groups and optimal trajectories
1 parent c4a7ae0 commit 261ab3e

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

SALib/sample/morris/__init__.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ def sample(problem, N, num_levels, grid_jump, optimal_trajectories=None,
5353
"""Generate model inputs using the Method of Morris
5454
5555
Returns a NumPy matrix containing the model inputs required for Method of
56-
Morris. The resulting matrix has :math:`(D+1)*N` rows and :math:`D`
57-
columns, where :math:`D` is the number of parameters. These model inputs
58-
are intended to be used with :func:`SALib.analyze.morris.analyze`.
56+
Morris. The resulting matrix has :math:`(G+1)*T` rows and :math:`D`
57+
columns, where :math:`D` is the number of parameters, :math:`G` is the
58+
number of groups (if no groups are selected, the number of parameters).
59+
:math:`T` is the number of trajectories :math:`N`,
60+
or `optimal_trajectories` if selected.
61+
These model inputs are intended to be used with
62+
:func:`SALib.analyze.morris.analyze`.
5963
6064
Parameters
6165
----------
@@ -79,8 +83,8 @@ def sample(problem, N, num_levels, grid_jump, optimal_trajectories=None,
7983
-------
8084
sample : numpy.ndarray
8185
Returns a numpy.ndarray containing the model inputs required for Method
82-
of Morris. The resulting matrix has :math:`(D+1)*N` rows and :math:`D`
83-
columns, where :math:`D` is the number of parameters.
86+
of Morris. The resulting matrix has :math:`(G/D+1)*N/T` rows and
87+
:math:`D` columns, where :math:`D` is the number of parameters.
8488
"""
8589
if grid_jump >= num_levels:
8690
raise ValueError("grid_jump must be less than num_levels")
@@ -161,8 +165,9 @@ def _sample_oat(problem, N, num_levels, grid_jump):
161165
def _sample_groups(problem, N, num_levels, grid_jump):
162166
"""Generate trajectories for groups
163167
164-
Returns an N(g+1)-by-k array of N trajectories;
165-
where g is the number of groups and k is the number of factors
168+
Returns an :math:`N(g+1)`-by-:math:`k` array of `N` trajectories,
169+
where :math:`g` is the number of groups and :math:`k` is the number
170+
of factors
166171
167172
Arguments
168173
---------

0 commit comments

Comments
 (0)