Add dataset card
Browse files
README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- other
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- spatial-statistics
|
| 9 |
+
- DBSCAN
|
| 10 |
+
- point-process
|
| 11 |
+
- cluster-detection
|
| 12 |
+
- Monte-Carlo
|
| 13 |
+
pretty_name: DBSCAN Cluster Density Ratios on CSR Point Fields
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1B<n<10B
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# DBSCAN Cluster Density Ratios — CSR Simulation Data
|
| 19 |
+
|
| 20 |
+
Monte-Carlo simulation of DBSCAN clustering applied to complete-spatial-randomness (CSR)
|
| 21 |
+
point fields. Used to characterize the null distribution of detected cluster density ratios
|
| 22 |
+
and calibrate anomaly detection p-values (look-elsewhere correction).
|
| 23 |
+
|
| 24 |
+
## Simulation parameters
|
| 25 |
+
|
| 26 |
+
| Parameter | Value |
|
| 27 |
+
|---|---|
|
| 28 |
+
| N (points per field) | 10,000 |
|
| 29 |
+
| Domain | Disk, radius R=100 |
|
| 30 |
+
| Domain area S₀ | π·100² ≈ 31,415.93 |
|
| 31 |
+
| Background intensity λ₀ | N/S₀ = 1/π ≈ 0.31831 |
|
| 32 |
+
| DBSCAN min_samples | 10 |
|
| 33 |
+
| Post-filter min_cluster_size | 10 |
|
| 34 |
+
| Post-filter min_area | 0.5 |
|
| 35 |
+
| eps sweep | 0.80 → 2.86 (step 0.01, 207 values) |
|
| 36 |
+
| Iterations per eps | ~12,000 – 1,000,000 |
|
| 37 |
+
|
| 38 |
+
**Total compute**: ~60 h on a single workstation (16-process parallel).
|
| 39 |
+
|
| 40 |
+
## Schema
|
| 41 |
+
|
| 42 |
+
Each parquet file corresponds to one `eps` value (filename: `data/eps_X.XX.parquet`).
|
| 43 |
+
|
| 44 |
+
| Column | Type | Description |
|
| 45 |
+
|---|---|---|
|
| 46 |
+
| `S_prime` | float64 | Convex-hull area of detected cluster. **-1.0 = no cluster found** (placeholder row) |
|
| 47 |
+
| `N_prime` | int64 | Point count of detected cluster. **-1 = no cluster found** |
|
| 48 |
+
| `iteration` | int64 | Field index (1-based). Multiple clusters per iteration are all recorded. |
|
| 49 |
+
|
| 50 |
+
**Always filter** `S_prime != -1` before analysis. Placeholder rows mark iterations with no
|
| 51 |
+
valid DBSCAN cluster (common at low eps where clustering is rare).
|
| 52 |
+
|
| 53 |
+
## Key derived quantities
|
| 54 |
+
|
| 55 |
+
```python
|
| 56 |
+
lambda0 = 10000 / (np.pi * 100**2) # ≈ 0.31831
|
| 57 |
+
R = (df.N_prime / df.S_prime) / lambda0 # density ratio (main statistic)
|
| 58 |
+
R_tilde = R * eps**2 # eps-collapsed statistic (eps-invariant master)
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
The density ratio `R` follows a heavy-tailed distribution (tail index α≈7). After
|
| 62 |
+
rescaling to `R̃ = R·eps²`, the distribution collapses to a single master inverse-gamma
|
| 63 |
+
(shape≈20.5) across all eps — the central empirical finding of this dataset.
|
| 64 |
+
|
| 65 |
+
## Usage
|
| 66 |
+
|
| 67 |
+
```python
|
| 68 |
+
import pandas as pd
|
| 69 |
+
import numpy as np
|
| 70 |
+
|
| 71 |
+
# Load one eps slice
|
| 72 |
+
eps = 1.20
|
| 73 |
+
df = pd.read_parquet(f"hf://datasets/Winternewt/cluster-distribution-simdata/data/eps_{eps:.2f}.parquet")
|
| 74 |
+
df = df[df.S_prime != -1] # drop placeholder rows
|
| 75 |
+
|
| 76 |
+
lambda0 = 10000 / (np.pi * 100**2)
|
| 77 |
+
df['R'] = (df.N_prime / df.S_prime) / lambda0
|
| 78 |
+
df['R_tilde'] = df['R'] * eps**2
|
| 79 |
+
print(df.R_tilde.describe())
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
## Repository
|
| 83 |
+
|
| 84 |
+
Source code and analysis: https://github.com/winternewt/cluster_distribution
|
| 85 |
+
Analytic findings: see `docs/analytic_findings.md` in the source repo.
|