Aziel Eliab · GodLock.AZ · decryption_complete is false. Cap-7 is not an ICANN name. Paid satellite stays HELD. These pages show the archive file. They do not say the manuscript is decrypted.

Voynich Master Archive - Volume 07 - Pages 6001-7000

Test CSV, JSON, and Markdown records. Sections carry a Source path and a SHA-256 line.

PDF page 761 of 1000. Catalog page range 6001-7000.

First Previous Next Last Plain text of this page PDF at this page

Extracted text

measure_pharma_024_fast.py
VOYNICH RESEARCH ARCHIVE | 16 SEPTEMBER 2026 1
measure_pharma_024_fast.py
Source: /Voynich/Voynich_Tests_024_025_reproducibility_bundles.zip!/Voynich_MEASURE_PHARMA_024_reproduci
bility.zip!/measure_pharma_024_fast.py
SHA-256: b739afe45b5f4e59c51433540240c9f6e6dd8a9d106d19c93b1c20f79784f5d2
!/usr/bin/env python3
"""Vectorized null engine for the frozen MEASURE-PHARMA-024 design."""
from pathlib import Path
import hashlib,json
import numpy as np, pandas as pd
from scipy.special import expit
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import log_loss,roc_auc_score
from sklearn.preprocessing import StandardScaler
ROOT=Path(__file__).resolve().parent; OUT=ROOT/'measure_pharma_024_fast';OUT.mkdir(exist_ok=True)
SEED=20260829; rng=np.random.default_rng(SEED)
BASE=['n_tokens','resolved_rate']
REP=['payload_repeat','max_payload_mult','frame_repeat','max_frame_mult','exact_repeat','max_exact_mult'
,'adjacent_frame','adjacent_payload','longest_frame_run']
SER=['variable_frame_types','variable_frame_mass','single_atom_step_rate','has_bounded_series']
MODELS={'BASE':BASE,'REPETITION':BASE+REP,'SERIES':BASE+SER,'FULL':BASE+REP+SER}
def assign_folds(fs):
 fs=sorted(fs); q=np.random.default_rng(SEED);q.shuffle(fs);return {f:i%5 for i,f in enumerate(fs)}
def model(tr,features):
 s=StandardScaler().fit(tr[features]); X=s.transform(tr[features]);m=LogisticRegression(C=.3,max_iter=30
00,class_weight='balanced',random_state=SEED).fit(X,tr.y);return s,m
def main():
 d=pd.read_csv(ROOT/'measure_pharma_024/line_features.csv'); d=d[d.section.isin(['Herbal','Pharma'])].co
py();d['y']=(d.section=='Pharma').astype(int)
 fold_rows=[]; pred_rows=[]; summaries=[]
 for w in ['ZL','GC']:
  z=d[d.witness==w].copy();z['fold']=z.folio.map(assign_folds(z.folio.unique())); caches=[]
  for f in range(5):
   tr=z[z.fold!=f];te=z[z.fold==f]
   if te.y.nunique()<2:continue
   vals={}
   for name,features in MODELS.items():
    s,m=model(tr,features);p=m.predict_proba(s.transform(te[features]))[:,1];ll=log_loss(te.y,p,labels=[
0,1])/np.log(2);auc=roc_auc_score(te.y,p);vals[name]=ll
    fold_rows.append({'witness':w,'fold':f,'model':name,'n_test':len(te),'bits_logloss':ll,'auc':auc})
    pred_rows.extend({'witness':w,'fold':f,'model':name,'folio':fo,'line':li,'y':int(y),'p':float(pp)} 
for fo,li,y,pp in zip(te.folio,te.line,te.y,p))
   s,m=model(tr,BASE+REP+SER); X=s.transform(te[BASE+REP+SER]); 
bins=pd.cut(te.n_tokens,[-np.inf,3,5,8,12,np.inf],labels=False).to_numpy()
   caches.append((te.y.to_numpy(),X,m.coef_[0],float(m.intercept_[0]),bins,vals['REPETITION']))
   fold_rows[-1]['gain_full_vs_repetition']=vals['REPETITION']-vals['FULL']
  fr=pd.DataFrame([x for x in fold_rows if x['witness']==w]);piv=fr.pivot(index='fold',columns='model',v
alues='bits_logloss')
  obs=float((piv.REPETITION-piv.FULL).mean());null=np.empty(1000)
  sercols=np.arange(len(BASE)+len(REP),len(BASE)+len(REP)+len(SER))
  for b in range(1000):
   gains=[]
   for y,X0,coef,inter,bins,llrep in caches:
    X=X0.copy()
    for c in sercols:
     for q in np.unique(bins):
      ix=np.where(bins==q)[0];X[ix,c]=X[rng.permutation(ix),c]
    p=expit(X@coef+inter);gains.append(llrep-log_loss(y,p,labels=[0,1])/np.log(2))
   null[b]=np.mean(gains)
  pv=float((1+(null>=obs).sum())/1001)
  summaries.append({'witness':w,'n_lines':len(z),'n_folios':z.folio.nunique(),'pharma_lines':int(z.y.sum
()),'series_vs_base_mean_bits':float((piv.BASE-piv.SERIES).mean()),'series_positive_folds':int(((piv.BAS
E-piv.SERIES)>0).sum()),'full_vs_repetition_mean_bits':obs,'full_positive_folds':int(((piv.REPETITION-pi