Add full quantile stats and post-hoc calibration
This commit is contained in:
@@ -20,10 +20,15 @@ def main(max_rows: Optional[int] = None):
|
||||
config_path = BASE_DIR / "config.json"
|
||||
use_quantile = False
|
||||
quantile_bins = None
|
||||
full_stats = False
|
||||
if config_path.exists():
|
||||
cfg = json.loads(config_path.read_text(encoding="utf-8"))
|
||||
use_quantile = bool(cfg.get("use_quantile_transform", False))
|
||||
quantile_bins = int(cfg.get("quantile_bins", 0)) if use_quantile else None
|
||||
full_stats = bool(cfg.get("full_stats", False))
|
||||
|
||||
if full_stats:
|
||||
max_rows = None
|
||||
|
||||
split = load_split(safe_path(SPLIT_PATH))
|
||||
time_col = split.get("time_column", "time")
|
||||
@@ -62,6 +67,7 @@ def main(max_rows: Optional[int] = None):
|
||||
"max_rows": cont_stats["max_rows"],
|
||||
"quantile_probs": cont_stats["quantile_probs"],
|
||||
"quantile_values": cont_stats["quantile_values"],
|
||||
"quantile_raw_values": cont_stats["quantile_raw_values"],
|
||||
},
|
||||
f,
|
||||
indent=2,
|
||||
|
||||
Reference in New Issue
Block a user