How does the choice of box-size window
We report:
-
slope-based estimates
$D_{\text{est}} = -m$ -
coefficient of determination
$R^2$ -
residual diagnostics (RMSE, max residual)
-
absolute and relative errors against the theoretical benchmarks
$D_{\text{Koch}} = \ln(4) / \ln(3) \approx 1.2619$ $D_{\text{Sier}} = \ln(3) / \ln(2) \approx 1.5850$
1. Create a virtual environment and install dependencies
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt2. Run the end-to-end pipeline
(Produces tables and plots in results/.)
python scripts/run_analysis.py --output results --max-iter 6 --quick-densityArguments:
--output: Directory for output files (default:results)--max-iter: Maximum iteration depth (default: 6)--quick-density: Sample a subset of epsilons for density check (faster)--parallel: Run density check in parallel
3. Inspect outputs
Data tables:
iteration_accuracy.csv: Summary of convergence metrics (D_est, Error, RMSE, Stability) for each iteration.*_all_residuals.csv: Detailed residual data for every epsilon and iteration.*_window_residuals.csv: Residuals for specific window presets (fine, coarse, full).*_counts.csvand*_regressions.csv: Raw box counts and regression results for each fractal/iteration.
Visualizations:
*_residuals_scatter.png: Scatter plot of residuals vs. epsilon, colored by iteration.*_window_residuals_scatter.png: Scatter plot of residuals vs. epsilon, colored by window type.*_loglog.png: Log-log plots of box counts vs. epsilon.*_convergence_loglog.png: Combined log-log plots for multiple iterations.*_error_heatmap.png: Heatmap of relative errors across different window starts.
Released under the MIT License. See LICENSE for details.