rapid.robustness.analysis package¶
Submodules¶
rapid.robustness.analysis.comparisons module¶
Compares robustness values
Contains (1) a function for showing how a different set of scenarios affects the robustness values and robustness rankings; and (2) a function for showing how different robustness metrics affects the robustness values and robustness rankings.
Also contains a helper function for creating basic visualisations of the effects of scenarios and robustness metrics.
-
rapid.robustness.analysis.comparisons.R_metric_similarity(R)¶ Determines similarity in robustness from multiple robustness metrics
2 different robustness metrics can lead to a different calculation of robustness. This function measures the difference by using Kendall’s Tau-b correlation, tau (unitless, [-1, 1]).
Parameters: R (numpy.ndarray, shape=(m, n)) – Robustness values, R, for m decision alternatives and n robustness metrics. Returns: tau – Kendall’s Tau-b correlation for each pair of robustness metrics. i.e. idx [0, 3] would be the correlation between R metrics 0 and 3 (and would be equal to [3, 0]) Return type: numpy.ndarray, shape=(n, n)
-
rapid.robustness.analysis.comparisons.delta_plot(delta)¶ A helper fn for plotting the deltas
Plots the deltas as a 2D heatmap grid.
Parameters: delta (numpy.ndarray, shape=(n, n)) – Average relative difference (%) in robustness for each pair of scenario sets. i.e. idx [0, 3] would be the relative difference between scenario sets 0 and 3 (and would be equal to [3, 0])
-
rapid.robustness.analysis.comparisons.scenarios_similarity(R)¶ Determines similarity in robustness from multiple scenario sets
Robustness is a function of scenarios, decision alternatives, and a performance metric. 2 sets of scenarios can lead to a different calculation of robustness. This function measures the difference in 2 different ways: - Relative difference, delta (%); and - Kendall’s Tau-b correlation, tau (unitless, [-1, 1]).
Parameters: R (numpy.ndarray, shape=(m, n)) – Robustness values, R, for m decision alternatives and n scenario sets. Returns: - delta (numpy.ndarray, shape=(n, n)) – Average relative difference (%) in robustness for each pair of scenario sets. i.e. idx [0, 3] would be the relative difference between scenario sets 0 and 3 (and would be equal to [3, 0])
- tau (numpy.ndarray, shape=(n, n)) – Kendall’s Tau-b correlation for each pair of scenario sets. i.e. idx [0, 3] would be the correlation between scenario sets 0 and 3 (and would be equal to [3, 0])
-
rapid.robustness.analysis.comparisons.tau_plot(tau)¶ A helper fn for plotting the Kendall’s Tau-b values
Plots the tau values as a 2D heatmap grid.
Parameters: tau (numpy.ndarray, shape=(n, n)) – Kendall’s Tau-b correlation for each pair of scenario sets. i.e. idx [0, 3] would be the correlation between scenario sets 0 and 3 (and would be equal to [3, 0])
Module contents¶
Contains functions that help analyse robustness values.
This includes functions that help analyse the impact of scenarios on robustness values and robustness rankings, as well as functions that help analyse the impact of different robustness metrics on the robustness values and rankings.
This modeule also contains functions to help visualise these impacts.