|
Download README.md from Winternewt/cluster-distribution-simdata: direct link, hf CLI and curl.
- Browser
- Download file 2.73 kB
-
https://huggingface.co/datasets/Winternewt/cluster-distribution-simdata/resolve/0eafe04edda9d7b5e1663f3b831cc334eaefbe17/README.md
- Command line
-
hf download hf://datasets/Winternewt/cluster-distribution-simdata@0eafe04edda9d7b5e1663f3b831cc334eaefbe17/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Winternewt/cluster-distribution-simdata/resolve/0eafe04edda9d7b5e1663f3b831cc334eaefbe17/README.md
2.73 kB
| license: cc-by-4.0 | |
| task_categories: | |
| - other | |
| language: | |
| - en | |
| tags: | |
| - spatial-statistics | |
| - DBSCAN | |
| - point-process | |
| - cluster-detection | |
| - Monte-Carlo | |
| pretty_name: DBSCAN Cluster Density Ratios on CSR Point Fields | |
| size_categories: | |
| - 1B<n<10B | |
| # DBSCAN Cluster Density Ratios — CSR Simulation Data | |
| Monte-Carlo simulation of DBSCAN clustering applied to complete-spatial-randomness (CSR) | |
| point fields. Used to characterize the null distribution of detected cluster density ratios | |
| and calibrate anomaly detection p-values (look-elsewhere correction). | |
| ## Simulation parameters | |
| | Parameter | Value | | |
| |---|---| | |
| | N (points per field) | 10,000 | | |
| | Domain | Disk, radius R=100 | | |
| | Domain area S₀ | π·100² ≈ 31,415.93 | | |
| | Background intensity λ₀ | N/S₀ = 1/π ≈ 0.31831 | | |
| | DBSCAN min_samples | 10 | | |
| | Post-filter min_cluster_size | 10 | | |
| | Post-filter min_area | 0.5 | | |
| | eps sweep | 0.80 → 2.86 (step 0.01, 207 values) | | |
| | Iterations per eps | ~12,000 – 1,000,000 | | |
| **Total compute**: ~60 h on a single workstation (16-process parallel). | |
| ## Schema | |
| Each parquet file corresponds to one `eps` value (filename: `data/eps_X.XX.parquet`). | |
| | Column | Type | Description | | |
| |---|---|---| | |
| | `S_prime` | float64 | Convex-hull area of detected cluster. **-1.0 = no cluster found** (placeholder row) | | |
| | `N_prime` | int64 | Point count of detected cluster. **-1 = no cluster found** | | |
| | `iteration` | int64 | Field index (1-based). Multiple clusters per iteration are all recorded. | | |
| **Always filter** `S_prime != -1` before analysis. Placeholder rows mark iterations with no | |
| valid DBSCAN cluster (common at low eps where clustering is rare). | |
| ## Key derived quantities | |
| ```python | |
| lambda0 = 10000 / (np.pi * 100**2) # ≈ 0.31831 | |
| R = (df.N_prime / df.S_prime) / lambda0 # density ratio (main statistic) | |
| R_tilde = R * eps**2 # eps-collapsed statistic (eps-invariant master) | |
| ``` | |
| The density ratio `R` follows a heavy-tailed distribution (tail index α≈7). After | |
| rescaling to `R̃ = R·eps²`, the distribution collapses to a single master inverse-gamma | |
| (shape≈20.5) across all eps — the central empirical finding of this dataset. | |
| ## Usage | |
| ```python | |
| import pandas as pd | |
| import numpy as np | |
| # Load one eps slice | |
| eps = 1.20 | |
| df = pd.read_parquet(f"hf://datasets/Winternewt/cluster-distribution-simdata/data/eps_{eps:.2f}.parquet") | |
| df = df[df.S_prime != -1] # drop placeholder rows | |
| lambda0 = 10000 / (np.pi * 100**2) | |
| df['R'] = (df.N_prime / df.S_prime) / lambda0 | |
| df['R_tilde'] = df['R'] * eps**2 | |
| print(df.R_tilde.describe()) | |
| ``` | |
| ## Repository | |
| Source code and analysis: https://github.com/winternewt/cluster_distribution | |
| Analytic findings: see `docs/analytic_findings.md` in the source repo. | |