Download v21graph2/iitest2.py from Eric-Yyvuw/yeepee-ctr: direct link, hf CLI and curl.
- Browser
- Download file 581 Bytes
-
https://huggingface.co/Eric-Yyvuw/yeepee-ctr/resolve/main/v21graph2/iitest2.py
- Command line
-
hf download hf://Eric-Yyvuw/yeepee-ctr/v21graph2/iitest2.py
-
curl -L -o iitest2.py https://huggingface.co/Eric-Yyvuw/yeepee-ctr/resolve/main/v21graph2/iitest2.py
581 Bytes
| import sys,numpy as np; sys.dont_write_bytecode=True | |
| from ana import *; import ii | |
| for c in (25,23): | |
| nm={23:'val23',25:'val25'}[c]; k=KOF[c]; T=np.load(O+f'tab_{nm}.npz'); it=T['item'] | |
| g=np.load(O+f'g_{k}.npz'); pop=np.bincount(g['ci'],minlength=ii.NI).astype(float); lp=np.log1p(pop)[it] | |
| print(f'C{c} pop auc {AUC(T["y"],lp):.5f}') | |
| for W in (604800,99999999): | |
| F,yy=ii.feats(nm,k,W); s=F['sum']; | |
| for b in (0,.25,.5,1,2): | |
| x=zs(np.log1p(s*100))+b*zs(lp) if True else 0; print(f'C{c} W={W} sum(log)+{b}*pop auc {AUC(yy,x):.5f}',flush=True) | |