# HG changeset patch # User Henry S. Thompson # Date 1701166958 0 # Node ID 7c5efd56ce17472e57c84b74d54722d0745da4e3 # Parent 9aac9b8552d2fd2d3bd345ee3deecaeca16d8061 change heatmap to by percentile diff -r 9aac9b8552d2 -r 7c5efd56ce17 lib/python/cc/ccstats.py --- a/lib/python/cc/ccstats.py Tue Nov 28 10:21:36 2023 +0000 +++ b/lib/python/cc/ccstats.py Tue Nov 28 10:22:38 2023 +0000 @@ -219,10 +219,13 @@ for q in target_names: basis=SS[f'{basis_ym} {p}'] target=SS[f'{target_ym} {q}'] + tmin,tmax = target.all_s.minmax + twidth = tmax - tmin best = (stats.describe(target.all[np.array(basis.iranks_by_all[:n])]).mean for n in nn) + bestiles = (round((b - tmin) / twidth, 3) * 100 for b in best) print(f"{q} by {p}", - "\t".join(['{:6.4g}']*len(nn)).format(*best), + "\t".join(['{:4.3g}']*len(nn)).format(*bestiles), sep="\t",file=outfile) def predict(basis_ym, basis_name, target_ym, target_name, n):