- 新增 irstd 核心包、scripts、tests、configs - 新增研究文档:literature_review / mathematical_analysis / novelty_matrix / experiment_plan / research_decision / research_log / manuscript_outline - 新增 evidence、results 数据与审计产物 - 新增 pyproject.toml、requirements、.gitignore
17 lines
909 B
Python
17 lines
909 B
Python
import json,math,platform
|
|
from pathlib import Path
|
|
import numpy as np
|
|
import scipy
|
|
from irstd.core import cp_upper,calibrate
|
|
m=101;delta=.05;alpha=.01;k=64
|
|
n_any=math.ceil(math.log(delta/m)/math.log1p(-alpha))
|
|
n_count=math.ceil(math.log(delta/(m*k))/math.log1p(-alpha/k))
|
|
report=dict(experiment_type='analytic_sample_size_and_synthetic_sanity_only',python=platform.python_version(),numpy=np.__version__,scipy=scipy.__version__,
|
|
n_zero_error_any=n_any,n_zero_error_count_tail_sum=n_count,
|
|
n_zero_error_any_fixed_sequence=math.ceil(math.log(delta)/math.log1p(-alpha)),
|
|
n_zero_error_count_fixed_sequence=math.ceil(math.log(delta)/math.log1p(-alpha/k)),
|
|
any_upper_n80=cp_upper(0,80,delta/m),
|
|
any_upper_n1000=cp_upper(0,1000,delta/m),
|
|
detector_training='not run',real_dataset_metrics='not measured')
|
|
Path('results/math_checks.json').write_text(json.dumps(report,indent=2));print(json.dumps(report,indent=2))
|