Grid Search Space
Create all combinations of:
| Parameter |
Range |
Values |
min_samples |
3–9 |
[3, 4, 5, 6, 7, 8, 9] |
epsilon |
4–24 (step 2) |
[4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24] |
shape_weight |
0.9–1.9 (step 0.1) |
[0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9] |
Total combinations: 7 × 11 × 11 = 847
Evaluation Pipeline
For each hyperparameter combination (min_samples, epsilon, shape_weight):
Loop over all unique images from expert dataset (using file_rad)
For each image:
- Extract citizen science points for this image
- If no citizen science points exist:
- Set F1 = 0.0, delta = NaN
- Continue to next image
- Run DBSCAN with current hyperparameters on citizen science points
- If no clusters found (all points noise or single cluster with < min_samples):
- Set F1 = 0.0, delta = NaN
- Continue to next image
- Compute cluster centroids
- Extract expert points for this image
- Perform greedy matching of centroids to expert points
- Compute F1 score and delta metric for this image
Aggregate across images:
- Average F1: Include all F1 values (including 0.0)
- Average delta: Only include non-NaN values
- If all delta values are NaN (no matches found in any image), set average delta = NaN
Filter results:
- Keep only results where average F1 > 0.5
Pareto Frontier
Identify Pareto-optimal solutions:
A solution is Pareto-optimal if:
- No other solution has both higher F1 and lower delta
- It is not dominated on both objectives
Optimization goals:
- Maximize F1 score (higher is better)
- Minimize delta (lower is better)
Parallelization
Recommended approach:
- Use
multiprocessing.Pool or joblib.Parallel to evaluate hyperparameter combinations in parallel
- Each worker processes one or more complete combinations (all images for one hyperparameter set)
- Collect results and apply filtering/Pareto frontier detection on main process
1---2name: pareto-frontier-optimization3description: Execute grid search over DBSCAN hyperparameters, evaluate each combination across all images, filter by F1 threshold, and identify Pareto-optimal solutions balancing F1 score and delta metric.4metadata:5 source: https://skillmd.com/skills/cxcscmu/pareto-frontier-optimization6---78## Grid Search Space910Create all combinations of:1112| Parameter | Range | Values |13|-----------|-------|--------|14| `min_samples` | 3–9 | [3, 4, 5, 6, 7, 8, 9] |15| `epsilon` | 4–24 (step 2) | [4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24] |16| `shape_weight` | 0.9–1.9 (step 0.1) | [0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9] |1718**Total combinations:** 7 × 11 × 11 = 8471920## Evaluation Pipeline2122For each hyperparameter combination (min_samples, epsilon, shape_weight):23241. **Loop over all unique images** from expert dataset (using `file_rad`)252. **For each image:**26 - Extract citizen science points for this image27 - If no citizen science points exist:28 - Set F1 = 0.0, delta = NaN29 - Continue to next image30 - Run DBSCAN with current hyperparameters on citizen science points31 - If no clusters found (all points noise or single cluster with < min_samples):32 - Set F1 = 0.0, delta = NaN33 - Continue to next image34 - Compute cluster centroids35 - Extract expert points for this image36 - Perform greedy matching of centroids to expert points37 - Compute F1 score and delta metric for this image38393. **Aggregate across images:**40 - Average F1: Include all F1 values (including 0.0)41 - Average delta: Only include non-NaN values42 - If all delta values are NaN (no matches found in any image), set average delta = NaN43444. **Filter results:**45 - Keep only results where average F1 > 0.54647## Pareto Frontier4849Identify Pareto-optimal solutions:5051A solution is **Pareto-optimal** if:52- No other solution has **both** higher F1 **and** lower delta53- It is not dominated on both objectives5455**Optimization goals:**56- **Maximize** F1 score (higher is better)57- **Minimize** delta (lower is better)5859## Parallelization6061Recommended approach:62- Use `multiprocessing.Pool` or `joblib.Parallel` to evaluate hyperparameter combinations in parallel63- Each worker processes one or more complete combinations (all images for one hyperparameter set)64- Collect results and apply filtering/Pareto frontier detection on main process