SALib.sample.morris.brute module#
- class SALib.sample.morris.brute.BruteForce[source]#
Bases:
StrategyImplements the brute force optimisation strategy
Methods
brute_force_most_distant(input_sample, ...)Use brute force method to find most distant trajectories
check_input_sample(input_sample, num_params, ...)Check the input_sample is valid
compile_output(input_sample, num_samples, ...)Picks the trajectories from the input
compute_distance(m, l)Compute distance between two trajectories
compute_distance_matrix(input_sample, ...[, ...])Computes the distance between each and every trajectory
find_maximum(scores, N, k_choices)Finds the k_choices maximum scores from scores
find_most_distant(input_sample, num_samples, ...)Finds the 'k_choices' most distant choices from the 'num_samples' trajectories contained in 'input_sample'
mappable(combos, pairwise, distance_matrix)Obtains scores from the distance_matrix for each pairwise combination held in the combos array
nth(iterable, n[, default])Returns the nth item or a default value
run_checks(number_samples, k_choices)Runs checks on k_choices
sample(input_sample, num_samples, ...[, ...])Computes the optimum k_choices of trajectories from the input_sample.
grouper
- brute_force_most_distant(input_sample: ndarray, num_samples: int, num_params: int, k_choices: int, num_groups: int = None) List[source]#
Use brute force method to find most distant trajectories
- find_maximum(scores, N, k_choices)[source]#
Finds the k_choices maximum scores from scores
- Parameters:
scores (numpy.ndarray)
N (int)
k_choices (int)
- Return type:
- find_most_distant(input_sample: ndarray, num_samples: int, num_params: int, k_choices: int, num_groups: int = None) ndarray[source]#
Finds the ‘k_choices’ most distant choices from the ‘num_samples’ trajectories contained in ‘input_sample’
- Parameters:
input_sample (numpy.ndarray)
num_samples (int) – The number of samples to generate
num_params (int) – The number of parameters
k_choices (int) – The number of optimal trajectories
num_groups (int, default=None) – The number of groups
- Return type:
- static mappable(combos, pairwise, distance_matrix)[source]#
Obtains scores from the distance_matrix for each pairwise combination held in the combos array
- Parameters:
combos (numpy.ndarray)
pairwise (numpy.ndarray)
distance_matrix (numpy.ndarray)