Smart Pareto Filter¶
smart_pareto
¶
Smart Pareto Filter implementation.
Based on the paper: "Smart Pareto filter: obtaining a minimal representation of multiobjective design space" by Mattson, C. A., Mullur, A. A., & Messac, A. (2004)
The Smart Pareto Filter selects a minimal representative subset of Pareto-optimal solutions that maintains the essential trade-off information while reducing the number of points for visualization and decision making.
Functions¶
smart_pareto_filter
¶
smart_pareto_filter(objectives: ndarray | DataFrame, epsilon: float | None = None, max_points: int | None = None, normalize: bool = True, metric: str = 'euclidean') -> ndarray
Apply Smart Pareto Filter to select representative Pareto-optimal points.
The algorithm iteratively selects points that are maximally separated in the objective space, ensuring a well-distributed representation of the Pareto front.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objectives
|
ndarray | DataFrame
|
Array or DataFrame of objective values (n_points, n_objectives) All objectives assumed to be minimized |
required |
epsilon
|
float | None
|
Minimum normalized distance threshold. If None, calculated automatically |
None
|
max_points
|
int | None
|
Maximum number of points to select. If None, uses epsilon criterion |
None
|
normalize
|
bool
|
Whether to normalize objectives to [0, 1] range |
True
|
metric
|
str
|
Distance metric for scipy.spatial.distance.cdist |
'euclidean'
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Array of indices of selected representative points |
Note
Input objectives should all be for minimization. If you have maximization objectives, negate them before passing to this function.
Source code in optiscope/analysis/smart_pareto.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
adaptive_smart_pareto_filter
¶
adaptive_smart_pareto_filter(objectives: ndarray | DataFrame, target_reduction: float = 0.5, min_points: int = 5, max_points: int | None = None, normalize: bool = True) -> ndarray
Adaptive Smart Pareto Filter that automatically determines epsilon.
Adjusts epsilon to achieve a target reduction in the number of points while ensuring a minimum number of representative points.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objectives
|
ndarray | DataFrame
|
Array or DataFrame of objective values (n_points, n_objectives) |
required |
target_reduction
|
float
|
Target fraction of points to keep (0.5 = keep 50%) |
0.5
|
min_points
|
int
|
Minimum number of points to select |
5
|
max_points
|
int | None
|
Maximum number of points to select |
None
|
normalize
|
bool
|
Whether to normalize objectives |
True
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Array of indices of selected representative points |
Source code in optiscope/analysis/smart_pareto.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | |
visualize_filter_effect
¶
visualize_filter_effect(objectives: ndarray | DataFrame, selected_indices: ndarray, obj_i: int = 0, obj_j: int = 1) -> dict
Create data for visualizing the effect of Smart Pareto Filter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objectives
|
ndarray | DataFrame
|
Original objective array |
required |
selected_indices
|
ndarray
|
Indices selected by filter |
required |
obj_i
|
int
|
First objective index for 2D visualization |
0
|
obj_j
|
int
|
Second objective index for 2D visualization |
1
|
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary with visualization data |
Source code in optiscope/analysis/smart_pareto.py
calculate_coverage_metric
¶
calculate_coverage_metric(objectives: ndarray | DataFrame, selected_indices: ndarray, normalize: bool = True) -> dict
Calculate coverage metrics for filtered Pareto front.
Measures how well the filtered set represents the original Pareto front.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objectives
|
ndarray | DataFrame
|
Original objective array |
required |
selected_indices
|
ndarray
|
Indices selected by filter |
required |
normalize
|
bool
|
Whether to normalize objectives |
True
|
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary with coverage metrics |