Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Group analysis support#358

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
ConnectedSystems wants to merge14 commits intoSALib:experimental-methods
base:experimental-methods
Choose a base branch
Loading
fromConnectedSystems:group_printing
Draft
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
14 commits
Select commitHold shift + click to select a range
39563db
Merge branch 'experimental-methods' into group_printing
ConnectedSystemsSep 13, 2020
790cf5d
Pedantic change: expand header line
ConnectedSystemsSep 13, 2020
853864e
Merge branch 'problem-spec' into group_printing
ConnectedSystemsSep 13, 2020
2473045
Merge branch 'experimental-methods' into group_printing
ConnectedSystemsSep 14, 2020
9e85190
Merge branch 'experimental-methods' into group_printing
ConnectedSystemsSep 15, 2020
1c5fdd7
Merge branch 'experimental-methods' into group_printing
ConnectedSystemsSep 18, 2020
8bd2353
Remove unused function from import
ConnectedSystemsSep 18, 2020
e33e5ce
Replace check_groups with more general extract_groups
ConnectedSystemsSep 18, 2020
d904604
Support group analysis
ConnectedSystemsSep 18, 2020
6d54b73
Average effect across group members
ConnectedSystemsSep 18, 2020
ac59835
Updated morris to use common function
ConnectedSystemsSep 18, 2020
efc9641
Updated morris test to use common function
ConnectedSystemsSep 18, 2020
ca38472
Added warning for fractional factorial analysis method
ConnectedSystemsSep 18, 2020
718a69b
Sobol: Better handling of groups
ConnectedSystemsSep 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Remove unused function from import
  • Loading branch information
@ConnectedSystems
ConnectedSystems committedSep 18, 2020
commit8bd2353aba3627bc832e0e06d8738f503d9838f6
13 changes: 4 additions & 9 deletionssrc/SALib/analyze/morris.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@

from . import common_args
from ..util import (read_param_file, compute_groups_matrix, ResultDict,
_define_problem_with_groups, _compute_delta, _check_groups)
_define_problem_with_groups, _compute_delta)


def analyze(problem: Dict, X: np.ndarray, Y: np.ndarray,
Expand DownExpand Up@@ -78,13 +78,9 @@ def analyze(problem: Dict, X: np.ndarray, Y: np.ndarray,
delta = _compute_delta(num_levels)

num_vars = problem['num_vars']
groups = _check_groups(problem)
if not groups:
number_of_groups = num_vars
else:
groups, unique_group_names = compute_groups_matrix(groups)
number_of_groups = len(set(unique_group_names))
# End if

groups, unique_group_names = compute_groups_matrix(problem.get('groups'))
number_of_groups = len(unique_group_names)

num_trajectories = int(Y.size / (number_of_groups + 1))
trajectory_size = int(Y.size / num_trajectories)
Expand DownExpand Up@@ -127,7 +123,6 @@ def _compute_statistical_outputs(elementary_effects: np.ndarray, num_vars: int,
Si: ResultDict
Morris statistical parameters.
"""

Si = ResultDict((k, [None] * num_vars) for k in ['names', 'mu', 'mu_star',
'sigma', 'mu_star_conf'])

Expand Down
15 changes: 7 additions & 8 deletionssrc/SALib/sample/morris/morris.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@

from SALib.sample import common_args
from SALib.util import (scale_samples, read_param_file, compute_groups_matrix,
_define_problem_with_groups, _compute_delta, _check_groups)
_define_problem_with_groups, _compute_delta)


__all__ = ['sample']
Expand DownExpand Up@@ -112,7 +112,7 @@ def _sample_morris(problem: Dict, number_trajectories: int,
of factors

Parameters
----------
---------
problem : dict
The problem definition
number_trajectories : int
Expand All@@ -124,8 +124,7 @@ def _sample_morris(problem: Dict, number_trajectories: int,
-------
numpy.ndarray
"""
groups = _check_groups(problem)
group_membership, _ = compute_groups_matrix(groups)
group_membership, _ = compute_groups_matrix(problem.get('groups'))
_check_group_membership(group_membership)

num_params = group_membership.shape[0]
Expand All@@ -149,7 +148,7 @@ def _generate_trajectory(group_membership: np.ndarray,
both implied by the dimensions of `group_membership`

Parameters
----------
---------
group_membership : np.ndarray
a k-by-g matrix which notes factor membership of groups
num_levels : int, default=4
Expand DownExpand Up@@ -223,7 +222,7 @@ def _generate_p_star(num_groups: int) -> np.ndarray:
"""Describe the order in which groups move

Parameters
----------
---------
num_groups : int

Returns
Expand All@@ -243,7 +242,7 @@ def _generate_x_star(num_params: int, num_levels: int) -> np.ndarray:
:math:`\omega`

Parameters
----------
---------
num_params : int
The number of parameters (factors)
num_levels : int
Expand DownExpand Up@@ -274,7 +273,7 @@ def _compute_optimised_trajectories(problem: Dict, input_sample: int, N: int,
correct call here.

Parameters
----------
---------
problem : dict
The problem definition
input_sample :
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp