{
  "difference": {
    "python": {
      "default": {
        "api": "difference",
        "variant": "default",
        "language": "python",
        "codeFile": "metr14-code/difference-default.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('difference','default',sys.argv[1] if len(sys.argv)>1 else \"difference-default-output\")\n",
        "codeSHA": "be2b1ebd59af7f6d7c4a1984ef96fcf488c8718dd61b6915f1c343a05b8a8580",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"difference\", \"variant\": \"default\", \"summary\": {\"rows\": \"4\", \"defined\": \"3\", \"last\": \"7\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rows": "4",
          "defined": "3",
          "last": "7"
        },
        "fullResult": {
          "levels": [
            "1",
            "4",
            "9",
            "16"
          ],
          "polynomial": [
            "1",
            "-1"
          ],
          "transformed": [
            null,
            "3",
            "5",
            "7"
          ]
        },
        "plotPoints": [
          {
            "label": "First differences",
            "x": [
              0,
              1,
              2,
              3
            ],
            "y": [
              null,
              3.0,
              5.0,
              7.0
            ]
          }
        ],
        "plotFile": "metr14-plots/difference-default-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "inverse": {
        "api": "difference",
        "variant": "inverse",
        "language": "python",
        "codeFile": "metr14-code/difference-inverse.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('difference','inverse',sys.argv[1] if len(sys.argv)>1 else \"difference-inverse-output\")\n",
        "codeSHA": "2f860588486a44197eeaa2b99088b2d266a7224d3a4e93f29b20eae9a540bdc6",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"difference\", \"variant\": \"inverse\", \"summary\": {\"rows\": \"2\", \"defined\": \"2\", \"last\": \"25\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rows": "2",
          "defined": "2",
          "last": "25"
        },
        "fullResult": {
          "history": [
            "4",
            "9"
          ],
          "predictedSecondDifferences": [
            "2",
            "2"
          ],
          "levels": [
            "16",
            "25"
          ]
        },
        "plotPoints": [
          {
            "label": "Reconstructed levels",
            "x": [
              2,
              3
            ],
            "y": [
              16.0,
              25.0
            ]
          }
        ],
        "plotFile": "metr14-plots/difference-inverse-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "gap": {
        "api": "difference",
        "variant": "gap",
        "language": "python",
        "codeFile": "metr14-code/difference-gap.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('difference','gap',sys.argv[1] if len(sys.argv)>1 else \"difference-gap-output\")\n",
        "codeSHA": "9598f9a6d3dbb75dd881543ee3d6070e7f68f259ce2130524ee2535f0f2b6760",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"difference\", \"variant\": \"gap\", \"summary\": {\"rows\": \"3\", \"defined\": \"1\", \"last\": \"8\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rows": "3",
          "defined": "1",
          "last": "8"
        },
        "fullResult": {
          "levels": [
            "1",
            null,
            "9"
          ],
          "polynomial": [
            "1",
            "0",
            "-1"
          ],
          "transformed": [
            null,
            null,
            "8"
          ]
        },
        "plotPoints": [
          {
            "label": "Seasonal differences",
            "x": [
              0,
              1,
              2
            ],
            "y": [
              null,
              null,
              8.0
            ]
          }
        ],
        "plotFile": "metr14-plots/difference-gap-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    },
    "r": {
      "default": {
        "api": "difference",
        "variant": "default",
        "language": "r",
        "codeFile": "metr14-code/difference-default.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"difference-default-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"difference\",\"default\",dest)\n",
        "codeSHA": "78f64ec74a2a40bed40ac2594eafffef740fc97992353d2bb1c96ff3eabbbb66",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"difference\",\"variant\":\"default\",\"summary\":{\"rows\":4e+00,\"defined\":3e+00,\"last\":7e+00},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rows": 4.0,
          "defined": 3.0,
          "last": 7.0
        },
        "fullResult": {
          "levels": [
            1.0,
            4.0,
            9.0,
            16.0
          ],
          "polynomial": [
            1.0,
            -1.0
          ],
          "transformed": [
            null,
            3.0,
            5.0,
            7.0
          ]
        },
        "plotPoints": [
          {
            "label": "First differences",
            "x": [
              0,
              1,
              2,
              3
            ],
            "y": [
              null,
              3.0,
              5.0,
              7.0
            ]
          }
        ],
        "plotFile": "metr14-plots/difference-default-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "inverse": {
        "api": "difference",
        "variant": "inverse",
        "language": "r",
        "codeFile": "metr14-code/difference-inverse.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"difference-inverse-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"difference\",\"inverse\",dest)\n",
        "codeSHA": "ad4af1185180b119589b7fbe84693844242003e50a15d229e021f503588c51f1",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"difference\",\"variant\":\"inverse\",\"summary\":{\"rows\":2e+00,\"defined\":2e+00,\"last\":2.5e+01},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rows": 2.0,
          "defined": 2.0,
          "last": 25.0
        },
        "fullResult": {
          "history": [
            4.0,
            9.0
          ],
          "predictedSecondDifferences": [
            2.0,
            2.0
          ],
          "levels": [
            16.0,
            25.0
          ]
        },
        "plotPoints": [
          {
            "label": "Reconstructed levels",
            "x": [
              2,
              3
            ],
            "y": [
              16.0,
              25.0
            ]
          }
        ],
        "plotFile": "metr14-plots/difference-inverse-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "gap": {
        "api": "difference",
        "variant": "gap",
        "language": "r",
        "codeFile": "metr14-code/difference-gap.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"difference-gap-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"difference\",\"gap\",dest)\n",
        "codeSHA": "cf6cf2d21c39d4ee3e9f3326c49c20614f5545dc43594e3a457ab2d4e8e5b6f9",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"difference\",\"variant\":\"gap\",\"summary\":{\"rows\":3e+00,\"defined\":1e+00,\"last\":8e+00},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rows": 3.0,
          "defined": 1.0,
          "last": 8.0
        },
        "fullResult": {
          "levels": [
            1.0,
            null,
            9.0
          ],
          "polynomial": [
            1.0,
            0.0,
            -1.0
          ],
          "transformed": [
            null,
            null,
            8.0
          ]
        },
        "plotPoints": [
          {
            "label": "Seasonal differences",
            "x": [
              0,
              1,
              2
            ],
            "y": [
              null,
              null,
              8.0
            ]
          }
        ],
        "plotFile": "metr14-plots/difference-gap-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    }
  },
  "polynomial": {
    "python": {
      "default": {
        "api": "polynomial",
        "variant": "default",
        "language": "python",
        "codeFile": "metr14-code/polynomial-default.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('polynomial','default',sys.argv[1] if len(sys.argv)>1 else \"polynomial-default-output\")\n",
        "codeSHA": "6e32d35a9035498a42e1d77e377c10f7015dde596a42faf988e4b3950afa3bda",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"polynomial\", \"variant\": \"default\", \"summary\": {\"psi0\": \"1\", \"psi1\": \"3/4\", \"psi2\": \"3/8\", \"psi3\": \"3/16\", \"expandedDegree\": \"1\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "psi0": "1",
          "psi1": "3/4",
          "psi2": "3/8",
          "psi3": "3/16",
          "expandedDegree": "1"
        },
        "fullResult": {
          "inputs": {
            "phi": [
              "1/2"
            ],
            "theta": [
              "1/4"
            ],
            "horizon": 8,
            "origin": 0
          },
          "expandedPolynomial": [
            "1",
            "-1/2"
          ],
          "psi": [
            "1",
            "3/4",
            "3/8",
            "3/16",
            "3/32",
            "3/64",
            "3/128",
            "3/256"
          ]
        },
        "plotPoints": [
          {
            "label": "Level impulse weights",
            "x": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7
            ],
            "y": [
              1.0,
              0.75,
              0.375,
              0.1875,
              0.09375,
              0.046875,
              0.0234375,
              0.01171875
            ]
          }
        ],
        "plotFile": "metr14-plots/polynomial-default-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "cancel": {
        "api": "polynomial",
        "variant": "cancel",
        "language": "python",
        "codeFile": "metr14-code/polynomial-cancel.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('polynomial','cancel',sys.argv[1] if len(sys.argv)>1 else \"polynomial-cancel-output\")\n",
        "codeSHA": "5113b2e00462ae481ac59c2e2373872ed9561763434607b064a2fd1e78b9b2a8",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"polynomial\", \"variant\": \"cancel\", \"summary\": {\"psi0\": \"1\", \"psi1\": \"0\", \"psi2\": \"0\", \"psi3\": \"0\", \"expandedDegree\": \"1\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "psi0": "1",
          "psi1": "0",
          "psi2": "0",
          "psi3": "0",
          "expandedDegree": "1"
        },
        "fullResult": {
          "inputs": {
            "phi": [],
            "theta": [
              "-1"
            ],
            "d": 1,
            "horizon": 8,
            "origin": 0
          },
          "expandedPolynomial": [
            "1",
            "-1"
          ],
          "psi": [
            "1",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0",
            "0"
          ]
        },
        "plotPoints": [
          {
            "label": "Level impulse weights",
            "x": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7
            ],
            "y": [
              1.0,
              0.0,
              0.0,
              0.0,
              0.0,
              0.0,
              0.0,
              0.0
            ]
          }
        ],
        "plotFile": "metr14-plots/polynomial-cancel-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    },
    "r": {
      "default": {
        "api": "polynomial",
        "variant": "default",
        "language": "r",
        "codeFile": "metr14-code/polynomial-default.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"polynomial-default-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"polynomial\",\"default\",dest)\n",
        "codeSHA": "718e054526d8014b035408f464eeeea89e3f47762bb4b3a2c46d76f2d48812cf",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"polynomial\",\"variant\":\"default\",\"summary\":{\"psi0\":1e+00,\"psi1\":7.5e-01,\"psi2\":3.75e-01,\"psi3\":1.875e-01,\"expandedDegree\":1e+00},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "psi0": 1.0,
          "psi1": 0.75,
          "psi2": 0.375,
          "psi3": 0.1875,
          "expandedDegree": 1.0
        },
        "fullResult": {
          "expandedPolynomial": [
            1.0,
            -0.5
          ],
          "MA": [
            1.0,
            0.25
          ],
          "psi": [
            1.0,
            0.75,
            0.375,
            0.1875,
            0.09375,
            0.046875,
            0.0234375,
            0.01171875
          ]
        },
        "plotPoints": [
          {
            "label": "Level impulse weights",
            "x": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7
            ],
            "y": [
              1.0,
              0.75,
              0.375,
              0.1875,
              0.09375,
              0.046875,
              0.0234375,
              0.01171875
            ]
          }
        ],
        "plotFile": "metr14-plots/polynomial-default-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "cancel": {
        "api": "polynomial",
        "variant": "cancel",
        "language": "r",
        "codeFile": "metr14-code/polynomial-cancel.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"polynomial-cancel-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"polynomial\",\"cancel\",dest)\n",
        "codeSHA": "5861aa62ad127c276cfe4f5a1653f440cf3096f7f2c55d620a1976f96f3b48ac",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"polynomial\",\"variant\":\"cancel\",\"summary\":{\"psi0\":1e+00,\"psi1\":0e+00,\"psi2\":0e+00,\"psi3\":0e+00,\"expandedDegree\":1e+00},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "psi0": 1.0,
          "psi1": 0.0,
          "psi2": 0.0,
          "psi3": 0.0,
          "expandedDegree": 1.0
        },
        "fullResult": {
          "expandedPolynomial": [
            1.0,
            -1.0
          ],
          "MA": [
            1.0,
            -1.0
          ],
          "psi": [
            1.0,
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            0.0
          ]
        },
        "plotPoints": [
          {
            "label": "Level impulse weights",
            "x": [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7
            ],
            "y": [
              1.0,
              0.0,
              0.0,
              0.0,
              0.0,
              0.0,
              0.0,
              0.0
            ]
          }
        ],
        "plotFile": "metr14-plots/polynomial-cancel-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    }
  },
  "fit": {
    "python": {
      "default": {
        "api": "fit",
        "variant": "default",
        "language": "python",
        "codeFile": "metr14-code/fit-default.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('fit','default',sys.argv[1] if len(sys.argv)>1 else \"fit-default-output\")\n",
        "codeSHA": "94ed9ecbe9d892783e03ca0e9ceeafabf13bbd83c2675b5fbba5325da79cbce0",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"fit\", \"variant\": \"default\", \"summary\": {\"rank\": \"2\", \"RSS\": \"0\", \"df\": \"2\", \"intercept\": \"1\", \"trend\": \"2\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rank": "2",
          "RSS": "0",
          "df": "2",
          "intercept": "1",
          "trend": "2"
        },
        "fullResult": {
          "inputs": {
            "origin": 4,
            "arOrder": 0,
            "intercept": true,
            "trend": true
          },
          "levels": [
            1,
            3,
            5,
            7
          ],
          "fit": {
            "part": [
              "1",
              "2"
            ],
            "basis": [],
            "rank": 2,
            "fitted": [
              "1",
              "3",
              "5",
              "7"
            ],
            "residual": [
              "0",
              "0",
              "0",
              "0"
            ],
            "rss": "0",
            "df": 2,
            "train": [
              {
                "index": 0,
                "y": "1"
              },
              {
                "index": 1,
                "y": "3"
              },
              {
                "index": 2,
                "y": "5"
              },
              {
                "index": 3,
                "y": "7"
              }
            ],
            "z": [
              "1",
              "3",
              "5",
              "7"
            ],
            "X": [
              [
                "1",
                "0"
              ],
              [
                "1",
                "1"
              ],
              [
                "1",
                "2"
              ],
              [
                "1",
                "3"
              ]
            ],
            "Y": [
              "1",
              "3",
              "5",
              "7"
            ],
            "used": [
              0,
              1,
              2,
              3
            ],
            "names": [
              "intercept",
              "time-from-trendOrigin"
            ],
            "delta": [
              "1"
            ],
            "origin": 4
          }
        },
        "plotPoints": [
          {
            "label": "Observed assumed values",
            "x": [
              0,
              1,
              2,
              3
            ],
            "y": [
              1.0,
              3.0,
              5.0,
              7.0
            ]
          },
          {
            "label": "Fitted assumed values",
            "x": [
              0,
              1,
              2,
              3
            ],
            "y": [
              1.0,
              3.0,
              5.0,
              7.0
            ]
          }
        ],
        "plotFile": "metr14-plots/fit-default-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "rankone": {
        "api": "fit",
        "variant": "rankone",
        "language": "python",
        "codeFile": "metr14-code/fit-rankone.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('fit','rankone',sys.argv[1] if len(sys.argv)>1 else \"fit-rankone-output\")\n",
        "codeSHA": "d2bfe04afab2b1423473a83e87b6760034835a8a35a2cffa6ef828454e37d412",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"fit\", \"variant\": \"rankone\", \"summary\": {\"rank\": \"1\", \"RSS\": \"0\", \"df\": \"0\", \"intercept\": \"5\", \"trend\": null}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rank": "1",
          "RSS": "0",
          "df": "0",
          "intercept": "5",
          "trend": null
        },
        "fullResult": {
          "inputs": {
            "origin": 1,
            "arOrder": 0,
            "intercept": true,
            "trend": true
          },
          "levels": [
            5
          ],
          "fit": {
            "part": [
              "5",
              "0"
            ],
            "basis": [
              [
                "0",
                "1"
              ]
            ],
            "rank": 1,
            "fitted": [
              "5"
            ],
            "residual": [
              "0"
            ],
            "rss": "0",
            "df": 0,
            "train": [
              {
                "index": 0,
                "y": "5"
              }
            ],
            "z": [
              "5"
            ],
            "X": [
              [
                "1",
                "0"
              ]
            ],
            "Y": [
              "5"
            ],
            "used": [
              0
            ],
            "names": [
              "intercept",
              "time-from-trendOrigin"
            ],
            "delta": [
              "1"
            ],
            "origin": 1
          }
        },
        "plotPoints": [
          {
            "label": "Observed assumed values",
            "x": [
              0
            ],
            "y": [
              5.0
            ]
          },
          {
            "label": "Fitted assumed values",
            "x": [
              0
            ],
            "y": [
              5.0
            ]
          }
        ],
        "plotFile": "metr14-plots/fit-rankone-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    },
    "r": {
      "default": {
        "api": "fit",
        "variant": "default",
        "language": "r",
        "codeFile": "metr14-code/fit-default.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"fit-default-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"fit\",\"default\",dest)\n",
        "codeSHA": "dded527ffe8226b3dc80beeaf918d4e0301e18e54e1d887ed903671aaa67b9a0",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"fit\",\"variant\":\"default\",\"summary\":{\"rank\":2,\"RSS\":0e+00,\"df\":2,\"intercept\":1e+00,\"trend\":2e+00},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rank": 2,
          "RSS": 0.0,
          "df": 2,
          "intercept": 1.0,
          "trend": 2.0
        },
        "fullResult": {
          "inputs": {
            "origin": 4,
            "arOrder": 0.0,
            "intercept": true,
            "trend": true,
            "season": 0.0,
            "d": 0.0
          },
          "levels": [
            1.0,
            3.0,
            5.0,
            7.0
          ],
          "fit": {
            "part": [
              1.0,
              2.0
            ],
            "basis": [
              [],
              []
            ],
            "rank": 2,
            "df": 2,
            "rss": 0.0,
            "fitted": [
              1.0,
              3.0,
              5.0,
              7.0
            ],
            "residual": [
              0.0,
              0.0,
              0.0,
              0.0
            ],
            "X": [
              [
                1.0,
                0.0
              ],
              [
                1.0,
                1.0
              ],
              [
                1.0,
                2.0
              ],
              [
                1.0,
                3.0
              ]
            ],
            "Y": [
              1.0,
              3.0,
              5.0,
              7.0
            ],
            "used": [
              0.0,
              1.0,
              2.0,
              3.0
            ],
            "train": [
              {
                "index": 0.0,
                "timeLabel": "0",
                "y": 1.0
              },
              {
                "index": 1.0,
                "timeLabel": "1",
                "y": 3.0
              },
              {
                "index": 2.0,
                "timeLabel": "2",
                "y": 5.0
              },
              {
                "index": 3.0,
                "timeLabel": "3",
                "y": 7.0
              }
            ],
            "z": [
              1.0,
              3.0,
              5.0,
              7.0
            ],
            "names": [
              "intercept",
              "time-from-trendOrigin"
            ],
            "delta": 1.0
          }
        },
        "plotPoints": [
          {
            "label": "Observed assumed values",
            "x": [
              0.0,
              1.0,
              2.0,
              3.0
            ],
            "y": [
              1.0,
              3.0,
              5.0,
              7.0
            ]
          },
          {
            "label": "Fitted assumed values",
            "x": [
              0.0,
              1.0,
              2.0,
              3.0
            ],
            "y": [
              1.0,
              3.0,
              5.0,
              7.0
            ]
          }
        ],
        "plotFile": "metr14-plots/fit-default-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "rankone": {
        "api": "fit",
        "variant": "rankone",
        "language": "r",
        "codeFile": "metr14-code/fit-rankone.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"fit-rankone-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"fit\",\"rankone\",dest)\n",
        "codeSHA": "80d203617af43aff2a7f6c312534479cbe0da5837fc01135a5bb80356a84bca7",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"fit\",\"variant\":\"rankone\",\"summary\":{\"rank\":1,\"RSS\":0e+00,\"df\":0,\"intercept\":5e+00,\"trend\":null},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "rank": 1,
          "RSS": 0.0,
          "df": 0,
          "intercept": 5.0,
          "trend": null
        },
        "fullResult": {
          "inputs": {
            "origin": 1,
            "arOrder": 0.0,
            "intercept": true,
            "trend": true,
            "season": 0.0,
            "d": 0.0
          },
          "levels": 5.0,
          "fit": {
            "part": [
              5.0,
              0.0
            ],
            "basis": [
              0.0,
              1.0
            ],
            "rank": 1,
            "df": 0,
            "rss": 0.0,
            "fitted": 5.0,
            "residual": 0.0,
            "X": [
              [
                1.0,
                0.0
              ]
            ],
            "Y": 5.0,
            "used": 0.0,
            "train": [
              {
                "index": 0.0,
                "timeLabel": "0",
                "y": 5.0
              }
            ],
            "z": 5.0,
            "names": [
              "intercept",
              "time-from-trendOrigin"
            ],
            "delta": 1.0
          }
        },
        "plotPoints": [
          {
            "label": "Observed assumed values",
            "x": 0.0,
            "y": 5.0
          },
          {
            "label": "Fitted assumed values",
            "x": 0.0,
            "y": 5.0
          }
        ],
        "plotFile": "metr14-plots/fit-rankone-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    }
  },
  "forecast": {
    "python": {
      "default": {
        "api": "forecast",
        "variant": "default",
        "language": "python",
        "codeFile": "metr14-code/forecast-default.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('forecast','default',sys.argv[1] if len(sys.argv)>1 else \"forecast-default-output\")\n",
        "codeSHA": "35d08e4215e17e04cbd093126fdf34d3f75847e0fa96416e8b2314c5c027176e",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"forecast\", \"variant\": \"default\", \"summary\": {\"defined\": \"6\", \"first\": \"11/8\", \"last\": \"11/256\", \"lastInnovationVariance\": \"7165/4096\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "defined": "6",
          "first": "11/8",
          "last": "11/256",
          "lastInnovationVariance": "7165/4096"
        },
        "fullResult": {
          "inputs": {
            "origin": 3,
            "phi": [
              "1/2"
            ],
            "theta": [
              "1/4"
            ],
            "constant": "0",
            "initialInnovations": [
              "0"
            ],
            "horizon": 6
          },
          "levels": [
            2,
            1,
            2
          ],
          "result": {
            "means": [
              [
                "11/8",
                {}
              ],
              [
                "11/16",
                {}
              ],
              [
                "11/32",
                {}
              ],
              [
                "11/64",
                {}
              ],
              [
                "11/128",
                {}
              ],
              [
                "11/256",
                {}
              ]
            ],
            "transformed": [
              [
                "11/8",
                {}
              ],
              [
                "11/16",
                {}
              ],
              [
                "11/32",
                {}
              ],
              [
                "11/64",
                {}
              ],
              [
                "11/128",
                {}
              ],
              [
                "11/256",
                {}
              ]
            ],
            "variances": [
              "1",
              "25/16",
              "109/64",
              "445/256",
              "1789/1024",
              "7165/4096"
            ],
            "psi": [
              "1",
              "3/4",
              "3/8",
              "3/16",
              "3/32",
              "3/64"
            ],
            "P": [
              "1",
              "-1/2"
            ],
            "start": 1,
            "anchor": 1
          }
        },
        "plotPoints": [
          {
            "label": "Identified level means",
            "x": [
              3,
              4,
              5,
              6,
              7,
              8
            ],
            "y": [
              1.375,
              0.6875,
              0.34375,
              0.171875,
              0.0859375,
              0.04296875
            ]
          }
        ],
        "plotFile": "metr14-plots/forecast-default-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "cancel": {
        "api": "forecast",
        "variant": "cancel",
        "language": "python",
        "codeFile": "metr14-code/forecast-cancel.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('forecast','cancel',sys.argv[1] if len(sys.argv)>1 else \"forecast-cancel-output\")\n",
        "codeSHA": "7b0bd31f3dc6d521a96626e044e6e6d4ea239e89d39b786772e8b0a6e8edaac1",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"forecast\", \"variant\": \"cancel\", \"summary\": {\"defined\": \"2\", \"first\": null, \"last\": \"4\", \"lastInnovationVariance\": \"4\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "defined": "2",
          "first": null,
          "last": "4",
          "lastInnovationVariance": "4"
        },
        "fullResult": {
          "inputs": {
            "origin": 2,
            "phi": [
              "1",
              "-1"
            ],
            "theta": [],
            "constant": "0",
            "horizon": 6
          },
          "levels": [
            null,
            4
          ],
          "result": {
            "means": [
              [
                "4",
                {
                  "missing-observed-level@0": "-1"
                }
              ],
              [
                "0",
                {
                  "missing-observed-level@0": "-1"
                }
              ],
              [
                "-4",
                {}
              ],
              [
                "-4",
                {
                  "missing-observed-level@0": "1"
                }
              ],
              [
                "0",
                {
                  "missing-observed-level@0": "1"
                }
              ],
              [
                "4",
                {}
              ]
            ],
            "transformed": [
              [
                "4",
                {
                  "missing-observed-level@0": "-1"
                }
              ],
              [
                "0",
                {
                  "missing-observed-level@0": "-1"
                }
              ],
              [
                "-4",
                {}
              ],
              [
                "-4",
                {
                  "missing-observed-level@0": "1"
                }
              ],
              [
                "0",
                {
                  "missing-observed-level@0": "1"
                }
              ],
              [
                "4",
                {}
              ]
            ],
            "variances": [
              "1",
              "2",
              "2",
              "3",
              "4",
              "4"
            ],
            "psi": [
              "1",
              "1",
              "0",
              "-1",
              "-1",
              "0"
            ],
            "P": [
              "1",
              "-1",
              "1"
            ],
            "start": 2,
            "anchor": 2
          }
        },
        "plotPoints": [
          {
            "label": "Identified level means",
            "x": [
              2,
              3,
              4,
              5,
              6,
              7
            ],
            "y": [
              null,
              null,
              -4.0,
              null,
              null,
              4.0
            ]
          }
        ],
        "plotFile": "metr14-plots/forecast-cancel-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "invalid": {
        "api": "forecast",
        "variant": "invalid",
        "language": "python",
        "codeFile": "metr14-code/forecast-invalid.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('forecast','invalid',sys.argv[1] if len(sys.argv)>1 else \"forecast-invalid-output\")\n",
        "codeSHA": "c74cb0e74caaf7a10329c0563a42d1116262bf847473c837232383cdc4472142",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 1,
        "stdout": "",
        "stderr": "ValueError: nonnegative-innovation-variance: supplied -1",
        "stderrProjection": "Expected-rejection message only;private execution record preserves exact original stderr and command.",
        "summary": null,
        "fullResult": null,
        "plotPoints": null,
        "plotFile": null,
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    },
    "r": {
      "default": {
        "api": "forecast",
        "variant": "default",
        "language": "r",
        "codeFile": "metr14-code/forecast-default.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"forecast-default-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"forecast\",\"default\",dest)\n",
        "codeSHA": "9b3a7858898896c608f7c8d0141ece0203a179e4aa8c09e09a353741013b0a17",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"forecast\",\"variant\":\"default\",\"summary\":{\"defined\":6e+00,\"first\":1.375e+00,\"last\":4.296875e-02,\"lastInnovationVariance\":1.749267578125e+00},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "defined": 6.0,
          "first": 1.375,
          "last": 0.04296875,
          "lastInnovationVariance": 1.749267578125
        },
        "fullResult": {
          "levels": [
            2.0,
            1.0,
            2.0
          ],
          "phi": 0.5,
          "theta": 0.25,
          "initialInnovation": 0.0,
          "conditionalResiduals": [
            0.0,
            1.5
          ],
          "means": [
            1.375,
            0.6875,
            0.34375,
            0.171875,
            0.0859375,
            0.04296875
          ],
          "psi": [
            1.0,
            0.75,
            0.375,
            0.1875,
            0.09375,
            0.046875
          ],
          "variance": [
            1.0,
            1.5625,
            1.703125,
            1.73828125,
            1.7470703125,
            1.749267578125
          ]
        },
        "plotPoints": [
          {
            "label": "Identified level means",
            "x": [
              3.0,
              4.0,
              5.0,
              6.0,
              7.0,
              8.0
            ],
            "y": [
              1.375,
              0.6875,
              0.34375,
              0.171875,
              0.0859375,
              0.04296875
            ]
          }
        ],
        "plotFile": "metr14-plots/forecast-default-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "cancel": {
        "api": "forecast",
        "variant": "cancel",
        "language": "r",
        "codeFile": "metr14-code/forecast-cancel.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"forecast-cancel-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"forecast\",\"cancel\",dest)\n",
        "codeSHA": "5569d3adee960386d8a10da8b690548d2a469d4f34ab3b8b72035a347ea070bc",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"forecast\",\"variant\":\"cancel\",\"summary\":{\"defined\":2,\"first\":null,\"last\":4e+00,\"lastInnovationVariance\":4e+00},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "defined": 2,
          "first": null,
          "last": 4.0,
          "lastInnovationVariance": 4.0
        },
        "fullResult": {
          "unknownPastSymbol": "u",
          "affineForms": [
            [
              4.0,
              -1.0
            ],
            [
              0.0,
              -1.0
            ],
            [
              -4.0,
              0.0
            ],
            [
              -4.0,
              1.0
            ],
            [
              0.0,
              1.0
            ],
            [
              4.0,
              0.0
            ]
          ],
          "means": [
            null,
            null,
            -4.0,
            null,
            null,
            4.0
          ],
          "psi": [
            1.0,
            1.0,
            0.0,
            -1.0,
            -1.0,
            0.0
          ],
          "variance": [
            1.0,
            2.0,
            2.0,
            3.0,
            4.0,
            4.0
          ]
        },
        "plotPoints": [
          {
            "label": "Identified level means",
            "x": [
              2.0,
              3.0,
              4.0,
              5.0,
              6.0,
              7.0
            ],
            "y": [
              null,
              null,
              -4.0,
              null,
              null,
              4.0
            ]
          }
        ],
        "plotFile": "metr14-plots/forecast-cancel-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "invalid": {
        "api": "forecast",
        "variant": "invalid",
        "language": "r",
        "codeFile": "metr14-code/forecast-invalid.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"forecast-invalid-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"forecast\",\"invalid\",dest)\n",
        "codeSHA": "60b766a2a9c6f6f5148602b532496c0772e758000bd65c59b35e360577c357bc",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 1,
        "stdout": "",
        "stderr": "Error: nonnegative-innovation-variance: supplied -1",
        "stderrProjection": "Expected-rejection message only;private execution record preserves exact original stderr and command.",
        "summary": null,
        "fullResult": null,
        "plotPoints": null,
        "plotFile": null,
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    }
  },
  "origins": {
    "python": {
      "default": {
        "api": "origins",
        "variant": "default",
        "language": "python",
        "codeFile": "metr14-code/origins-default.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('origins','default',sys.argv[1] if len(sys.argv)>1 else \"origins-default-output\")\n",
        "codeSHA": "29c02b4a7984ad386e71fa0544e30aa3ac5a33cf41ad4be166f41d820be4bfbf",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"origins\", \"variant\": \"default\", \"summary\": {\"forecastDefined\": \"3\", \"scorePairs\": \"3\", \"MAE\": \"4\", \"MSE\": \"62/3\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "forecastDefined": "3",
          "scorePairs": "3",
          "MAE": "4",
          "MSE": "62/3"
        },
        "fullResult": {
          "inputs": {
            "origin": 3,
            "horizon": 3,
            "model": "naive"
          },
          "levels": [
            1,
            2,
            3,
            10,
            5,
            6
          ],
          "result": {
            "metrics": {
              "origin": "3",
              "trainingCalendar": "3",
              "trainingObserved": "3",
              "horizon": "3",
              "forecastDefined": "3",
              "scorePairs": "3",
              "MAE": "4",
              "MSE": "62/3"
            },
            "rows": [
              {
                "index": 3,
                "horizon": 1,
                "forecast": "3",
                "actual": "10",
                "error": "7"
              },
              {
                "index": 4,
                "horizon": 2,
                "forecast": "3",
                "actual": "5",
                "error": "2"
              },
              {
                "index": 5,
                "horizon": 3,
                "forecast": "3",
                "actual": "6",
                "error": "3"
              }
            ],
            "fit": null,
            "fitrows": []
          }
        },
        "plotPoints": [
          {
            "label": "Actual assumed outcomes",
            "x": [
              3,
              4,
              5
            ],
            "y": [
              10.0,
              5.0,
              6.0
            ]
          },
          {
            "label": "Forecast path",
            "x": [
              3,
              4,
              5
            ],
            "y": [
              3.0,
              3.0,
              3.0
            ]
          }
        ],
        "plotFile": "metr14-plots/origins-default-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "drift": {
        "api": "origins",
        "variant": "drift",
        "language": "python",
        "codeFile": "metr14-code/origins-drift.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('origins','drift',sys.argv[1] if len(sys.argv)>1 else \"origins-drift-output\")\n",
        "codeSHA": "b4929dd373ea33778af4482bec1f1e13dec67405be25de6a568f64e579b07f0f",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"origins\", \"variant\": \"drift\", \"summary\": {\"forecastDefined\": \"3\", \"scorePairs\": \"3\", \"MAE\": \"2\", \"MSE\": \"12\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "forecastDefined": "3",
          "scorePairs": "3",
          "MAE": "2",
          "MSE": "12"
        },
        "fullResult": {
          "inputs": {
            "origin": 3,
            "horizon": 3,
            "model": "drift"
          },
          "levels": [
            1,
            2,
            3,
            10,
            5,
            6
          ],
          "result": {
            "metrics": {
              "origin": "3",
              "trainingCalendar": "3",
              "trainingObserved": "3",
              "horizon": "3",
              "forecastDefined": "3",
              "scorePairs": "3",
              "MAE": "2",
              "MSE": "12"
            },
            "rows": [
              {
                "index": 3,
                "horizon": 1,
                "forecast": "4",
                "actual": "10",
                "error": "6"
              },
              {
                "index": 4,
                "horizon": 2,
                "forecast": "5",
                "actual": "5",
                "error": "0"
              },
              {
                "index": 5,
                "horizon": 3,
                "forecast": "6",
                "actual": "6",
                "error": "0"
              }
            ],
            "fit": null,
            "fitrows": []
          }
        },
        "plotPoints": [
          {
            "label": "Actual assumed outcomes",
            "x": [
              3,
              4,
              5
            ],
            "y": [
              10.0,
              5.0,
              6.0
            ]
          },
          {
            "label": "Forecast path",
            "x": [
              3,
              4,
              5
            ],
            "y": [
              4.0,
              5.0,
              6.0
            ]
          }
        ],
        "plotFile": "metr14-plots/origins-drift-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    },
    "r": {
      "default": {
        "api": "origins",
        "variant": "default",
        "language": "r",
        "codeFile": "metr14-code/origins-default.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"origins-default-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"origins\",\"default\",dest)\n",
        "codeSHA": "79f9f4a20c9d0fd3ab7c1b64ef513e8acd35d53d3910b6da58a61509af2265dd",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"origins\",\"variant\":\"default\",\"summary\":{\"forecastDefined\":3e+00,\"scorePairs\":3e+00,\"MAE\":4e+00,\"MSE\":2.0666666666666668e+01},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "forecastDefined": 3.0,
          "scorePairs": 3.0,
          "MAE": 4.0,
          "MSE": 20.666666666666668
        },
        "fullResult": {
          "inputs": {
            "origin": 3.0,
            "horizon": 3.0,
            "model": "naive"
          },
          "levels": [
            1.0,
            2.0,
            3.0,
            10.0,
            5.0,
            6.0
          ],
          "result": {
            "metrics": {
              "origin": 3.0,
              "trainingCalendar": 3.0,
              "trainingObserved": 3.0,
              "horizon": 3.0,
              "forecastDefined": 3.0,
              "scorePairs": 3.0,
              "MAE": 4.0,
              "MSE": 20.666666666666668
            },
            "pred": [
              3.0,
              3.0,
              3.0
            ],
            "actual": [
              10.0,
              5.0,
              6.0
            ],
            "error": [
              7.0,
              2.0,
              3.0
            ],
            "fit": null
          }
        },
        "plotPoints": [
          {
            "label": "Actual assumed outcomes",
            "x": [
              3,
              4,
              5
            ],
            "y": [
              10.0,
              5.0,
              6.0
            ]
          },
          {
            "label": "Forecast path",
            "x": [
              3,
              4,
              5
            ],
            "y": [
              3.0,
              3.0,
              3.0
            ]
          }
        ],
        "plotFile": "metr14-plots/origins-default-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "drift": {
        "api": "origins",
        "variant": "drift",
        "language": "r",
        "codeFile": "metr14-code/origins-drift.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"origins-drift-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"origins\",\"drift\",dest)\n",
        "codeSHA": "e4734b9bcba5a88bc00ce43e3960f6f253778618903ac695dc7e796449fa9b9f",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"origins\",\"variant\":\"drift\",\"summary\":{\"forecastDefined\":3e+00,\"scorePairs\":3e+00,\"MAE\":2e+00,\"MSE\":1.2e+01},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "forecastDefined": 3.0,
          "scorePairs": 3.0,
          "MAE": 2.0,
          "MSE": 12.0
        },
        "fullResult": {
          "inputs": {
            "origin": 3.0,
            "horizon": 3.0,
            "model": "drift"
          },
          "levels": [
            1.0,
            2.0,
            3.0,
            10.0,
            5.0,
            6.0
          ],
          "result": {
            "metrics": {
              "origin": 3.0,
              "trainingCalendar": 3.0,
              "trainingObserved": 3.0,
              "horizon": 3.0,
              "forecastDefined": 3.0,
              "scorePairs": 3.0,
              "MAE": 2.0,
              "MSE": 12.0
            },
            "pred": [
              4.0,
              5.0,
              6.0
            ],
            "actual": [
              10.0,
              5.0,
              6.0
            ],
            "error": [
              6.0,
              0.0,
              0.0
            ],
            "fit": null
          }
        },
        "plotPoints": [
          {
            "label": "Actual assumed outcomes",
            "x": [
              3,
              4,
              5
            ],
            "y": [
              10.0,
              5.0,
              6.0
            ]
          },
          {
            "label": "Forecast path",
            "x": [
              3,
              4,
              5
            ],
            "y": [
              4.0,
              5.0,
              6.0
            ]
          }
        ],
        "plotFile": "metr14-plots/origins-drift-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    }
  },
  "realdata": {
    "python": {
      "country": {
        "api": "realdata",
        "variant": "country",
        "language": "python",
        "codeFile": "metr14-code/realdata-country.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('realdata','country',sys.argv[1] if len(sys.argv)>1 else \"realdata-country-output\")\n",
        "codeSHA": "182f1c832387303fe42853f8d25e9a003bd73920d77ba9e42805e57b61a2c8e7",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"realdata\", \"variant\": \"country\", \"summary\": {\"origin\": \"35\", \"trainingObserved\": \"35\", \"forecastDefined\": \"10\", \"scorePairs\": \"10\", \"MAE\": \"492478094911479172501647963552473286138555223644150273528184867504088389226722847240809830111507612599752340117610965392782957219224119272572912244779835526985624571097219608661680052155207331390616295104261166921897104751293558916017207217324409984486685634486757952271512494098731914117669246379858242374948869805099871/1489549314916781713707245926012195206517123741949236043349877690263707376541429842434698933585468602004174073347436034018747506364171538961603317312953476699036993391726542845019385257298121597074120587369108333126498850811454422178599348096623472987574813847366487156388090890123974128508650729515757076480000000000000\", \"MSE\": \"48731720590806640134598035550215942615743513645452304853316776830331090443867357006238616571116246572648803110396045376408658009520137316288813876564470834551629640594427516732270746137981996427709169851194806368892606820212912952264553406235897694634903636250162371103641225394446896908943127417173835219785397969820321778280278452469061484722991069618186361722389947296125336506161007565260572688390075048124723704174120145440349234523037210001483938073550358208393889200734763873120882108381086177034515820566313200007467695624557266983562243650491378100872125218657593816211734364689948947912278470395415722105803462506668158057576280193/221875716156905374232123384242951488362699995865035757459822786328464613642060446229297116747533096718378754621955032431136409392333963487203706973477385968190510328244959157048816212717891187905181752680449487038158940037945566598244209218265566059595638345209488922970662496731565204558953389216765138692220897434086983616357748006028645202144260537685907928627196584589087372682318233919804710426897241065005091595128845519524600301574535684504947867794878696819185056683117679872240325543539160705907776924445868176712778641154975060122688801001005028815702658537769298512779066978648602292686977919656919040000000000000000000000000\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "origin": "35",
          "trainingObserved": "35",
          "forecastDefined": "10",
          "scorePairs": "10",
          "MAE": "492478094911479172501647963552473286138555223644150273528184867504088389226722847240809830111507612599752340117610965392782957219224119272572912244779835526985624571097219608661680052155207331390616295104261166921897104751293558916017207217324409984486685634486757952271512494098731914117669246379858242374948869805099871/1489549314916781713707245926012195206517123741949236043349877690263707376541429842434698933585468602004174073347436034018747506364171538961603317312953476699036993391726542845019385257298121597074120587369108333126498850811454422178599348096623472987574813847366487156388090890123974128508650729515757076480000000000000",
          "MSE": "48731720590806640134598035550215942615743513645452304853316776830331090443867357006238616571116246572648803110396045376408658009520137316288813876564470834551629640594427516732270746137981996427709169851194806368892606820212912952264553406235897694634903636250162371103641225394446896908943127417173835219785397969820321778280278452469061484722991069618186361722389947296125336506161007565260572688390075048124723704174120145440349234523037210001483938073550358208393889200734763873120882108381086177034515820566313200007467695624557266983562243650491378100872125218657593816211734364689948947912278470395415722105803462506668158057576280193/221875716156905374232123384242951488362699995865035757459822786328464613642060446229297116747533096718378754621955032431136409392333963487203706973477385968190510328244959157048816212717891187905181752680449487038158940037945566598244209218265566059595638345209488922970662496731565204558953389216765138692220897434086983616357748006028645202144260537685907928627196584589087372682318233919804710426897241065005091595128845519524600301574535684504947867794878696819185056683117679872240325543539160705907776924445868176712778641154975060122688801001005028815702658537769298512779066978648602292686977919656919040000000000000000000000000"
        },
        "fullResult": {
          "profile": {
            "id": "country-ar1-trend",
            "kind": "country",
            "title": {
              "ko": "GDP · AR1과 추세",
              "en": "GDP · AR1 and trend"
            },
            "options": {
              "origin": 35,
              "model": "AR",
              "arOrder": 1,
              "trend": true,
              "horizon": 10
            }
          },
          "originalCalendar": [
            {
              "index": 0,
              "timeLabel": "1980",
              "y": "4139.9606854608"
            },
            {
              "index": 1,
              "timeLabel": "1981",
              "y": "4377.64026742067"
            },
            {
              "index": 2,
              "timeLabel": "1982",
              "y": "4675.53053701243"
            },
            {
              "index": 3,
              "timeLabel": "1983",
              "y": "5227.53893142287"
            },
            {
              "index": 4,
              "timeLabel": "1984",
              "y": "5712.63984757483"
            },
            {
              "index": 5,
              "timeLabel": "1985",
              "y": "6105.74268983951"
            },
            {
              "index": 6,
              "timeLabel": "1986",
              "y": "6740.69941617276"
            },
            {
              "index": 7,
              "timeLabel": "1987",
              "y": "7535.12660432782"
            },
            {
              "index": 8,
              "timeLabel": "1988",
              "y": "8367.04656522944"
            },
            {
              "index": 9,
              "timeLabel": "1989",
              "y": "8878.29655251462"
            },
            {
              "index": 10,
              "timeLabel": "1990",
              "y": "9672.57845182894"
            },
            {
              "index": 11,
              "timeLabel": "1991",
              "y": "10618.8431439122"
            },
            {
              "index": 12,
              "timeLabel": "1992",
              "y": "11176.560685871"
            },
            {
              "index": 13,
              "timeLabel": "1993",
              "y": "11837.4692053797"
            },
            {
              "index": 14,
              "timeLabel": "1994",
              "y": "12817.2447824958"
            },
            {
              "index": 15,
              "timeLabel": "1995",
              "y": "13924.3044000347"
            },
            {
              "index": 16,
              "timeLabel": "1996",
              "y": "14894.3278834104"
            },
            {
              "index": 17,
              "timeLabel": "1997",
              "y": "15682.2717905189"
            },
            {
              "index": 18,
              "timeLabel": "1998",
              "y": "14800.5091573641"
            },
            {
              "index": 19,
              "timeLabel": "1999",
              "y": "16402.9168341094"
            },
            {
              "index": 20,
              "timeLabel": "2000",
              "y": "17763.1353417297"
            },
            {
              "index": 21,
              "timeLabel": "2001",
              "y": "18460.4288193829"
            },
            {
              "index": 22,
              "timeLabel": "2002",
              "y": "19775.3800655139"
            },
            {
              "index": 23,
              "timeLabel": "2003",
              "y": "20278.0406421178"
            },
            {
              "index": 24,
              "timeLabel": "2004",
              "y": "21244.8136800528"
            },
            {
              "index": 25,
              "timeLabel": "2005",
              "y": "22123.7613066851"
            },
            {
              "index": 26,
              "timeLabel": "2006",
              "y": "23162.1860111297"
            },
            {
              "index": 27,
              "timeLabel": "2007",
              "y": "24391.7651013448"
            },
            {
              "index": 28,
              "timeLabel": "2008",
              "y": "24934.5396367691"
            },
            {
              "index": 29,
              "timeLabel": "2009",
              "y": "25009.9148311999"
            },
            {
              "index": 30,
              "timeLabel": "2010",
              "y": "26623.0487122927"
            },
            {
              "index": 31,
              "timeLabel": "2011",
              "y": "27393.455357272"
            },
            {
              "index": 32,
              "timeLabel": "2012",
              "y": "27944.0564190045"
            },
            {
              "index": 33,
              "timeLabel": "2013",
              "y": "28732.711152033"
            },
            {
              "index": 34,
              "timeLabel": "2014",
              "y": "29470.6732991655"
            },
            {
              "index": 35,
              "timeLabel": "2015",
              "y": "30171.7906545222"
            },
            {
              "index": 36,
              "timeLabel": "2016",
              "y": "31005.4072876388"
            },
            {
              "index": 37,
              "timeLabel": "2017",
              "y": "31979.9027302467"
            },
            {
              "index": 38,
              "timeLabel": "2018",
              "y": "32852.8887488942"
            },
            {
              "index": 39,
              "timeLabel": "2019",
              "y": "33496.3113815643"
            },
            {
              "index": 40,
              "timeLabel": "2020",
              "y": "33215.9298928108"
            },
            {
              "index": 41,
              "timeLabel": "2021",
              "y": "34792.9397214598"
            },
            {
              "index": 42,
              "timeLabel": "2022",
              "y": "35809.0138105144"
            },
            {
              "index": 43,
              "timeLabel": "2023",
              "y": "36347.7036392553"
            },
            {
              "index": 44,
              "timeLabel": "2024",
              "y": "37048.4264001496"
            }
          ],
          "result": {
            "metrics": {
              "origin": "35",
              "trainingCalendar": "35",
              "trainingObserved": "35",
              "horizon": "10",
              "forecastDefined": "10",
              "scorePairs": "10",
              "MAE": "492478094911479172501647963552473286138555223644150273528184867504088389226722847240809830111507612599752340117610965392782957219224119272572912244779835526985624571097219608661680052155207331390616295104261166921897104751293558916017207217324409984486685634486757952271512494098731914117669246379858242374948869805099871/1489549314916781713707245926012195206517123741949236043349877690263707376541429842434698933585468602004174073347436034018747506364171538961603317312953476699036993391726542845019385257298121597074120587369108333126498850811454422178599348096623472987574813847366487156388090890123974128508650729515757076480000000000000",
              "MSE": "48731720590806640134598035550215942615743513645452304853316776830331090443867357006238616571116246572648803110396045376408658009520137316288813876564470834551629640594427516732270746137981996427709169851194806368892606820212912952264553406235897694634903636250162371103641225394446896908943127417173835219785397969820321778280278452469061484722991069618186361722389947296125336506161007565260572688390075048124723704174120145440349234523037210001483938073550358208393889200734763873120882108381086177034515820566313200007467695624557266983562243650491378100872125218657593816211734364689948947912278470395415722105803462506668158057576280193/221875716156905374232123384242951488362699995865035757459822786328464613642060446229297116747533096718378754621955032431136409392333963487203706973477385968190510328244959157048816212717891187905181752680449487038158940037945566598244209218265566059595638345209488922970662496731565204558953389216765138692220897434086983616357748006028645202144260537685907928627196584589087372682318233919804710426897241065005091595128845519524600301574535684504947867794878696819185056683117679872240325543539160705907776924445868176712778641154975060122688801001005028815702658537769298512779066978648602292686977919656919040000000000000000000000000",
              "fitRows": "34",
              "rank": "3",
              "parameters": "3",
              "df": "31",
              "RSS": "1910834499227216917166852100227928493604111091711743383336429/403398492512699555049894343117600000000000000000000000",
              "residualVariance": "1910834499227216917166852100227928493604111091711743383336429/12505353267893686206546724636645600000000000000000000000",
              "coefficient:intercept": "5290411962631031057751608647605397747876293889/4840781910152394660598732117411200000000000",
              "coefficient:ARlag1": "1855684921741637308628587389761/2847518770677879212116901245536",
              "coefficient:time-from-trendOrigin": "6906969925442500727123351932044983345752701481/24203909550761973302993660587056000000000000"
            },
            "rows": [
              {
                "index": 35,
                "horizon": 1,
                "forecast": "73304642183974265476924863705541434502935380803/2420390955076197330299366058705600000000000",
                "actual": "150858953272611/5000000000",
                "error": "-277112985316192851997909587480668129616916483/2420390955076197330299366058705600000000000"
              },
              {
                "index": 36,
                "horizon": 2,
                "forecast": "1071832041594553727453566959640433890543622671430129629606602223573423257212863/34460543384792156959466306674087159908927058760005439679691008000000000000",
                "actual": "77513518219097/2500000000",
                "error": "-3368858595725943967877341191008051926834509651357180866380223354461345302463/34460543384792156959466306674087159908927058760005439679691008000000000000"
              },
              {
                "index": 37,
                "horizon": 3,
                "forecast": "3132302089451920584038873072610075329119459488083080301955678196696064237105659182169711405942822359749650559/98127044135955085489669638024032364834487457074416419756911495140420328507216891718819340288000000000000",
                "actual": "319799027302467/10000000000",
                "error": "5791237222547887357936490823090600359850722966475229045460193867475625720924813053804014097220557739399041/98127044135955085489669638024032364834487457074416419756911495140420328507216891718819340288000000000000"
              },
              {
                "index": 38,
                "horizon": 4,
                "forecast": "9147926118220178439070108566715804349181197111567692641781078064614340696911926281778991511093395028945299067482171554862609522612897588543/279418600088268821175030563271926952732443015031640559229820697845955681103308893394080104201607727931617717827033024954368000000000000",
                "actual": "164264443744471/5000000000",
                "error": "31782064851476235109207143851299030198164952649836894562018873769870204127500257618293086515257448706267598271453284166083088952562277057/279418600088268821175030563271926952732443015031640559229820697845955681103308893394080104201607727931617717827033024954368000000000000"
              },
              {
                "index": 39,
                "horizon": 5,
                "forecast": "5340044214952380011792890742031169587290844749938512724952881344577805374713526882735157765278170662600208624886798890356523426987345379118019988936825745382842989845811/159129941725576237116063233111805469803715956321434854080399085044429900782066907598590271645087384858422454078112034132431580198157853565317477752740249600000000000",
                "actual": "334963113815643/10000000000",
                "error": "-9778136782296895583204578227949501201590299507298613817349495024511994799906532025702713659064010138182691368577107617016405131045092797724255242589566073710969396531/159129941725576237116063233111805469803715956321434854080399085044429900782066907598590271645087384858422454078112034132431580198157853565317477752740249600000000000"
              },
              {
                "index": 40,
                "horizon": 6,
                "forecast": "15576915249476996037796495294328043860565909373567766486890709439652130956351006898082814204693053025365535221446728349566586601216480644328939531256486040384044606198030818678111564646791471636407027/453125496040455403775102753044704640084944265685323844034940194083329450058293389839875768403458814318972536168898507114066934402225690104226785433919408793865994720096620615319525785600000000000",
                "actual": "83039824732027/2500000000",
                "error": "-525930540352111598060528872718091681488661197655755539492532981823857227913054829887211294931965005615573327937338334076533151548703722652299863878385081479081589282392756334481954978714576974242547/453125496040455403775102753044704640084944265685323844034940194083329450058293389839875768403458814318972536168898507114066934402225690104226785433919408793865994720096620615319525785600000000000"
              },
              {
                "index": 41,
                "horizon": 7,
                "forecast": "227061465450177406218855441721420786917052816542994057424024198031219914703607671594008524718670960824203079318515804247040382288807070399235598353472684134347459666170675610636446931711351406931786980378624531813356777497198410623/6451416777239608979217589560384633320734597406968303900099496416693474871851531821347468063260650519186236539531556091322320933655387575513154255859754765854180543051631877301971216140128228099757581170787544465408000000000000",
                "actual": "173964698607299/5000000000",
                "error": "-2597710401665244797152734195395102534181055122269186582529187169482596900853465526275393066214966783421750317024908023455889371528727132219339479548677209296171714584450099291753956887361312265152124710380355308480950880835812223/6451416777239608979217589560384633320734597406968303900099496416693474871851531821347468063260650519186236539531556091322320933655387575513154255859754765854180543051631877301971216140128228099757581170787544465408000000000000"
              },
              {
                "index": 42,
                "horizon": 8,
                "forecast": "661608939163333889509073441926394324100328364719943191008264797642004024087659260227164062139503078386088262242693105295925006543525319320599731296269672523565431784678617404481520065283792847049272473034889946606540325745362991698541054406841279227845202180159/18370530370655976677775570514102593133676303715472680620398960282220494998260575551649555449401558241096407246964461571121877187486569194467744613092122914937698109360895821841138036693635650578615312031637691238152769468309421384537178466418688000000000000",
                "actual": "44761267263143/1250000000",
                "error": "-3778363414039801072904682903218013347248054994864569363439914275195596060736161692491522707753391771975544035538628428568890111509710221140597652866528431369356869519456738745663672450025690296096095158876987633937376592018779372041543884213934790638149072959/18370530370655976677775570514102593133676303715472680620398960282220494998260575551649555449401558241096407246964461571121877187486569194467744613092122914937698109360895821841138036693635650578615312031637691238152769468309421384537178466418688000000000000"
              },
              {
                "index": 43,
                "horizon": 9,
                "forecast": "1926794262130123424182751468769683067463397195289066837546534783259353116221089275969322041896131496099083859309918815613164220102225906224078802735502680189010019465250772029114416594424352282773692598183377002353562304673495598295237310772467259571890228231461197977360242560142366940669183/52310430057750951456478058161273164725761226177613889905132778489578456027474400660227003871028507742432902518757606791520009240264037280756609623551081749277069457830996961241294289794880358566844671062025930208059037457212034006727705740986284122388898457137318976466976768000000000000",
                "actual": "363477036392553/10000000000",
                "error": "-25430253148999332978667786110681960839226398553421550061649899682740948146867139288430756238525564468442195688897565465062448884692074674450709730475443551532805143000850901422028655972156477939334767532303659695599581781034970771482698046781325451773544071323697717620598191888289019798783/52310430057750951456478058161273164725761226177613889905132778489578456027474400660227003871028507742432902518757606791520009240264037280756609623551081749277069457830996961241294289794880358566844671062025930208059037457212034006727705740986284122388898457137318976466976768000000000000"
              },
              {
                "index": 44,
                "horizon": 10,
                "forecast": "1121721260879737458553947966373599181000522852460536680248688773633374616768655257635454819578716999929884034533634672303441500106475214916358195531008758870144817442992643537392974813613914155592121151489868160672660949276462706657277925360504042069250643597296252771118984406027863849337075384612120482790093171284236787/29790986298335634274144918520243904130342474838984720866997553805274147530828596848693978671709372040083481466948720680374950127283430779232066346259069533980739867834530856900387705145962431941482411747382166662529977016229088443571986961932469459751496276947329743127761817802479482570173014590315141529600000000000",
                "actual": "46310533000187/1250000000",
                "error": "-18012097617984538100741518754933908968245178536660164247273598256932596100741243800732056548157948503345599492424472774956707298360305213442735737139588782576720629695781022761982971856525737953264933154038797605977085864293233354882741668430976269894474059760266263287874372870579833882686687704205926042413004671408627/29790986298335634274144918520243904130342474838984720866997553805274147530828596848693978671709372040083481466948720680374950127283430779232066346259069533980739867834530856900387705145962431941482411747382166662529977016229088443571986961932469459751496276947329743127761817802479482570173014590315141529600000000000"
              }
            ],
            "fit": {
              "part": [
                "5290411962631031057751608647605397747876293889/4840781910152394660598732117411200000000000",
                "1855684921741637308628587389761/2847518770677879212116901245536",
                "6906969925442500727123351932044983345752701481/24203909550761973302993660587056000000000000"
              ],
              "basis": [],
              "rank": 3,
              "fitted": [
                "1494847909300095216545414033279326838132917511/366725902284272322772631221016000000000000",
                "54657964239531734843864400954368078810053915651/12101954775380986651496830293528000000000000",
                "120921617498233303777942070146010843546389272343/24203909550761973302993660587056000000000000",
                "34133898371056262578777001799000252229971441241/6050977387690493325748415146764000000000000",
                "10072947752166043060344662211324108632176210647/1613593970050798220199577372470400000000000",
                "27366953975525017298241296816946087995434893961/4033984925126995550498943431176000000000000",
                "3773418136962926501804848814721657766133642039/504248115640874443812367928897000000000000",
                "66853932070917020169714404455913631991108138321/8067969850253991100997886862352000000000000",
                "36765151237048717501676215117296571750060962569/4033984925126995550498943431176000000000000",
                "3140826505802978139131842749243074767905737783/322718794010159644039915474494080000000000",
                "42499570314351658544415769152552122074472799021/4033984925126995550498943431176000000000000",
                "92276709780231114095565808030523034877466417639/8067969850253991100997886862352000000000000",
                "146267078774183876432114709706352407108842326099/12101954775380986651496830293528000000000000",
                "309865850255384761930104881694441033336045929629/24203909550761973302993660587056000000000000",
                "488569317183176841034753719642263534290748197/35593984633473490151461265569200000000000",
                "356596113247758757528199547609712385733434700091/24203909550761973302993660587056000000000000",
                "189401787881901870789343620848538501709152583511/12101954775380986651496830293528000000000000",
                "132713012841280484920652632431709340547398150251/8067969850253991100997886862352000000000000",
                "65189613775771525377943483291936054765739854739/4033984925126995550498943431176000000000000",
                "28221329638395714034105084105333493415326883531/1613593970050798220199577372470400000000000",
                "10265501790630224717274859632650563325581132159/550088853426408484158946831524000000000000",
                "9991227301053318406252484420335706992196341291/514976798952382410701992778448000000000000",
                "248617901138624593984185018457881559035615307829/12101954775380986651496830293528000000000000",
                "512071399251133111579807326211525541256590994289/24203909550761973302993660587056000000000000",
                "17807586381504515449310098313611965087093458109/806796985025399110099788686235200000000000",
                "554998485161386302733635890854187435401977427301/24203909550761973302993660587056000000000000",
                "96380810358540769480893507190258609221033320647/4033984925126995550498943431176000000000000",
                "6232849265855621545196971262965712008811207729/249524840729504879412305779248000000000000",
                "38753419134026340874908618565295049975508117859/1512744346922623331437103786691000000000000",
                "25126023730799275319089067059412802026443936681/968156382030478932119746423482240000000000",
                "330251021532263715836900234808475123637821547653/12101954775380986651496830293528000000000000",
                "13324723234213724601231296210624317749918624487/474586461779646535352816874256000000000000",
                "86894082827454239641122755959558720185835059571/3025488693845246662874207573382000000000000",
                "21651495074717463966504894160935230649470099403/733451804568544645545262442032000000000000"
              ],
              "residual": [
                "110546167645713169731602323402454188883883209/366725902284272322772631221016000000000000",
                "1925094870305471352256391505806864255030637389/12101954775380986651496830293528000000000000",
                "5605261971012739609570665069661640383195098377/24203909550761973302993660587056000000000000",
                "433156170638700228747071943942088753950908879/6050977387690493325748415146764000000000000",
                "-220758165159268594949534934633386763307985143/1613593970050798220199577372470400000000000",
                "-175074145871763429493530570496791135048928201/4033984925126995550498943431176000000000000",
                "26155254384797646858819410717077764105372501/504248115640874443812367928897000000000000",
                "651147353025315451872808606200252591469904559/8067969850253991100997886862352000000000000",
                "-950236783397765421393249322445875376357169449/4033984925126995550498943431176000000000000",
                "-96518264300427870073720057298744497042675539/1613593970050798220199577372470400000000000",
                "336682850478307609892291871501174149613948179/4033984925126995550498943431176000000000000",
                "-2104555137089818152241735207712505589237825639/8067969850253991100997886862352000000000000",
                "-3010561795713642574292753320030249841149744499/12101954775380986651496830293528000000000000",
                "361583150119402866981705807705796324808435171/24203909550761973302993660587056000000000000",
                "7052159663465576431376577060772236104503043/35593984633473490151461265569200000000000",
                "3904851661698589814313252487862542253941082309/24203909550761973302993660587056000000000000",
                "384356102190867010736876111534777505279095689/12101954775380986651496830293528000000000000",
                "-13302951191258823032059417927945235383551787051/8067969850253991100997886862352000000000000",
                "979505461137617475987626327739060462414799661/4033984925126995550498943431176000000000000",
                "441158438215554916327996254139020909771167349/1613593970050798220199577372470400000000000",
                "-110625667616057618663960758711715293634592559/550088853426408484158946831524000000000000",
                "192634623151784179581975547218587935768085909/514976798952382410701992778448000000000000",
                "-3213970354377355358532923403997658862061709429/12101954775380986651496830293528000000000000",
                "2136149483655479695707411372036663748485562511/24203909550761973302993660587056000000000000",
                "41797538150607424363341352024292717017477411/806796985025399110099788686235200000000000",
                "5616970049921216764453166754401373249779735899/24203909550761973302993660587056000000000000",
                "2015202357522896582932692397485378662812164153/4033984925126995550498943431176000000000000",
                "-11062234327285419830370221398585360263570929/249524840729504879412305779248000000000000",
                "-919811856112416813623335622891271614327586959/1512744346922623331437103786691000000000000",
                "649250789115226132445004573474103938584194967/968156382030478932119746423482240000000000",
                "1263336342860036366394731433496488231514068347/12101954775380986651496830293528000000000000",
                "-62852370547559032376294996430337424720472487/474586461779646535352816874256000000000000",
                "36409906542834038330665497191978420150546429/3025488693845246662874207573382000000000000",
                "-36176561594502792088614875757492011745803403/733451804568544645545262442032000000000000"
              ],
              "rss": "1910834499227216917166852100227928493604111091711743383336429/403398492512699555049894343117600000000000000000000000",
              "df": 31,
              "train": [
                {
                  "index": 0,
                  "timeLabel": "1980",
                  "y": "4139.9606854608"
                },
                {
                  "index": 1,
                  "timeLabel": "1981",
                  "y": "4377.64026742067"
                },
                {
                  "index": 2,
                  "timeLabel": "1982",
                  "y": "4675.53053701243"
                },
                {
                  "index": 3,
                  "timeLabel": "1983",
                  "y": "5227.53893142287"
                },
                {
                  "index": 4,
                  "timeLabel": "1984",
                  "y": "5712.63984757483"
                },
                {
                  "index": 5,
                  "timeLabel": "1985",
                  "y": "6105.74268983951"
                },
                {
                  "index": 6,
                  "timeLabel": "1986",
                  "y": "6740.69941617276"
                },
                {
                  "index": 7,
                  "timeLabel": "1987",
                  "y": "7535.12660432782"
                },
                {
                  "index": 8,
                  "timeLabel": "1988",
                  "y": "8367.04656522944"
                },
                {
                  "index": 9,
                  "timeLabel": "1989",
                  "y": "8878.29655251462"
                },
                {
                  "index": 10,
                  "timeLabel": "1990",
                  "y": "9672.57845182894"
                },
                {
                  "index": 11,
                  "timeLabel": "1991",
                  "y": "10618.8431439122"
                },
                {
                  "index": 12,
                  "timeLabel": "1992",
                  "y": "11176.560685871"
                },
                {
                  "index": 13,
                  "timeLabel": "1993",
                  "y": "11837.4692053797"
                },
                {
                  "index": 14,
                  "timeLabel": "1994",
                  "y": "12817.2447824958"
                },
                {
                  "index": 15,
                  "timeLabel": "1995",
                  "y": "13924.3044000347"
                },
                {
                  "index": 16,
                  "timeLabel": "1996",
                  "y": "14894.3278834104"
                },
                {
                  "index": 17,
                  "timeLabel": "1997",
                  "y": "15682.2717905189"
                },
                {
                  "index": 18,
                  "timeLabel": "1998",
                  "y": "14800.5091573641"
                },
                {
                  "index": 19,
                  "timeLabel": "1999",
                  "y": "16402.9168341094"
                },
                {
                  "index": 20,
                  "timeLabel": "2000",
                  "y": "17763.1353417297"
                },
                {
                  "index": 21,
                  "timeLabel": "2001",
                  "y": "18460.4288193829"
                },
                {
                  "index": 22,
                  "timeLabel": "2002",
                  "y": "19775.3800655139"
                },
                {
                  "index": 23,
                  "timeLabel": "2003",
                  "y": "20278.0406421178"
                },
                {
                  "index": 24,
                  "timeLabel": "2004",
                  "y": "21244.8136800528"
                },
                {
                  "index": 25,
                  "timeLabel": "2005",
                  "y": "22123.7613066851"
                },
                {
                  "index": 26,
                  "timeLabel": "2006",
                  "y": "23162.1860111297"
                },
                {
                  "index": 27,
                  "timeLabel": "2007",
                  "y": "24391.7651013448"
                },
                {
                  "index": 28,
                  "timeLabel": "2008",
                  "y": "24934.5396367691"
                },
                {
                  "index": 29,
                  "timeLabel": "2009",
                  "y": "25009.9148311999"
                },
                {
                  "index": 30,
                  "timeLabel": "2010",
                  "y": "26623.0487122927"
                },
                {
                  "index": 31,
                  "timeLabel": "2011",
                  "y": "27393.455357272"
                },
                {
                  "index": 32,
                  "timeLabel": "2012",
                  "y": "27944.0564190045"
                },
                {
                  "index": 33,
                  "timeLabel": "2013",
                  "y": "28732.711152033"
                },
                {
                  "index": 34,
                  "timeLabel": "2014",
                  "y": "29470.6732991655"
                }
              ],
              "z": [
                "2587475428413/625000000",
                "437764026742067/100000000000",
                "467553053701243/100000000000",
                "522753893142287/100000000000",
                "571263984757483/100000000000",
                "610574268983951/100000000000",
                "168517485404319/25000000000",
                "376756330216391/50000000000",
                "13073510258171/1562500000",
                "443914827625731/50000000000",
                "483628922591447/50000000000",
                "53094215719561/5000000000",
                "11176560685871/1000000000",
                "118374692053797/10000000000",
                "64086223912479/5000000000",
                "139243044000347/10000000000",
                "18617909854263/1250000000",
                "156822717905189/10000000000",
                "148005091573641/10000000000",
                "82014584170547/5000000000",
                "177631353417297/10000000000",
                "184604288193829/10000000000",
                "197753800655139/10000000000",
                "101390203210589/5000000000",
                "13278008550033/625000000",
                "221237613066851/10000000000",
                "231621860111297/10000000000",
                "30489706376681/1250000000",
                "249345396367691/10000000000",
                "250099148311999/10000000000",
                "266230487122927/10000000000",
                "3424181919659/125000000",
                "55888112838009/2000000000",
                "28732711152033/1000000000",
                "58941346598331/2000000000"
              ],
              "X": [
                [
                  "1",
                  "2587475428413/625000000",
                  "1"
                ],
                [
                  "1",
                  "437764026742067/100000000000",
                  "2"
                ],
                [
                  "1",
                  "467553053701243/100000000000",
                  "3"
                ],
                [
                  "1",
                  "522753893142287/100000000000",
                  "4"
                ],
                [
                  "1",
                  "571263984757483/100000000000",
                  "5"
                ],
                [
                  "1",
                  "610574268983951/100000000000",
                  "6"
                ],
                [
                  "1",
                  "168517485404319/25000000000",
                  "7"
                ],
                [
                  "1",
                  "376756330216391/50000000000",
                  "8"
                ],
                [
                  "1",
                  "13073510258171/1562500000",
                  "9"
                ],
                [
                  "1",
                  "443914827625731/50000000000",
                  "10"
                ],
                [
                  "1",
                  "483628922591447/50000000000",
                  "11"
                ],
                [
                  "1",
                  "53094215719561/5000000000",
                  "12"
                ],
                [
                  "1",
                  "11176560685871/1000000000",
                  "13"
                ],
                [
                  "1",
                  "118374692053797/10000000000",
                  "14"
                ],
                [
                  "1",
                  "64086223912479/5000000000",
                  "15"
                ],
                [
                  "1",
                  "139243044000347/10000000000",
                  "16"
                ],
                [
                  "1",
                  "18617909854263/1250000000",
                  "17"
                ],
                [
                  "1",
                  "156822717905189/10000000000",
                  "18"
                ],
                [
                  "1",
                  "148005091573641/10000000000",
                  "19"
                ],
                [
                  "1",
                  "82014584170547/5000000000",
                  "20"
                ],
                [
                  "1",
                  "177631353417297/10000000000",
                  "21"
                ],
                [
                  "1",
                  "184604288193829/10000000000",
                  "22"
                ],
                [
                  "1",
                  "197753800655139/10000000000",
                  "23"
                ],
                [
                  "1",
                  "101390203210589/5000000000",
                  "24"
                ],
                [
                  "1",
                  "13278008550033/625000000",
                  "25"
                ],
                [
                  "1",
                  "221237613066851/10000000000",
                  "26"
                ],
                [
                  "1",
                  "231621860111297/10000000000",
                  "27"
                ],
                [
                  "1",
                  "30489706376681/1250000000",
                  "28"
                ],
                [
                  "1",
                  "249345396367691/10000000000",
                  "29"
                ],
                [
                  "1",
                  "250099148311999/10000000000",
                  "30"
                ],
                [
                  "1",
                  "266230487122927/10000000000",
                  "31"
                ],
                [
                  "1",
                  "3424181919659/125000000",
                  "32"
                ],
                [
                  "1",
                  "55888112838009/2000000000",
                  "33"
                ],
                [
                  "1",
                  "28732711152033/1000000000",
                  "34"
                ]
              ],
              "Y": [
                "437764026742067/100000000000",
                "467553053701243/100000000000",
                "522753893142287/100000000000",
                "571263984757483/100000000000",
                "610574268983951/100000000000",
                "168517485404319/25000000000",
                "376756330216391/50000000000",
                "13073510258171/1562500000",
                "443914827625731/50000000000",
                "483628922591447/50000000000",
                "53094215719561/5000000000",
                "11176560685871/1000000000",
                "118374692053797/10000000000",
                "64086223912479/5000000000",
                "139243044000347/10000000000",
                "18617909854263/1250000000",
                "156822717905189/10000000000",
                "148005091573641/10000000000",
                "82014584170547/5000000000",
                "177631353417297/10000000000",
                "184604288193829/10000000000",
                "197753800655139/10000000000",
                "101390203210589/5000000000",
                "13278008550033/625000000",
                "221237613066851/10000000000",
                "231621860111297/10000000000",
                "30489706376681/1250000000",
                "249345396367691/10000000000",
                "250099148311999/10000000000",
                "266230487122927/10000000000",
                "3424181919659/125000000",
                "55888112838009/2000000000",
                "28732711152033/1000000000",
                "58941346598331/2000000000"
              ],
              "used": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                9,
                10,
                11,
                12,
                13,
                14,
                15,
                16,
                17,
                18,
                19,
                20,
                21,
                22,
                23,
                24,
                25,
                26,
                27,
                28,
                29,
                30,
                31,
                32,
                33,
                34
              ],
              "names": [
                "intercept",
                "ARlag1",
                "time-from-trendOrigin"
              ],
              "delta": [
                "1"
              ],
              "origin": 35
            },
            "fitrows": [
              {
                "index": 1,
                "observed": "437764026742067/100000000000",
                "fitted": "1494847909300095216545414033279326838132917511/366725902284272322772631221016000000000000",
                "residual": "110546167645713169731602323402454188883883209/366725902284272322772631221016000000000000",
                "features": [
                  "1",
                  "2587475428413/625000000",
                  "1"
                ]
              },
              {
                "index": 2,
                "observed": "467553053701243/100000000000",
                "fitted": "54657964239531734843864400954368078810053915651/12101954775380986651496830293528000000000000",
                "residual": "1925094870305471352256391505806864255030637389/12101954775380986651496830293528000000000000",
                "features": [
                  "1",
                  "437764026742067/100000000000",
                  "2"
                ]
              },
              {
                "index": 3,
                "observed": "522753893142287/100000000000",
                "fitted": "120921617498233303777942070146010843546389272343/24203909550761973302993660587056000000000000",
                "residual": "5605261971012739609570665069661640383195098377/24203909550761973302993660587056000000000000",
                "features": [
                  "1",
                  "467553053701243/100000000000",
                  "3"
                ]
              },
              {
                "index": 4,
                "observed": "571263984757483/100000000000",
                "fitted": "34133898371056262578777001799000252229971441241/6050977387690493325748415146764000000000000",
                "residual": "433156170638700228747071943942088753950908879/6050977387690493325748415146764000000000000",
                "features": [
                  "1",
                  "522753893142287/100000000000",
                  "4"
                ]
              },
              {
                "index": 5,
                "observed": "610574268983951/100000000000",
                "fitted": "10072947752166043060344662211324108632176210647/1613593970050798220199577372470400000000000",
                "residual": "-220758165159268594949534934633386763307985143/1613593970050798220199577372470400000000000",
                "features": [
                  "1",
                  "571263984757483/100000000000",
                  "5"
                ]
              },
              {
                "index": 6,
                "observed": "168517485404319/25000000000",
                "fitted": "27366953975525017298241296816946087995434893961/4033984925126995550498943431176000000000000",
                "residual": "-175074145871763429493530570496791135048928201/4033984925126995550498943431176000000000000",
                "features": [
                  "1",
                  "610574268983951/100000000000",
                  "6"
                ]
              },
              {
                "index": 7,
                "observed": "376756330216391/50000000000",
                "fitted": "3773418136962926501804848814721657766133642039/504248115640874443812367928897000000000000",
                "residual": "26155254384797646858819410717077764105372501/504248115640874443812367928897000000000000",
                "features": [
                  "1",
                  "168517485404319/25000000000",
                  "7"
                ]
              },
              {
                "index": 8,
                "observed": "13073510258171/1562500000",
                "fitted": "66853932070917020169714404455913631991108138321/8067969850253991100997886862352000000000000",
                "residual": "651147353025315451872808606200252591469904559/8067969850253991100997886862352000000000000",
                "features": [
                  "1",
                  "376756330216391/50000000000",
                  "8"
                ]
              },
              {
                "index": 9,
                "observed": "443914827625731/50000000000",
                "fitted": "36765151237048717501676215117296571750060962569/4033984925126995550498943431176000000000000",
                "residual": "-950236783397765421393249322445875376357169449/4033984925126995550498943431176000000000000",
                "features": [
                  "1",
                  "13073510258171/1562500000",
                  "9"
                ]
              },
              {
                "index": 10,
                "observed": "483628922591447/50000000000",
                "fitted": "3140826505802978139131842749243074767905737783/322718794010159644039915474494080000000000",
                "residual": "-96518264300427870073720057298744497042675539/1613593970050798220199577372470400000000000",
                "features": [
                  "1",
                  "443914827625731/50000000000",
                  "10"
                ]
              },
              {
                "index": 11,
                "observed": "53094215719561/5000000000",
                "fitted": "42499570314351658544415769152552122074472799021/4033984925126995550498943431176000000000000",
                "residual": "336682850478307609892291871501174149613948179/4033984925126995550498943431176000000000000",
                "features": [
                  "1",
                  "483628922591447/50000000000",
                  "11"
                ]
              },
              {
                "index": 12,
                "observed": "11176560685871/1000000000",
                "fitted": "92276709780231114095565808030523034877466417639/8067969850253991100997886862352000000000000",
                "residual": "-2104555137089818152241735207712505589237825639/8067969850253991100997886862352000000000000",
                "features": [
                  "1",
                  "53094215719561/5000000000",
                  "12"
                ]
              },
              {
                "index": 13,
                "observed": "118374692053797/10000000000",
                "fitted": "146267078774183876432114709706352407108842326099/12101954775380986651496830293528000000000000",
                "residual": "-3010561795713642574292753320030249841149744499/12101954775380986651496830293528000000000000",
                "features": [
                  "1",
                  "11176560685871/1000000000",
                  "13"
                ]
              },
              {
                "index": 14,
                "observed": "64086223912479/5000000000",
                "fitted": "309865850255384761930104881694441033336045929629/24203909550761973302993660587056000000000000",
                "residual": "361583150119402866981705807705796324808435171/24203909550761973302993660587056000000000000",
                "features": [
                  "1",
                  "118374692053797/10000000000",
                  "14"
                ]
              },
              {
                "index": 15,
                "observed": "139243044000347/10000000000",
                "fitted": "488569317183176841034753719642263534290748197/35593984633473490151461265569200000000000",
                "residual": "7052159663465576431376577060772236104503043/35593984633473490151461265569200000000000",
                "features": [
                  "1",
                  "64086223912479/5000000000",
                  "15"
                ]
              },
              {
                "index": 16,
                "observed": "18617909854263/1250000000",
                "fitted": "356596113247758757528199547609712385733434700091/24203909550761973302993660587056000000000000",
                "residual": "3904851661698589814313252487862542253941082309/24203909550761973302993660587056000000000000",
                "features": [
                  "1",
                  "139243044000347/10000000000",
                  "16"
                ]
              },
              {
                "index": 17,
                "observed": "156822717905189/10000000000",
                "fitted": "189401787881901870789343620848538501709152583511/12101954775380986651496830293528000000000000",
                "residual": "384356102190867010736876111534777505279095689/12101954775380986651496830293528000000000000",
                "features": [
                  "1",
                  "18617909854263/1250000000",
                  "17"
                ]
              },
              {
                "index": 18,
                "observed": "148005091573641/10000000000",
                "fitted": "132713012841280484920652632431709340547398150251/8067969850253991100997886862352000000000000",
                "residual": "-13302951191258823032059417927945235383551787051/8067969850253991100997886862352000000000000",
                "features": [
                  "1",
                  "156822717905189/10000000000",
                  "18"
                ]
              },
              {
                "index": 19,
                "observed": "82014584170547/5000000000",
                "fitted": "65189613775771525377943483291936054765739854739/4033984925126995550498943431176000000000000",
                "residual": "979505461137617475987626327739060462414799661/4033984925126995550498943431176000000000000",
                "features": [
                  "1",
                  "148005091573641/10000000000",
                  "19"
                ]
              },
              {
                "index": 20,
                "observed": "177631353417297/10000000000",
                "fitted": "28221329638395714034105084105333493415326883531/1613593970050798220199577372470400000000000",
                "residual": "441158438215554916327996254139020909771167349/1613593970050798220199577372470400000000000",
                "features": [
                  "1",
                  "82014584170547/5000000000",
                  "20"
                ]
              },
              {
                "index": 21,
                "observed": "184604288193829/10000000000",
                "fitted": "10265501790630224717274859632650563325581132159/550088853426408484158946831524000000000000",
                "residual": "-110625667616057618663960758711715293634592559/550088853426408484158946831524000000000000",
                "features": [
                  "1",
                  "177631353417297/10000000000",
                  "21"
                ]
              },
              {
                "index": 22,
                "observed": "197753800655139/10000000000",
                "fitted": "9991227301053318406252484420335706992196341291/514976798952382410701992778448000000000000",
                "residual": "192634623151784179581975547218587935768085909/514976798952382410701992778448000000000000",
                "features": [
                  "1",
                  "184604288193829/10000000000",
                  "22"
                ]
              },
              {
                "index": 23,
                "observed": "101390203210589/5000000000",
                "fitted": "248617901138624593984185018457881559035615307829/12101954775380986651496830293528000000000000",
                "residual": "-3213970354377355358532923403997658862061709429/12101954775380986651496830293528000000000000",
                "features": [
                  "1",
                  "197753800655139/10000000000",
                  "23"
                ]
              },
              {
                "index": 24,
                "observed": "13278008550033/625000000",
                "fitted": "512071399251133111579807326211525541256590994289/24203909550761973302993660587056000000000000",
                "residual": "2136149483655479695707411372036663748485562511/24203909550761973302993660587056000000000000",
                "features": [
                  "1",
                  "101390203210589/5000000000",
                  "24"
                ]
              },
              {
                "index": 25,
                "observed": "221237613066851/10000000000",
                "fitted": "17807586381504515449310098313611965087093458109/806796985025399110099788686235200000000000",
                "residual": "41797538150607424363341352024292717017477411/806796985025399110099788686235200000000000",
                "features": [
                  "1",
                  "13278008550033/625000000",
                  "25"
                ]
              },
              {
                "index": 26,
                "observed": "231621860111297/10000000000",
                "fitted": "554998485161386302733635890854187435401977427301/24203909550761973302993660587056000000000000",
                "residual": "5616970049921216764453166754401373249779735899/24203909550761973302993660587056000000000000",
                "features": [
                  "1",
                  "221237613066851/10000000000",
                  "26"
                ]
              },
              {
                "index": 27,
                "observed": "30489706376681/1250000000",
                "fitted": "96380810358540769480893507190258609221033320647/4033984925126995550498943431176000000000000",
                "residual": "2015202357522896582932692397485378662812164153/4033984925126995550498943431176000000000000",
                "features": [
                  "1",
                  "231621860111297/10000000000",
                  "27"
                ]
              },
              {
                "index": 28,
                "observed": "249345396367691/10000000000",
                "fitted": "6232849265855621545196971262965712008811207729/249524840729504879412305779248000000000000",
                "residual": "-11062234327285419830370221398585360263570929/249524840729504879412305779248000000000000",
                "features": [
                  "1",
                  "30489706376681/1250000000",
                  "28"
                ]
              },
              {
                "index": 29,
                "observed": "250099148311999/10000000000",
                "fitted": "38753419134026340874908618565295049975508117859/1512744346922623331437103786691000000000000",
                "residual": "-919811856112416813623335622891271614327586959/1512744346922623331437103786691000000000000",
                "features": [
                  "1",
                  "249345396367691/10000000000",
                  "29"
                ]
              },
              {
                "index": 30,
                "observed": "266230487122927/10000000000",
                "fitted": "25126023730799275319089067059412802026443936681/968156382030478932119746423482240000000000",
                "residual": "649250789115226132445004573474103938584194967/968156382030478932119746423482240000000000",
                "features": [
                  "1",
                  "250099148311999/10000000000",
                  "30"
                ]
              },
              {
                "index": 31,
                "observed": "3424181919659/125000000",
                "fitted": "330251021532263715836900234808475123637821547653/12101954775380986651496830293528000000000000",
                "residual": "1263336342860036366394731433496488231514068347/12101954775380986651496830293528000000000000",
                "features": [
                  "1",
                  "266230487122927/10000000000",
                  "31"
                ]
              },
              {
                "index": 32,
                "observed": "55888112838009/2000000000",
                "fitted": "13324723234213724601231296210624317749918624487/474586461779646535352816874256000000000000",
                "residual": "-62852370547559032376294996430337424720472487/474586461779646535352816874256000000000000",
                "features": [
                  "1",
                  "3424181919659/125000000",
                  "32"
                ]
              },
              {
                "index": 33,
                "observed": "28732711152033/1000000000",
                "fitted": "86894082827454239641122755959558720185835059571/3025488693845246662874207573382000000000000",
                "residual": "36409906542834038330665497191978420150546429/3025488693845246662874207573382000000000000",
                "features": [
                  "1",
                  "55888112838009/2000000000",
                  "33"
                ]
              },
              {
                "index": 34,
                "observed": "58941346598331/2000000000",
                "fitted": "21651495074717463966504894160935230649470099403/733451804568544645545262442032000000000000",
                "residual": "-36176561594502792088614875757492011745803403/733451804568544645545262442032000000000000",
                "features": [
                  "1",
                  "28732711152033/1000000000",
                  "34"
                ]
              }
            ]
          }
        },
        "plotPoints": [
          {
            "label": "Actual recorded values",
            "x": [
              2010,
              2011,
              2012,
              2013,
              2014,
              2015,
              2016,
              2017,
              2018,
              2019,
              2020,
              2021,
              2022,
              2023,
              2024
            ],
            "y": [
              26623.0487122927,
              27393.455357272,
              27944.0564190045,
              28732.711152033,
              29470.6732991655,
              30171.7906545222,
              31005.4072876388,
              31979.9027302467,
              32852.8887488942,
              33496.3113815643,
              33215.9298928108,
              34792.9397214598,
              35809.0138105144,
              36347.7036392553,
              37048.4264001496
            ]
          },
          {
            "label": "Declared model forecast",
            "x": [
              2015,
              2016,
              2017,
              2018,
              2019,
              2020,
              2021,
              2022,
              2023,
              2024
            ],
            "y": [
              30286.281656372546,
              31103.167167920103,
              31920.884981637824,
              32739.145194093497,
              33557.75887960436,
              34376.60291815995,
              35195.59707431133,
              36014.68905982975,
              36833.84479926726,
              37653.042086169735
            ]
          }
        ],
        "plotFile": "metr14-plots/realdata-country-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "person": {
        "api": "realdata",
        "variant": "person",
        "language": "python",
        "codeFile": "metr14-code/realdata-person.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('realdata','person',sys.argv[1] if len(sys.argv)>1 else \"realdata-person-output\")\n",
        "codeSHA": "1d987e21b03f5578a9bfd4fa24b7d3480b963968ecb081a3db3d8a4abe32c291",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"realdata\", \"variant\": \"person\", \"summary\": {\"origin\": \"672\", \"trainingObserved\": \"670\", \"forecastDefined\": \"168\", \"scorePairs\": \"167\", \"MAE\": \"1496887/1252500\", \"MSE\": \"107356015189/37575000000\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "origin": "672",
          "trainingObserved": "670",
          "forecastDefined": "168",
          "scorePairs": "167",
          "MAE": "1496887/1252500",
          "MSE": "107356015189/37575000000"
        },
        "fullResult": {
          "profile": {
            "id": "person-seasonal24",
            "kind": "person",
            "title": {
              "ko": "가구 · 전날 같은 시간",
              "en": "Household · same hour yesterday"
            },
            "options": {
              "origin": 672,
              "model": "seasonalNaive",
              "baselinePeriod": 24,
              "horizon": 168
            }
          },
          "originalCalendar": [
            {
              "index": 0,
              "timeLabel": "2006-12-17T00:00:00",
              "y": "28237/15000"
            },
            {
              "index": 1,
              "timeLabel": "2006-12-17T01:00:00",
              "y": "16747/5000"
            },
            {
              "index": 2,
              "timeLabel": "2006-12-17T02:00:00",
              "y": "23809/15000"
            },
            {
              "index": 3,
              "timeLabel": "2006-12-17T03:00:00",
              "y": "8311/5000"
            },
            {
              "index": 4,
              "timeLabel": "2006-12-17T04:00:00",
              "y": "66473/30000"
            },
            {
              "index": 5,
              "timeLabel": "2006-12-17T05:00:00",
              "y": "29951/15000"
            },
            {
              "index": 6,
              "timeLabel": "2006-12-17T06:00:00",
              "y": "13033/10000"
            },
            {
              "index": 7,
              "timeLabel": "2006-12-17T07:00:00",
              "y": "48601/30000"
            },
            {
              "index": 8,
              "timeLabel": "2006-12-17T08:00:00",
              "y": "56717/30000"
            },
            {
              "index": 9,
              "timeLabel": "2006-12-17T09:00:00",
              "y": "9559/3750"
            },
            {
              "index": 10,
              "timeLabel": "2006-12-17T10:00:00",
              "y": "36289/10000"
            },
            {
              "index": 11,
              "timeLabel": "2006-12-17T11:00:00",
              "y": "2471/1000"
            },
            {
              "index": 12,
              "timeLabel": "2006-12-17T12:00:00",
              "y": "14369/7500"
            },
            {
              "index": 13,
              "timeLabel": "2006-12-17T13:00:00",
              "y": "49823/30000"
            },
            {
              "index": 14,
              "timeLabel": "2006-12-17T14:00:00",
              "y": "62779/30000"
            },
            {
              "index": 15,
              "timeLabel": "2006-12-17T15:00:00",
              "y": "14927/5000"
            },
            {
              "index": 16,
              "timeLabel": "2006-12-17T16:00:00",
              "y": "99781/30000"
            },
            {
              "index": 17,
              "timeLabel": "2006-12-17T17:00:00",
              "y": "102203/30000"
            },
            {
              "index": 18,
              "timeLabel": "2006-12-17T18:00:00",
              "y": "36971/10000"
            },
            {
              "index": 19,
              "timeLabel": "2006-12-17T19:00:00",
              "y": "7271/2500"
            },
            {
              "index": 20,
              "timeLabel": "2006-12-17T20:00:00",
              "y": "6723/2000"
            },
            {
              "index": 21,
              "timeLabel": "2006-12-17T21:00:00",
              "y": "91223/30000"
            },
            {
              "index": 22,
              "timeLabel": "2006-12-17T22:00:00",
              "y": "759/500"
            },
            {
              "index": 23,
              "timeLabel": "2006-12-17T23:00:00",
              "y": "3283/7500"
            },
            {
              "index": 24,
              "timeLabel": "2006-12-18T00:00:00",
              "y": "8291/30000"
            },
            {
              "index": 25,
              "timeLabel": "2006-12-18T01:00:00",
              "y": "3133/10000"
            },
            {
              "index": 26,
              "timeLabel": "2006-12-18T02:00:00",
              "y": "4267/15000"
            },
            {
              "index": 27,
              "timeLabel": "2006-12-18T03:00:00",
              "y": "4649/15000"
            },
            {
              "index": 28,
              "timeLabel": "2006-12-18T04:00:00",
              "y": "3079/3000"
            },
            {
              "index": 29,
              "timeLabel": "2006-12-18T05:00:00",
              "y": "587/2000"
            },
            {
              "index": 30,
              "timeLabel": "2006-12-18T06:00:00",
              "y": "61/100"
            },
            {
              "index": 31,
              "timeLabel": "2006-12-18T07:00:00",
              "y": "73513/30000"
            },
            {
              "index": 32,
              "timeLabel": "2006-12-18T08:00:00",
              "y": "3904/1875"
            },
            {
              "index": 33,
              "timeLabel": "2006-12-18T09:00:00",
              "y": "611/375"
            },
            {
              "index": 34,
              "timeLabel": "2006-12-18T10:00:00",
              "y": "39289/30000"
            },
            {
              "index": 35,
              "timeLabel": "2006-12-18T11:00:00",
              "y": "23429/15000"
            },
            {
              "index": 36,
              "timeLabel": "2006-12-18T12:00:00",
              "y": "26341/15000"
            },
            {
              "index": 37,
              "timeLabel": "2006-12-18T13:00:00",
              "y": "25231/15000"
            },
            {
              "index": 38,
              "timeLabel": "2006-12-18T14:00:00",
              "y": "51991/30000"
            },
            {
              "index": 39,
              "timeLabel": "2006-12-18T15:00:00",
              "y": "17843/10000"
            },
            {
              "index": 40,
              "timeLabel": "2006-12-18T16:00:00",
              "y": "19493/10000"
            },
            {
              "index": 41,
              "timeLabel": "2006-12-18T17:00:00",
              "y": "21549/10000"
            },
            {
              "index": 42,
              "timeLabel": "2006-12-18T18:00:00",
              "y": "18019/7500"
            },
            {
              "index": 43,
              "timeLabel": "2006-12-18T19:00:00",
              "y": "5229/2000"
            },
            {
              "index": 44,
              "timeLabel": "2006-12-18T20:00:00",
              "y": "91517/30000"
            },
            {
              "index": 45,
              "timeLabel": "2006-12-18T21:00:00",
              "y": "16273/7500"
            },
            {
              "index": 46,
              "timeLabel": "2006-12-18T22:00:00",
              "y": "4347/2500"
            },
            {
              "index": 47,
              "timeLabel": "2006-12-18T23:00:00",
              "y": "23209/15000"
            },
            {
              "index": 48,
              "timeLabel": "2006-12-19T00:00:00",
              "y": "12557/15000"
            },
            {
              "index": 49,
              "timeLabel": "2006-12-19T01:00:00",
              "y": "10591/30000"
            },
            {
              "index": 50,
              "timeLabel": "2006-12-19T02:00:00",
              "y": "9817/30000"
            },
            {
              "index": 51,
              "timeLabel": "2006-12-19T03:00:00",
              "y": "3083/10000"
            },
            {
              "index": 52,
              "timeLabel": "2006-12-19T04:00:00",
              "y": "1967/6000"
            },
            {
              "index": 53,
              "timeLabel": "2006-12-19T05:00:00",
              "y": "23/75"
            },
            {
              "index": 54,
              "timeLabel": "2006-12-19T06:00:00",
              "y": "2389/3000"
            },
            {
              "index": 55,
              "timeLabel": "2006-12-19T07:00:00",
              "y": "53569/30000"
            },
            {
              "index": 56,
              "timeLabel": "2006-12-19T08:00:00",
              "y": "116371/30000"
            },
            {
              "index": 57,
              "timeLabel": "2006-12-19T09:00:00",
              "y": "48533/30000"
            },
            {
              "index": 58,
              "timeLabel": "2006-12-19T10:00:00",
              "y": "6557/15000"
            },
            {
              "index": 59,
              "timeLabel": "2006-12-19T11:00:00",
              "y": "69649/30000"
            },
            {
              "index": 60,
              "timeLabel": "2006-12-19T12:00:00",
              "y": "323/750"
            },
            {
              "index": 61,
              "timeLabel": "2006-12-19T13:00:00",
              "y": "4507/15000"
            },
            {
              "index": 62,
              "timeLabel": "2006-12-19T14:00:00",
              "y": "1133/3750"
            },
            {
              "index": 63,
              "timeLabel": "2006-12-19T15:00:00",
              "y": "12641/30000"
            },
            {
              "index": 64,
              "timeLabel": "2006-12-19T16:00:00",
              "y": "10291/7500"
            },
            {
              "index": 65,
              "timeLabel": "2006-12-19T17:00:00",
              "y": "4223/2000"
            },
            {
              "index": 66,
              "timeLabel": "2006-12-19T18:00:00",
              "y": "22047/10000"
            },
            {
              "index": 67,
              "timeLabel": "2006-12-19T19:00:00",
              "y": "18421/10000"
            },
            {
              "index": 68,
              "timeLabel": "2006-12-19T20:00:00",
              "y": "11027/3750"
            },
            {
              "index": 69,
              "timeLabel": "2006-12-19T21:00:00",
              "y": "21643/15000"
            },
            {
              "index": 70,
              "timeLabel": "2006-12-19T22:00:00",
              "y": "18/25"
            },
            {
              "index": 71,
              "timeLabel": "2006-12-19T23:00:00",
              "y": "3837/10000"
            },
            {
              "index": 72,
              "timeLabel": "2006-12-20T00:00:00",
              "y": "2759/6000"
            },
            {
              "index": 73,
              "timeLabel": "2006-12-20T01:00:00",
              "y": "97/375"
            },
            {
              "index": 74,
              "timeLabel": "2006-12-20T02:00:00",
              "y": "23531/30000"
            },
            {
              "index": 75,
              "timeLabel": "2006-12-20T03:00:00",
              "y": "9301/30000"
            },
            {
              "index": 76,
              "timeLabel": "2006-12-20T04:00:00",
              "y": "289/1000"
            },
            {
              "index": 77,
              "timeLabel": "2006-12-20T05:00:00",
              "y": "2627/10000"
            },
            {
              "index": 78,
              "timeLabel": "2006-12-20T06:00:00",
              "y": "709/2500"
            },
            {
              "index": 79,
              "timeLabel": "2006-12-20T07:00:00",
              "y": "45799/30000"
            },
            {
              "index": 80,
              "timeLabel": "2006-12-20T08:00:00",
              "y": "3647/1250"
            },
            {
              "index": 81,
              "timeLabel": "2006-12-20T09:00:00",
              "y": "20783/15000"
            },
            {
              "index": 82,
              "timeLabel": "2006-12-20T10:00:00",
              "y": "15103/10000"
            },
            {
              "index": 83,
              "timeLabel": "2006-12-20T11:00:00",
              "y": "7231/2500"
            },
            {
              "index": 84,
              "timeLabel": "2006-12-20T12:00:00",
              "y": "42631/30000"
            },
            {
              "index": 85,
              "timeLabel": "2006-12-20T13:00:00",
              "y": "3571/2500"
            },
            {
              "index": 86,
              "timeLabel": "2006-12-20T14:00:00",
              "y": "12949/10000"
            },
            {
              "index": 87,
              "timeLabel": "2006-12-20T15:00:00",
              "y": "4217/15000"
            },
            {
              "index": 88,
              "timeLabel": "2006-12-20T16:00:00",
              "y": "14053/30000"
            },
            {
              "index": 89,
              "timeLabel": "2006-12-20T17:00:00",
              "y": "1147/2000"
            },
            {
              "index": 90,
              "timeLabel": "2006-12-20T18:00:00",
              "y": "17021/6000"
            },
            {
              "index": 91,
              "timeLabel": "2006-12-20T19:00:00",
              "y": "97459/30000"
            },
            {
              "index": 92,
              "timeLabel": "2006-12-20T20:00:00",
              "y": "6704/1875"
            },
            {
              "index": 93,
              "timeLabel": "2006-12-20T21:00:00",
              "y": "54691/15000"
            },
            {
              "index": 94,
              "timeLabel": "2006-12-20T22:00:00",
              "y": "91769/30000"
            },
            {
              "index": 95,
              "timeLabel": "2006-12-20T23:00:00",
              "y": "71453/30000"
            },
            {
              "index": 96,
              "timeLabel": "2006-12-21T00:00:00",
              "y": "11519/7500"
            },
            {
              "index": 97,
              "timeLabel": "2006-12-21T01:00:00",
              "y": "41939/30000"
            },
            {
              "index": 98,
              "timeLabel": "2006-12-21T02:00:00",
              "y": "12749/10000"
            },
            {
              "index": 99,
              "timeLabel": "2006-12-21T03:00:00",
              "y": "1513/5000"
            },
            {
              "index": 100,
              "timeLabel": "2006-12-21T04:00:00",
              "y": "3701/15000"
            },
            {
              "index": 101,
              "timeLabel": "2006-12-21T05:00:00",
              "y": "2907/10000"
            },
            {
              "index": 102,
              "timeLabel": "2006-12-21T06:00:00",
              "y": "887/3000"
            },
            {
              "index": 103,
              "timeLabel": "2006-12-21T07:00:00",
              "y": "19207/15000"
            },
            {
              "index": 104,
              "timeLabel": "2006-12-21T08:00:00",
              "y": "46891/30000"
            },
            {
              "index": 105,
              "timeLabel": "2006-12-21T09:00:00",
              "y": "12879/5000"
            },
            {
              "index": 106,
              "timeLabel": "2006-12-21T10:00:00",
              "y": "17677/10000"
            },
            {
              "index": 107,
              "timeLabel": "2006-12-21T11:00:00",
              "y": null
            },
            {
              "index": 108,
              "timeLabel": "2006-12-21T12:00:00",
              "y": "12287/15000"
            },
            {
              "index": 109,
              "timeLabel": "2006-12-21T13:00:00",
              "y": "50647/30000"
            },
            {
              "index": 110,
              "timeLabel": "2006-12-21T14:00:00",
              "y": "10239/10000"
            },
            {
              "index": 111,
              "timeLabel": "2006-12-21T15:00:00",
              "y": "1537/5000"
            },
            {
              "index": 112,
              "timeLabel": "2006-12-21T16:00:00",
              "y": "20401/15000"
            },
            {
              "index": 113,
              "timeLabel": "2006-12-21T17:00:00",
              "y": "52579/30000"
            },
            {
              "index": 114,
              "timeLabel": "2006-12-21T18:00:00",
              "y": "24433/10000"
            },
            {
              "index": 115,
              "timeLabel": "2006-12-21T19:00:00",
              "y": "32957/15000"
            },
            {
              "index": 116,
              "timeLabel": "2006-12-21T20:00:00",
              "y": "73121/30000"
            },
            {
              "index": 117,
              "timeLabel": "2006-12-21T21:00:00",
              "y": "7367/7500"
            },
            {
              "index": 118,
              "timeLabel": "2006-12-21T22:00:00",
              "y": "1051/3750"
            },
            {
              "index": 119,
              "timeLabel": "2006-12-21T23:00:00",
              "y": "8113/30000"
            },
            {
              "index": 120,
              "timeLabel": "2006-12-22T00:00:00",
              "y": "1001/3750"
            },
            {
              "index": 121,
              "timeLabel": "2006-12-22T01:00:00",
              "y": "34/125"
            },
            {
              "index": 122,
              "timeLabel": "2006-12-22T02:00:00",
              "y": "8029/30000"
            },
            {
              "index": 123,
              "timeLabel": "2006-12-22T03:00:00",
              "y": "1027/3750"
            },
            {
              "index": 124,
              "timeLabel": "2006-12-22T04:00:00",
              "y": "991/3750"
            },
            {
              "index": 125,
              "timeLabel": "2006-12-22T05:00:00",
              "y": "4841/6000"
            },
            {
              "index": 126,
              "timeLabel": "2006-12-22T06:00:00",
              "y": "14389/30000"
            },
            {
              "index": 127,
              "timeLabel": "2006-12-22T07:00:00",
              "y": "1077/625"
            },
            {
              "index": 128,
              "timeLabel": "2006-12-22T08:00:00",
              "y": "6861/2500"
            },
            {
              "index": 129,
              "timeLabel": "2006-12-22T09:00:00",
              "y": "18963/10000"
            },
            {
              "index": 130,
              "timeLabel": "2006-12-22T10:00:00",
              "y": "40349/30000"
            },
            {
              "index": 131,
              "timeLabel": "2006-12-22T11:00:00",
              "y": "37577/30000"
            },
            {
              "index": 132,
              "timeLabel": "2006-12-22T12:00:00",
              "y": "18427/15000"
            },
            {
              "index": 133,
              "timeLabel": "2006-12-22T13:00:00",
              "y": "6719/10000"
            },
            {
              "index": 134,
              "timeLabel": "2006-12-22T14:00:00",
              "y": "24467/30000"
            },
            {
              "index": 135,
              "timeLabel": "2006-12-22T15:00:00",
              "y": "43549/30000"
            },
            {
              "index": 136,
              "timeLabel": "2006-12-22T16:00:00",
              "y": "982/625"
            },
            {
              "index": 137,
              "timeLabel": "2006-12-22T17:00:00",
              "y": "1871/1250"
            },
            {
              "index": 138,
              "timeLabel": "2006-12-22T18:00:00",
              "y": "80609/30000"
            },
            {
              "index": 139,
              "timeLabel": "2006-12-22T19:00:00",
              "y": "23629/6000"
            },
            {
              "index": 140,
              "timeLabel": "2006-12-22T20:00:00",
              "y": "53041/15000"
            },
            {
              "index": 141,
              "timeLabel": "2006-12-22T21:00:00",
              "y": "6823/1500"
            },
            {
              "index": 142,
              "timeLabel": "2006-12-22T22:00:00",
              "y": "5747/1875"
            },
            {
              "index": 143,
              "timeLabel": "2006-12-22T23:00:00",
              "y": "1512/625"
            },
            {
              "index": 144,
              "timeLabel": "2006-12-23T00:00:00",
              "y": "50947/30000"
            },
            {
              "index": 145,
              "timeLabel": "2006-12-23T01:00:00",
              "y": "4307/2500"
            },
            {
              "index": 146,
              "timeLabel": "2006-12-23T02:00:00",
              "y": "51023/30000"
            },
            {
              "index": 147,
              "timeLabel": "2006-12-23T03:00:00",
              "y": "26573/15000"
            },
            {
              "index": 148,
              "timeLabel": "2006-12-23T04:00:00",
              "y": "4729/2500"
            },
            {
              "index": 149,
              "timeLabel": "2006-12-23T05:00:00",
              "y": "22291/10000"
            },
            {
              "index": 150,
              "timeLabel": "2006-12-23T06:00:00",
              "y": "49481/30000"
            },
            {
              "index": 151,
              "timeLabel": "2006-12-23T07:00:00",
              "y": "120701/30000"
            },
            {
              "index": 152,
              "timeLabel": "2006-12-23T08:00:00",
              "y": "5029/1200"
            },
            {
              "index": 153,
              "timeLabel": "2006-12-23T09:00:00",
              "y": "2029/625"
            },
            {
              "index": 154,
              "timeLabel": "2006-12-23T10:00:00",
              "y": "17833/6000"
            },
            {
              "index": 155,
              "timeLabel": "2006-12-23T11:00:00",
              "y": "3159/1000"
            },
            {
              "index": 156,
              "timeLabel": "2006-12-23T12:00:00",
              "y": "3661/1250"
            },
            {
              "index": 157,
              "timeLabel": "2006-12-23T13:00:00",
              "y": "34063/10000"
            },
            {
              "index": 158,
              "timeLabel": "2006-12-23T14:00:00",
              "y": "112739/30000"
            },
            {
              "index": 159,
              "timeLabel": "2006-12-23T15:00:00",
              "y": "40491/10000"
            },
            {
              "index": 160,
              "timeLabel": "2006-12-23T16:00:00",
              "y": "43491/10000"
            },
            {
              "index": 161,
              "timeLabel": "2006-12-23T17:00:00",
              "y": "20447/3750"
            },
            {
              "index": 162,
              "timeLabel": "2006-12-23T18:00:00",
              "y": "19397/5000"
            },
            {
              "index": 163,
              "timeLabel": "2006-12-23T19:00:00",
              "y": "24707/6000"
            },
            {
              "index": 164,
              "timeLabel": "2006-12-23T20:00:00",
              "y": "20907/5000"
            },
            {
              "index": 165,
              "timeLabel": "2006-12-23T21:00:00",
              "y": "98653/30000"
            },
            {
              "index": 166,
              "timeLabel": "2006-12-23T22:00:00",
              "y": "64919/15000"
            },
            {
              "index": 167,
              "timeLabel": "2006-12-23T23:00:00",
              "y": "83437/15000"
            },
            {
              "index": 168,
              "timeLabel": "2006-12-24T00:00:00",
              "y": "1007/250"
            },
            {
              "index": 169,
              "timeLabel": "2006-12-24T01:00:00",
              "y": "32757/10000"
            },
            {
              "index": 170,
              "timeLabel": "2006-12-24T02:00:00",
              "y": "69091/30000"
            },
            {
              "index": 171,
              "timeLabel": "2006-12-24T03:00:00",
              "y": "48203/30000"
            },
            {
              "index": 172,
              "timeLabel": "2006-12-24T04:00:00",
              "y": "15761/10000"
            },
            {
              "index": 173,
              "timeLabel": "2006-12-24T05:00:00",
              "y": "16319/10000"
            },
            {
              "index": 174,
              "timeLabel": "2006-12-24T06:00:00",
              "y": "2369/1250"
            },
            {
              "index": 175,
              "timeLabel": "2006-12-24T07:00:00",
              "y": "3691/2500"
            },
            {
              "index": 176,
              "timeLabel": "2006-12-24T08:00:00",
              "y": "42833/30000"
            },
            {
              "index": 177,
              "timeLabel": "2006-12-24T09:00:00",
              "y": "8177/3000"
            },
            {
              "index": 178,
              "timeLabel": "2006-12-24T10:00:00",
              "y": "4013/1500"
            },
            {
              "index": 179,
              "timeLabel": "2006-12-24T11:00:00",
              "y": "15697/7500"
            },
            {
              "index": 180,
              "timeLabel": "2006-12-24T12:00:00",
              "y": "3/2"
            },
            {
              "index": 181,
              "timeLabel": "2006-12-24T13:00:00",
              "y": "48599/15000"
            },
            {
              "index": 182,
              "timeLabel": "2006-12-24T14:00:00",
              "y": "20573/15000"
            },
            {
              "index": 183,
              "timeLabel": "2006-12-24T15:00:00",
              "y": "18581/6000"
            },
            {
              "index": 184,
              "timeLabel": "2006-12-24T16:00:00",
              "y": "30107/15000"
            },
            {
              "index": 185,
              "timeLabel": "2006-12-24T17:00:00",
              "y": "3373/2000"
            },
            {
              "index": 186,
              "timeLabel": "2006-12-24T18:00:00",
              "y": "1263/2500"
            },
            {
              "index": 187,
              "timeLabel": "2006-12-24T19:00:00",
              "y": "13621/30000"
            },
            {
              "index": 188,
              "timeLabel": "2006-12-24T20:00:00",
              "y": "4741/10000"
            },
            {
              "index": 189,
              "timeLabel": "2006-12-24T21:00:00",
              "y": "14521/30000"
            },
            {
              "index": 190,
              "timeLabel": "2006-12-24T22:00:00",
              "y": "14393/30000"
            },
            {
              "index": 191,
              "timeLabel": "2006-12-24T23:00:00",
              "y": "1459/3000"
            },
            {
              "index": 192,
              "timeLabel": "2006-12-25T00:00:00",
              "y": "29987/30000"
            },
            {
              "index": 193,
              "timeLabel": "2006-12-25T01:00:00",
              "y": "36203/30000"
            },
            {
              "index": 194,
              "timeLabel": "2006-12-25T02:00:00",
              "y": "219/500"
            },
            {
              "index": 195,
              "timeLabel": "2006-12-25T03:00:00",
              "y": "17699/30000"
            },
            {
              "index": 196,
              "timeLabel": "2006-12-25T04:00:00",
              "y": "217/375"
            },
            {
              "index": 197,
              "timeLabel": "2006-12-25T05:00:00",
              "y": "6201/10000"
            },
            {
              "index": 198,
              "timeLabel": "2006-12-25T06:00:00",
              "y": "3961/15000"
            },
            {
              "index": 199,
              "timeLabel": "2006-12-25T07:00:00",
              "y": "423/625"
            },
            {
              "index": 200,
              "timeLabel": "2006-12-25T08:00:00",
              "y": "26111/10000"
            },
            {
              "index": 201,
              "timeLabel": "2006-12-25T09:00:00",
              "y": "11201/7500"
            },
            {
              "index": 202,
              "timeLabel": "2006-12-25T10:00:00",
              "y": "5747/3000"
            },
            {
              "index": 203,
              "timeLabel": "2006-12-25T11:00:00",
              "y": "15223/5000"
            },
            {
              "index": 204,
              "timeLabel": "2006-12-25T12:00:00",
              "y": "14563/5000"
            },
            {
              "index": 205,
              "timeLabel": "2006-12-25T13:00:00",
              "y": "16687/7500"
            },
            {
              "index": 206,
              "timeLabel": "2006-12-25T14:00:00",
              "y": "6689/3750"
            },
            {
              "index": 207,
              "timeLabel": "2006-12-25T15:00:00",
              "y": "5221/3000"
            },
            {
              "index": 208,
              "timeLabel": "2006-12-25T16:00:00",
              "y": "23237/6000"
            },
            {
              "index": 209,
              "timeLabel": "2006-12-25T17:00:00",
              "y": "10359/5000"
            },
            {
              "index": 210,
              "timeLabel": "2006-12-25T18:00:00",
              "y": "18173/7500"
            },
            {
              "index": 211,
              "timeLabel": "2006-12-25T19:00:00",
              "y": "3259/2000"
            },
            {
              "index": 212,
              "timeLabel": "2006-12-25T20:00:00",
              "y": "29657/15000"
            },
            {
              "index": 213,
              "timeLabel": "2006-12-25T21:00:00",
              "y": "57553/15000"
            },
            {
              "index": 214,
              "timeLabel": "2006-12-25T22:00:00",
              "y": "63223/15000"
            },
            {
              "index": 215,
              "timeLabel": "2006-12-25T23:00:00",
              "y": "77767/30000"
            },
            {
              "index": 216,
              "timeLabel": "2006-12-26T00:00:00",
              "y": "9091/3750"
            },
            {
              "index": 217,
              "timeLabel": "2006-12-26T01:00:00",
              "y": "72079/30000"
            },
            {
              "index": 218,
              "timeLabel": "2006-12-26T02:00:00",
              "y": "9041/3750"
            },
            {
              "index": 219,
              "timeLabel": "2006-12-26T03:00:00",
              "y": "4592/1875"
            },
            {
              "index": 220,
              "timeLabel": "2006-12-26T04:00:00",
              "y": "1197/400"
            },
            {
              "index": 221,
              "timeLabel": "2006-12-26T05:00:00",
              "y": "4477/1875"
            },
            {
              "index": 222,
              "timeLabel": "2006-12-26T06:00:00",
              "y": "11941/5000"
            },
            {
              "index": 223,
              "timeLabel": "2006-12-26T07:00:00",
              "y": "47041/15000"
            },
            {
              "index": 224,
              "timeLabel": "2006-12-26T08:00:00",
              "y": "35489/15000"
            },
            {
              "index": 225,
              "timeLabel": "2006-12-26T09:00:00",
              "y": "6647/1875"
            },
            {
              "index": 226,
              "timeLabel": "2006-12-26T10:00:00",
              "y": "40419/10000"
            },
            {
              "index": 227,
              "timeLabel": "2006-12-26T11:00:00",
              "y": "35603/15000"
            },
            {
              "index": 228,
              "timeLabel": "2006-12-26T12:00:00",
              "y": "24647/10000"
            },
            {
              "index": 229,
              "timeLabel": "2006-12-26T13:00:00",
              "y": "7217/2500"
            },
            {
              "index": 230,
              "timeLabel": "2006-12-26T14:00:00",
              "y": "19133/5000"
            },
            {
              "index": 231,
              "timeLabel": "2006-12-26T15:00:00",
              "y": "3287/1250"
            },
            {
              "index": 232,
              "timeLabel": "2006-12-26T16:00:00",
              "y": "51761/15000"
            },
            {
              "index": 233,
              "timeLabel": "2006-12-26T17:00:00",
              "y": "10027/3000"
            },
            {
              "index": 234,
              "timeLabel": "2006-12-26T18:00:00",
              "y": "32467/10000"
            },
            {
              "index": 235,
              "timeLabel": "2006-12-26T19:00:00",
              "y": "1517/500"
            },
            {
              "index": 236,
              "timeLabel": "2006-12-26T20:00:00",
              "y": "3479/1000"
            },
            {
              "index": 237,
              "timeLabel": "2006-12-26T21:00:00",
              "y": "3323/1250"
            },
            {
              "index": 238,
              "timeLabel": "2006-12-26T22:00:00",
              "y": "2159/2500"
            },
            {
              "index": 239,
              "timeLabel": "2006-12-26T23:00:00",
              "y": "3841/5000"
            },
            {
              "index": 240,
              "timeLabel": "2006-12-27T00:00:00",
              "y": "14489/30000"
            },
            {
              "index": 241,
              "timeLabel": "2006-12-27T01:00:00",
              "y": "3701/7500"
            },
            {
              "index": 242,
              "timeLabel": "2006-12-27T02:00:00",
              "y": "959/2000"
            },
            {
              "index": 243,
              "timeLabel": "2006-12-27T03:00:00",
              "y": "3331/7500"
            },
            {
              "index": 244,
              "timeLabel": "2006-12-27T04:00:00",
              "y": "14221/30000"
            },
            {
              "index": 245,
              "timeLabel": "2006-12-27T05:00:00",
              "y": "3887/3750"
            },
            {
              "index": 246,
              "timeLabel": "2006-12-27T06:00:00",
              "y": "593/1250"
            },
            {
              "index": 247,
              "timeLabel": "2006-12-27T07:00:00",
              "y": "7687/3750"
            },
            {
              "index": 248,
              "timeLabel": "2006-12-27T08:00:00",
              "y": "32471/15000"
            },
            {
              "index": 249,
              "timeLabel": "2006-12-27T09:00:00",
              "y": "69869/30000"
            },
            {
              "index": 250,
              "timeLabel": "2006-12-27T10:00:00",
              "y": "69509/30000"
            },
            {
              "index": 251,
              "timeLabel": "2006-12-27T11:00:00",
              "y": "3289/2500"
            },
            {
              "index": 252,
              "timeLabel": "2006-12-27T12:00:00",
              "y": "674/625"
            },
            {
              "index": 253,
              "timeLabel": "2006-12-27T13:00:00",
              "y": "317/1200"
            },
            {
              "index": 254,
              "timeLabel": "2006-12-27T14:00:00",
              "y": "1583/6000"
            },
            {
              "index": 255,
              "timeLabel": "2006-12-27T15:00:00",
              "y": "833/2500"
            },
            {
              "index": 256,
              "timeLabel": "2006-12-27T16:00:00",
              "y": "371/1250"
            },
            {
              "index": 257,
              "timeLabel": "2006-12-27T17:00:00",
              "y": "7519/15000"
            },
            {
              "index": 258,
              "timeLabel": "2006-12-27T18:00:00",
              "y": "4561/2500"
            },
            {
              "index": 259,
              "timeLabel": "2006-12-27T19:00:00",
              "y": "6511/3750"
            },
            {
              "index": 260,
              "timeLabel": "2006-12-27T20:00:00",
              "y": "23531/10000"
            },
            {
              "index": 261,
              "timeLabel": "2006-12-27T21:00:00",
              "y": "9973/7500"
            },
            {
              "index": 262,
              "timeLabel": "2006-12-27T22:00:00",
              "y": "2167/2000"
            },
            {
              "index": 263,
              "timeLabel": "2006-12-27T23:00:00",
              "y": "707/2000"
            },
            {
              "index": 264,
              "timeLabel": "2006-12-28T00:00:00",
              "y": "7639/7500"
            },
            {
              "index": 265,
              "timeLabel": "2006-12-28T01:00:00",
              "y": "2083/7500"
            },
            {
              "index": 266,
              "timeLabel": "2006-12-28T02:00:00",
              "y": "1897/6000"
            },
            {
              "index": 267,
              "timeLabel": "2006-12-28T03:00:00",
              "y": "747/2500"
            },
            {
              "index": 268,
              "timeLabel": "2006-12-28T04:00:00",
              "y": "3101/10000"
            },
            {
              "index": 269,
              "timeLabel": "2006-12-28T05:00:00",
              "y": "1447/5000"
            },
            {
              "index": 270,
              "timeLabel": "2006-12-28T06:00:00",
              "y": "8777/30000"
            },
            {
              "index": 271,
              "timeLabel": "2006-12-28T07:00:00",
              "y": "313/300"
            },
            {
              "index": 272,
              "timeLabel": "2006-12-28T08:00:00",
              "y": "9509/3750"
            },
            {
              "index": 273,
              "timeLabel": "2006-12-28T09:00:00",
              "y": "19823/15000"
            },
            {
              "index": 274,
              "timeLabel": "2006-12-28T10:00:00",
              "y": "4891/15000"
            },
            {
              "index": 275,
              "timeLabel": "2006-12-28T11:00:00",
              "y": "4199/15000"
            },
            {
              "index": 276,
              "timeLabel": "2006-12-28T12:00:00",
              "y": "271/1000"
            },
            {
              "index": 277,
              "timeLabel": "2006-12-28T13:00:00",
              "y": "20959/30000"
            },
            {
              "index": 278,
              "timeLabel": "2006-12-28T14:00:00",
              "y": "54257/30000"
            },
            {
              "index": 279,
              "timeLabel": "2006-12-28T15:00:00",
              "y": "4723/3000"
            },
            {
              "index": 280,
              "timeLabel": "2006-12-28T16:00:00",
              "y": "46769/30000"
            },
            {
              "index": 281,
              "timeLabel": "2006-12-28T17:00:00",
              "y": "4561/1875"
            },
            {
              "index": 282,
              "timeLabel": "2006-12-28T18:00:00",
              "y": "25439/10000"
            },
            {
              "index": 283,
              "timeLabel": "2006-12-28T19:00:00",
              "y": "5697/2000"
            },
            {
              "index": 284,
              "timeLabel": "2006-12-28T20:00:00",
              "y": "63503/30000"
            },
            {
              "index": 285,
              "timeLabel": "2006-12-28T21:00:00",
              "y": "7553/1500"
            },
            {
              "index": 286,
              "timeLabel": "2006-12-28T22:00:00",
              "y": "16071/5000"
            },
            {
              "index": 287,
              "timeLabel": "2006-12-28T23:00:00",
              "y": "3197/1500"
            },
            {
              "index": 288,
              "timeLabel": "2006-12-29T00:00:00",
              "y": "1057/750"
            },
            {
              "index": 289,
              "timeLabel": "2006-12-29T01:00:00",
              "y": "2393/1200"
            },
            {
              "index": 290,
              "timeLabel": "2006-12-29T02:00:00",
              "y": "64549/30000"
            },
            {
              "index": 291,
              "timeLabel": "2006-12-29T03:00:00",
              "y": "3679/1500"
            },
            {
              "index": 292,
              "timeLabel": "2006-12-29T04:00:00",
              "y": "74143/30000"
            },
            {
              "index": 293,
              "timeLabel": "2006-12-29T05:00:00",
              "y": "23861/10000"
            },
            {
              "index": 294,
              "timeLabel": "2006-12-29T06:00:00",
              "y": "24389/10000"
            },
            {
              "index": 295,
              "timeLabel": "2006-12-29T07:00:00",
              "y": "115163/30000"
            },
            {
              "index": 296,
              "timeLabel": "2006-12-29T08:00:00",
              "y": "110843/30000"
            },
            {
              "index": 297,
              "timeLabel": "2006-12-29T09:00:00",
              "y": "34349/10000"
            },
            {
              "index": 298,
              "timeLabel": "2006-12-29T10:00:00",
              "y": "18169/7500"
            },
            {
              "index": 299,
              "timeLabel": "2006-12-29T11:00:00",
              "y": "1667/1200"
            },
            {
              "index": 300,
              "timeLabel": "2006-12-29T12:00:00",
              "y": "2917/1875"
            },
            {
              "index": 301,
              "timeLabel": "2006-12-29T13:00:00",
              "y": "641/375"
            },
            {
              "index": 302,
              "timeLabel": "2006-12-29T14:00:00",
              "y": "2837/2000"
            },
            {
              "index": 303,
              "timeLabel": "2006-12-29T15:00:00",
              "y": "6281/10000"
            },
            {
              "index": 304,
              "timeLabel": "2006-12-29T16:00:00",
              "y": "596/1875"
            },
            {
              "index": 305,
              "timeLabel": "2006-12-29T17:00:00",
              "y": "2231/2500"
            },
            {
              "index": 306,
              "timeLabel": "2006-12-29T18:00:00",
              "y": "56779/30000"
            },
            {
              "index": 307,
              "timeLabel": "2006-12-29T19:00:00",
              "y": "2687/1500"
            },
            {
              "index": 308,
              "timeLabel": "2006-12-29T20:00:00",
              "y": "20831/6000"
            },
            {
              "index": 309,
              "timeLabel": "2006-12-29T21:00:00",
              "y": "32353/7500"
            },
            {
              "index": 310,
              "timeLabel": "2006-12-29T22:00:00",
              "y": "109981/30000"
            },
            {
              "index": 311,
              "timeLabel": "2006-12-29T23:00:00",
              "y": "1747/1500"
            },
            {
              "index": 312,
              "timeLabel": "2006-12-30T00:00:00",
              "y": "2947/10000"
            },
            {
              "index": 313,
              "timeLabel": "2006-12-30T01:00:00",
              "y": "3153/10000"
            },
            {
              "index": 314,
              "timeLabel": "2006-12-30T02:00:00",
              "y": "8383/30000"
            },
            {
              "index": 315,
              "timeLabel": "2006-12-30T03:00:00",
              "y": "9173/30000"
            },
            {
              "index": 316,
              "timeLabel": "2006-12-30T04:00:00",
              "y": "2257/7500"
            },
            {
              "index": 317,
              "timeLabel": "2006-12-30T05:00:00",
              "y": "1667/6000"
            },
            {
              "index": 318,
              "timeLabel": "2006-12-30T06:00:00",
              "y": "27203/30000"
            },
            {
              "index": 319,
              "timeLabel": "2006-12-30T07:00:00",
              "y": "7697/30000"
            },
            {
              "index": 320,
              "timeLabel": "2006-12-30T08:00:00",
              "y": "22751/15000"
            },
            {
              "index": 321,
              "timeLabel": "2006-12-30T09:00:00",
              "y": "97073/30000"
            },
            {
              "index": 322,
              "timeLabel": "2006-12-30T10:00:00",
              "y": null
            },
            {
              "index": 323,
              "timeLabel": "2006-12-30T11:00:00",
              "y": "7286/1875"
            },
            {
              "index": 324,
              "timeLabel": "2006-12-30T12:00:00",
              "y": "31451/10000"
            },
            {
              "index": 325,
              "timeLabel": "2006-12-30T13:00:00",
              "y": "68789/30000"
            },
            {
              "index": 326,
              "timeLabel": "2006-12-30T14:00:00",
              "y": "26849/15000"
            },
            {
              "index": 327,
              "timeLabel": "2006-12-30T15:00:00",
              "y": "36743/15000"
            },
            {
              "index": 328,
              "timeLabel": "2006-12-30T16:00:00",
              "y": "118667/30000"
            },
            {
              "index": 329,
              "timeLabel": "2006-12-30T17:00:00",
              "y": "15487/6000"
            },
            {
              "index": 330,
              "timeLabel": "2006-12-30T18:00:00",
              "y": "38627/10000"
            },
            {
              "index": 331,
              "timeLabel": "2006-12-30T19:00:00",
              "y": "112591/30000"
            },
            {
              "index": 332,
              "timeLabel": "2006-12-30T20:00:00",
              "y": "46141/15000"
            },
            {
              "index": 333,
              "timeLabel": "2006-12-30T21:00:00",
              "y": "1019/500"
            },
            {
              "index": 334,
              "timeLabel": "2006-12-30T22:00:00",
              "y": "11237/15000"
            },
            {
              "index": 335,
              "timeLabel": "2006-12-30T23:00:00",
              "y": "3551/5000"
            },
            {
              "index": 336,
              "timeLabel": "2006-12-31T00:00:00",
              "y": "20287/30000"
            },
            {
              "index": 337,
              "timeLabel": "2006-12-31T01:00:00",
              "y": "4297/6000"
            },
            {
              "index": 338,
              "timeLabel": "2006-12-31T02:00:00",
              "y": "10829/15000"
            },
            {
              "index": 339,
              "timeLabel": "2006-12-31T03:00:00",
              "y": "23357/30000"
            },
            {
              "index": 340,
              "timeLabel": "2006-12-31T04:00:00",
              "y": "38333/30000"
            },
            {
              "index": 341,
              "timeLabel": "2006-12-31T05:00:00",
              "y": "31523/30000"
            },
            {
              "index": 342,
              "timeLabel": "2006-12-31T06:00:00",
              "y": "75041/30000"
            },
            {
              "index": 343,
              "timeLabel": "2006-12-31T07:00:00",
              "y": "6729/2000"
            },
            {
              "index": 344,
              "timeLabel": "2006-12-31T08:00:00",
              "y": "122537/30000"
            },
            {
              "index": 345,
              "timeLabel": "2006-12-31T09:00:00",
              "y": "1702/625"
            },
            {
              "index": 346,
              "timeLabel": "2006-12-31T10:00:00",
              "y": "10931/3750"
            },
            {
              "index": 347,
              "timeLabel": "2006-12-31T11:00:00",
              "y": "6719/2000"
            },
            {
              "index": 348,
              "timeLabel": "2006-12-31T12:00:00",
              "y": "115589/30000"
            },
            {
              "index": 349,
              "timeLabel": "2006-12-31T13:00:00",
              "y": "108077/30000"
            },
            {
              "index": 350,
              "timeLabel": "2006-12-31T14:00:00",
              "y": "30813/10000"
            },
            {
              "index": 351,
              "timeLabel": "2006-12-31T15:00:00",
              "y": "9331/3750"
            },
            {
              "index": 352,
              "timeLabel": "2006-12-31T16:00:00",
              "y": "1419/500"
            },
            {
              "index": 353,
              "timeLabel": "2006-12-31T17:00:00",
              "y": "20627/7500"
            },
            {
              "index": 354,
              "timeLabel": "2006-12-31T18:00:00",
              "y": "36157/15000"
            },
            {
              "index": 355,
              "timeLabel": "2006-12-31T19:00:00",
              "y": "18257/7500"
            },
            {
              "index": 356,
              "timeLabel": "2006-12-31T20:00:00",
              "y": "18187/7500"
            },
            {
              "index": 357,
              "timeLabel": "2006-12-31T21:00:00",
              "y": "73309/30000"
            },
            {
              "index": 358,
              "timeLabel": "2006-12-31T22:00:00",
              "y": "659/250"
            },
            {
              "index": 359,
              "timeLabel": "2006-12-31T23:00:00",
              "y": "93133/30000"
            },
            {
              "index": 360,
              "timeLabel": "2007-01-01T00:00:00",
              "y": "76519/30000"
            },
            {
              "index": 361,
              "timeLabel": "2007-01-01T01:00:00",
              "y": "12617/5000"
            },
            {
              "index": 362,
              "timeLabel": "2007-01-01T02:00:00",
              "y": "7747/3000"
            },
            {
              "index": 363,
              "timeLabel": "2007-01-01T03:00:00",
              "y": "61/24"
            },
            {
              "index": 364,
              "timeLabel": "2007-01-01T04:00:00",
              "y": "4642/1875"
            },
            {
              "index": 365,
              "timeLabel": "2007-01-01T05:00:00",
              "y": "74287/30000"
            },
            {
              "index": 366,
              "timeLabel": "2007-01-01T06:00:00",
              "y": "12279/5000"
            },
            {
              "index": 367,
              "timeLabel": "2007-01-01T07:00:00",
              "y": "3059/1250"
            },
            {
              "index": 368,
              "timeLabel": "2007-01-01T08:00:00",
              "y": "18313/7500"
            },
            {
              "index": 369,
              "timeLabel": "2007-01-01T09:00:00",
              "y": "5899/1875"
            },
            {
              "index": 370,
              "timeLabel": "2007-01-01T10:00:00",
              "y": "19963/7500"
            },
            {
              "index": 371,
              "timeLabel": "2007-01-01T11:00:00",
              "y": "322/125"
            },
            {
              "index": 372,
              "timeLabel": "2007-01-01T12:00:00",
              "y": "19619/7500"
            },
            {
              "index": 373,
              "timeLabel": "2007-01-01T13:00:00",
              "y": "2703/1250"
            },
            {
              "index": 374,
              "timeLabel": "2007-01-01T14:00:00",
              "y": "809/625"
            },
            {
              "index": 375,
              "timeLabel": "2007-01-01T15:00:00",
              "y": "2291/1200"
            },
            {
              "index": 376,
              "timeLabel": "2007-01-01T16:00:00",
              "y": "13901/10000"
            },
            {
              "index": 377,
              "timeLabel": "2007-01-01T17:00:00",
              "y": "24481/15000"
            },
            {
              "index": 378,
              "timeLabel": "2007-01-01T18:00:00",
              "y": "14619/10000"
            },
            {
              "index": 379,
              "timeLabel": "2007-01-01T19:00:00",
              "y": "7323/10000"
            },
            {
              "index": 380,
              "timeLabel": "2007-01-01T20:00:00",
              "y": "4123/10000"
            },
            {
              "index": 381,
              "timeLabel": "2007-01-01T21:00:00",
              "y": "6509/15000"
            },
            {
              "index": 382,
              "timeLabel": "2007-01-01T22:00:00",
              "y": "832/1875"
            },
            {
              "index": 383,
              "timeLabel": "2007-01-01T23:00:00",
              "y": "13499/30000"
            },
            {
              "index": 384,
              "timeLabel": "2007-01-02T00:00:00",
              "y": "13393/30000"
            },
            {
              "index": 385,
              "timeLabel": "2007-01-02T01:00:00",
              "y": "6551/15000"
            },
            {
              "index": 386,
              "timeLabel": "2007-01-02T02:00:00",
              "y": "12947/30000"
            },
            {
              "index": 387,
              "timeLabel": "2007-01-02T03:00:00",
              "y": "557/1200"
            },
            {
              "index": 388,
              "timeLabel": "2007-01-02T04:00:00",
              "y": "31199/30000"
            },
            {
              "index": 389,
              "timeLabel": "2007-01-02T05:00:00",
              "y": "3553/5000"
            },
            {
              "index": 390,
              "timeLabel": "2007-01-02T06:00:00",
              "y": "13409/30000"
            },
            {
              "index": 391,
              "timeLabel": "2007-01-02T07:00:00",
              "y": "12377/30000"
            },
            {
              "index": 392,
              "timeLabel": "2007-01-02T08:00:00",
              "y": "284/625"
            },
            {
              "index": 393,
              "timeLabel": "2007-01-02T09:00:00",
              "y": "12529/30000"
            },
            {
              "index": 394,
              "timeLabel": "2007-01-02T10:00:00",
              "y": "4459/10000"
            },
            {
              "index": 395,
              "timeLabel": "2007-01-02T11:00:00",
              "y": "12983/30000"
            },
            {
              "index": 396,
              "timeLabel": "2007-01-02T12:00:00",
              "y": "12779/30000"
            },
            {
              "index": 397,
              "timeLabel": "2007-01-02T13:00:00",
              "y": "459/1000"
            },
            {
              "index": 398,
              "timeLabel": "2007-01-02T14:00:00",
              "y": "13153/30000"
            },
            {
              "index": 399,
              "timeLabel": "2007-01-02T15:00:00",
              "y": "14381/10000"
            },
            {
              "index": 400,
              "timeLabel": "2007-01-02T16:00:00",
              "y": "10943/7500"
            },
            {
              "index": 401,
              "timeLabel": "2007-01-02T17:00:00",
              "y": "10681/5000"
            },
            {
              "index": 402,
              "timeLabel": "2007-01-02T18:00:00",
              "y": "29581/15000"
            },
            {
              "index": 403,
              "timeLabel": "2007-01-02T19:00:00",
              "y": "15183/10000"
            },
            {
              "index": 404,
              "timeLabel": "2007-01-02T20:00:00",
              "y": "38603/15000"
            },
            {
              "index": 405,
              "timeLabel": "2007-01-02T21:00:00",
              "y": "39643/30000"
            },
            {
              "index": 406,
              "timeLabel": "2007-01-02T22:00:00",
              "y": "15847/30000"
            },
            {
              "index": 407,
              "timeLabel": "2007-01-02T23:00:00",
              "y": "7439/10000"
            },
            {
              "index": 408,
              "timeLabel": "2007-01-03T00:00:00",
              "y": "33763/30000"
            },
            {
              "index": 409,
              "timeLabel": "2007-01-03T01:00:00",
              "y": "9007/10000"
            },
            {
              "index": 410,
              "timeLabel": "2007-01-03T02:00:00",
              "y": "1829/6000"
            },
            {
              "index": 411,
              "timeLabel": "2007-01-03T03:00:00",
              "y": "3333/10000"
            },
            {
              "index": 412,
              "timeLabel": "2007-01-03T04:00:00",
              "y": "1793/6000"
            },
            {
              "index": 413,
              "timeLabel": "2007-01-03T05:00:00",
              "y": "28549/30000"
            },
            {
              "index": 414,
              "timeLabel": "2007-01-03T06:00:00",
              "y": "1003/3000"
            },
            {
              "index": 415,
              "timeLabel": "2007-01-03T07:00:00",
              "y": "3017/10000"
            },
            {
              "index": 416,
              "timeLabel": "2007-01-03T08:00:00",
              "y": "799/2500"
            },
            {
              "index": 417,
              "timeLabel": "2007-01-03T09:00:00",
              "y": "241/400"
            },
            {
              "index": 418,
              "timeLabel": "2007-01-03T10:00:00",
              "y": "26227/30000"
            },
            {
              "index": 419,
              "timeLabel": "2007-01-03T11:00:00",
              "y": "2441/2500"
            },
            {
              "index": 420,
              "timeLabel": "2007-01-03T12:00:00",
              "y": "41933/30000"
            },
            {
              "index": 421,
              "timeLabel": "2007-01-03T13:00:00",
              "y": "21299/15000"
            },
            {
              "index": 422,
              "timeLabel": "2007-01-03T14:00:00",
              "y": "32711/30000"
            },
            {
              "index": 423,
              "timeLabel": "2007-01-03T15:00:00",
              "y": "151/500"
            },
            {
              "index": 424,
              "timeLabel": "2007-01-03T16:00:00",
              "y": "1103/3000"
            },
            {
              "index": 425,
              "timeLabel": "2007-01-03T17:00:00",
              "y": "4277/15000"
            },
            {
              "index": 426,
              "timeLabel": "2007-01-03T18:00:00",
              "y": "903/2500"
            },
            {
              "index": 427,
              "timeLabel": "2007-01-03T19:00:00",
              "y": "289/1000"
            },
            {
              "index": 428,
              "timeLabel": "2007-01-03T20:00:00",
              "y": "2447/7500"
            },
            {
              "index": 429,
              "timeLabel": "2007-01-03T21:00:00",
              "y": "33463/30000"
            },
            {
              "index": 430,
              "timeLabel": "2007-01-03T22:00:00",
              "y": "28621/30000"
            },
            {
              "index": 431,
              "timeLabel": "2007-01-03T23:00:00",
              "y": "8343/5000"
            },
            {
              "index": 432,
              "timeLabel": "2007-01-04T00:00:00",
              "y": "25313/7500"
            },
            {
              "index": 433,
              "timeLabel": "2007-01-04T01:00:00",
              "y": "43451/15000"
            },
            {
              "index": 434,
              "timeLabel": "2007-01-04T02:00:00",
              "y": "3581/1500"
            },
            {
              "index": 435,
              "timeLabel": "2007-01-04T03:00:00",
              "y": "70861/30000"
            },
            {
              "index": 436,
              "timeLabel": "2007-01-04T04:00:00",
              "y": "71101/30000"
            },
            {
              "index": 437,
              "timeLabel": "2007-01-04T05:00:00",
              "y": "5863/2500"
            },
            {
              "index": 438,
              "timeLabel": "2007-01-04T06:00:00",
              "y": "35381/15000"
            },
            {
              "index": 439,
              "timeLabel": "2007-01-04T07:00:00",
              "y": "69787/30000"
            },
            {
              "index": 440,
              "timeLabel": "2007-01-04T08:00:00",
              "y": "12019/5000"
            },
            {
              "index": 441,
              "timeLabel": "2007-01-04T09:00:00",
              "y": "20003/7500"
            },
            {
              "index": 442,
              "timeLabel": "2007-01-04T10:00:00",
              "y": "56941/30000"
            },
            {
              "index": 443,
              "timeLabel": "2007-01-04T11:00:00",
              "y": "6019/3000"
            },
            {
              "index": 444,
              "timeLabel": "2007-01-04T12:00:00",
              "y": "121997/30000"
            },
            {
              "index": 445,
              "timeLabel": "2007-01-04T13:00:00",
              "y": "6647/1875"
            },
            {
              "index": 446,
              "timeLabel": "2007-01-04T14:00:00",
              "y": "5033/2500"
            },
            {
              "index": 447,
              "timeLabel": "2007-01-04T15:00:00",
              "y": "8793/10000"
            },
            {
              "index": 448,
              "timeLabel": "2007-01-04T16:00:00",
              "y": "16449/5000"
            },
            {
              "index": 449,
              "timeLabel": "2007-01-04T17:00:00",
              "y": "27413/10000"
            },
            {
              "index": 450,
              "timeLabel": "2007-01-04T18:00:00",
              "y": "5211/2000"
            },
            {
              "index": 451,
              "timeLabel": "2007-01-04T19:00:00",
              "y": "42811/15000"
            },
            {
              "index": 452,
              "timeLabel": "2007-01-04T20:00:00",
              "y": "11239/7500"
            },
            {
              "index": 453,
              "timeLabel": "2007-01-04T21:00:00",
              "y": "1197/2500"
            },
            {
              "index": 454,
              "timeLabel": "2007-01-04T22:00:00",
              "y": "1259/3000"
            },
            {
              "index": 455,
              "timeLabel": "2007-01-04T23:00:00",
              "y": "8027/15000"
            },
            {
              "index": 456,
              "timeLabel": "2007-01-05T00:00:00",
              "y": "59041/30000"
            },
            {
              "index": 457,
              "timeLabel": "2007-01-05T01:00:00",
              "y": "14321/6000"
            },
            {
              "index": 458,
              "timeLabel": "2007-01-05T02:00:00",
              "y": "35921/15000"
            },
            {
              "index": 459,
              "timeLabel": "2007-01-05T03:00:00",
              "y": "24157/10000"
            },
            {
              "index": 460,
              "timeLabel": "2007-01-05T04:00:00",
              "y": "71911/30000"
            },
            {
              "index": 461,
              "timeLabel": "2007-01-05T05:00:00",
              "y": "72221/30000"
            },
            {
              "index": 462,
              "timeLabel": "2007-01-05T06:00:00",
              "y": "11839/5000"
            },
            {
              "index": 463,
              "timeLabel": "2007-01-05T07:00:00",
              "y": "35273/15000"
            },
            {
              "index": 464,
              "timeLabel": "2007-01-05T08:00:00",
              "y": "17377/7500"
            },
            {
              "index": 465,
              "timeLabel": "2007-01-05T09:00:00",
              "y": "11821/5000"
            },
            {
              "index": 466,
              "timeLabel": "2007-01-05T10:00:00",
              "y": "79681/30000"
            },
            {
              "index": 467,
              "timeLabel": "2007-01-05T11:00:00",
              "y": "427/1200"
            },
            {
              "index": 468,
              "timeLabel": "2007-01-05T12:00:00",
              "y": "443/1250"
            },
            {
              "index": 469,
              "timeLabel": "2007-01-05T13:00:00",
              "y": "10253/30000"
            },
            {
              "index": 470,
              "timeLabel": "2007-01-05T14:00:00",
              "y": "283/750"
            },
            {
              "index": 471,
              "timeLabel": "2007-01-05T15:00:00",
              "y": "2867/6000"
            },
            {
              "index": 472,
              "timeLabel": "2007-01-05T16:00:00",
              "y": "1673/2000"
            },
            {
              "index": 473,
              "timeLabel": "2007-01-05T17:00:00",
              "y": "33611/15000"
            },
            {
              "index": 474,
              "timeLabel": "2007-01-05T18:00:00",
              "y": "5999/2500"
            },
            {
              "index": 475,
              "timeLabel": "2007-01-05T19:00:00",
              "y": "20389/10000"
            },
            {
              "index": 476,
              "timeLabel": "2007-01-05T20:00:00",
              "y": "29757/10000"
            },
            {
              "index": 477,
              "timeLabel": "2007-01-05T21:00:00",
              "y": "3343/1250"
            },
            {
              "index": 478,
              "timeLabel": "2007-01-05T22:00:00",
              "y": "23847/10000"
            },
            {
              "index": 479,
              "timeLabel": "2007-01-05T23:00:00",
              "y": "10433/6000"
            },
            {
              "index": 480,
              "timeLabel": "2007-01-06T00:00:00",
              "y": "5599/3750"
            },
            {
              "index": 481,
              "timeLabel": "2007-01-06T01:00:00",
              "y": "3251/7500"
            },
            {
              "index": 482,
              "timeLabel": "2007-01-06T02:00:00",
              "y": "1/3"
            },
            {
              "index": 483,
              "timeLabel": "2007-01-06T03:00:00",
              "y": "4693/15000"
            },
            {
              "index": 484,
              "timeLabel": "2007-01-06T04:00:00",
              "y": "9107/30000"
            },
            {
              "index": 485,
              "timeLabel": "2007-01-06T05:00:00",
              "y": "5029/15000"
            },
            {
              "index": 486,
              "timeLabel": "2007-01-06T06:00:00",
              "y": "4481/15000"
            },
            {
              "index": 487,
              "timeLabel": "2007-01-06T07:00:00",
              "y": "337/1000"
            },
            {
              "index": 488,
              "timeLabel": "2007-01-06T08:00:00",
              "y": "1477/5000"
            },
            {
              "index": 489,
              "timeLabel": "2007-01-06T09:00:00",
              "y": "9347/15000"
            },
            {
              "index": 490,
              "timeLabel": "2007-01-06T10:00:00",
              "y": "45767/30000"
            },
            {
              "index": 491,
              "timeLabel": "2007-01-06T11:00:00",
              "y": "12961/5000"
            },
            {
              "index": 492,
              "timeLabel": "2007-01-06T12:00:00",
              "y": "15011/3750"
            },
            {
              "index": 493,
              "timeLabel": "2007-01-06T13:00:00",
              "y": "56713/30000"
            },
            {
              "index": 494,
              "timeLabel": "2007-01-06T14:00:00",
              "y": "50987/30000"
            },
            {
              "index": 495,
              "timeLabel": "2007-01-06T15:00:00",
              "y": "11487/10000"
            },
            {
              "index": 496,
              "timeLabel": "2007-01-06T16:00:00",
              "y": "13219/15000"
            },
            {
              "index": 497,
              "timeLabel": "2007-01-06T17:00:00",
              "y": "26969/30000"
            },
            {
              "index": 498,
              "timeLabel": "2007-01-06T18:00:00",
              "y": "12833/15000"
            },
            {
              "index": 499,
              "timeLabel": "2007-01-06T19:00:00",
              "y": "55021/30000"
            },
            {
              "index": 500,
              "timeLabel": "2007-01-06T20:00:00",
              "y": "15227/15000"
            },
            {
              "index": 501,
              "timeLabel": "2007-01-06T21:00:00",
              "y": "3797/3750"
            },
            {
              "index": 502,
              "timeLabel": "2007-01-06T22:00:00",
              "y": "307/600"
            },
            {
              "index": 503,
              "timeLabel": "2007-01-06T23:00:00",
              "y": "7579/15000"
            },
            {
              "index": 504,
              "timeLabel": "2007-01-07T00:00:00",
              "y": "1129/1250"
            },
            {
              "index": 505,
              "timeLabel": "2007-01-07T01:00:00",
              "y": "8893/30000"
            },
            {
              "index": 506,
              "timeLabel": "2007-01-07T02:00:00",
              "y": "881/2500"
            },
            {
              "index": 507,
              "timeLabel": "2007-01-07T03:00:00",
              "y": "112/375"
            },
            {
              "index": 508,
              "timeLabel": "2007-01-07T04:00:00",
              "y": "2669/7500"
            },
            {
              "index": 509,
              "timeLabel": "2007-01-07T05:00:00",
              "y": "8561/30000"
            },
            {
              "index": 510,
              "timeLabel": "2007-01-07T06:00:00",
              "y": "3383/10000"
            },
            {
              "index": 511,
              "timeLabel": "2007-01-07T07:00:00",
              "y": "4691/15000"
            },
            {
              "index": 512,
              "timeLabel": "2007-01-07T08:00:00",
              "y": "9301/30000"
            },
            {
              "index": 513,
              "timeLabel": "2007-01-07T09:00:00",
              "y": "939/2500"
            },
            {
              "index": 514,
              "timeLabel": "2007-01-07T10:00:00",
              "y": "31243/30000"
            },
            {
              "index": 515,
              "timeLabel": "2007-01-07T11:00:00",
              "y": "32053/30000"
            },
            {
              "index": 516,
              "timeLabel": "2007-01-07T12:00:00",
              "y": "16547/30000"
            },
            {
              "index": 517,
              "timeLabel": "2007-01-07T13:00:00",
              "y": "49979/15000"
            },
            {
              "index": 518,
              "timeLabel": "2007-01-07T14:00:00",
              "y": "25331/10000"
            },
            {
              "index": 519,
              "timeLabel": "2007-01-07T15:00:00",
              "y": "113123/30000"
            },
            {
              "index": 520,
              "timeLabel": "2007-01-07T16:00:00",
              "y": "68423/30000"
            },
            {
              "index": 521,
              "timeLabel": "2007-01-07T17:00:00",
              "y": "36071/15000"
            },
            {
              "index": 522,
              "timeLabel": "2007-01-07T18:00:00",
              "y": "78173/15000"
            },
            {
              "index": 523,
              "timeLabel": "2007-01-07T19:00:00",
              "y": "43747/15000"
            },
            {
              "index": 524,
              "timeLabel": "2007-01-07T20:00:00",
              "y": "2202/625"
            },
            {
              "index": 525,
              "timeLabel": "2007-01-07T21:00:00",
              "y": "142151/30000"
            },
            {
              "index": 526,
              "timeLabel": "2007-01-07T22:00:00",
              "y": "21289/10000"
            },
            {
              "index": 527,
              "timeLabel": "2007-01-07T23:00:00",
              "y": "10979/7500"
            },
            {
              "index": 528,
              "timeLabel": "2007-01-08T00:00:00",
              "y": "20407/15000"
            },
            {
              "index": 529,
              "timeLabel": "2007-01-08T01:00:00",
              "y": "1013/750"
            },
            {
              "index": 530,
              "timeLabel": "2007-01-08T02:00:00",
              "y": "8309/6000"
            },
            {
              "index": 531,
              "timeLabel": "2007-01-08T03:00:00",
              "y": "13569/10000"
            },
            {
              "index": 532,
              "timeLabel": "2007-01-08T04:00:00",
              "y": "13759/10000"
            },
            {
              "index": 533,
              "timeLabel": "2007-01-08T05:00:00",
              "y": "2071/1875"
            },
            {
              "index": 534,
              "timeLabel": "2007-01-08T06:00:00",
              "y": "3511/7500"
            },
            {
              "index": 535,
              "timeLabel": "2007-01-08T07:00:00",
              "y": "30379/30000"
            },
            {
              "index": 536,
              "timeLabel": "2007-01-08T08:00:00",
              "y": "4279/2000"
            },
            {
              "index": 537,
              "timeLabel": "2007-01-08T09:00:00",
              "y": "49939/30000"
            },
            {
              "index": 538,
              "timeLabel": "2007-01-08T10:00:00",
              "y": "38899/30000"
            },
            {
              "index": 539,
              "timeLabel": "2007-01-08T11:00:00",
              "y": "11751/10000"
            },
            {
              "index": 540,
              "timeLabel": "2007-01-08T12:00:00",
              "y": "2467/7500"
            },
            {
              "index": 541,
              "timeLabel": "2007-01-08T13:00:00",
              "y": "402/625"
            },
            {
              "index": 542,
              "timeLabel": "2007-01-08T14:00:00",
              "y": "18509/10000"
            },
            {
              "index": 543,
              "timeLabel": "2007-01-08T15:00:00",
              "y": "18851/10000"
            },
            {
              "index": 544,
              "timeLabel": "2007-01-08T16:00:00",
              "y": "63673/30000"
            },
            {
              "index": 545,
              "timeLabel": "2007-01-08T17:00:00",
              "y": "18981/10000"
            },
            {
              "index": 546,
              "timeLabel": "2007-01-08T18:00:00",
              "y": "87239/30000"
            },
            {
              "index": 547,
              "timeLabel": "2007-01-08T19:00:00",
              "y": "41911/15000"
            },
            {
              "index": 548,
              "timeLabel": "2007-01-08T20:00:00",
              "y": "102751/30000"
            },
            {
              "index": 549,
              "timeLabel": "2007-01-08T21:00:00",
              "y": "75229/30000"
            },
            {
              "index": 550,
              "timeLabel": "2007-01-08T22:00:00",
              "y": "29099/30000"
            },
            {
              "index": 551,
              "timeLabel": "2007-01-08T23:00:00",
              "y": "4991/15000"
            },
            {
              "index": 552,
              "timeLabel": "2007-01-09T00:00:00",
              "y": "1619/6000"
            },
            {
              "index": 553,
              "timeLabel": "2007-01-09T01:00:00",
              "y": "1871/6000"
            },
            {
              "index": 554,
              "timeLabel": "2007-01-09T02:00:00",
              "y": "1437/5000"
            },
            {
              "index": 555,
              "timeLabel": "2007-01-09T03:00:00",
              "y": "1409/3000"
            },
            {
              "index": 556,
              "timeLabel": "2007-01-09T04:00:00",
              "y": "1653/2500"
            },
            {
              "index": 557,
              "timeLabel": "2007-01-09T05:00:00",
              "y": "549/2000"
            },
            {
              "index": 558,
              "timeLabel": "2007-01-09T06:00:00",
              "y": "4213/3750"
            },
            {
              "index": 559,
              "timeLabel": "2007-01-09T07:00:00",
              "y": "71609/30000"
            },
            {
              "index": 560,
              "timeLabel": "2007-01-09T08:00:00",
              "y": "5339/2500"
            },
            {
              "index": 561,
              "timeLabel": "2007-01-09T09:00:00",
              "y": "56051/30000"
            },
            {
              "index": 562,
              "timeLabel": "2007-01-09T10:00:00",
              "y": "40477/30000"
            },
            {
              "index": 563,
              "timeLabel": "2007-01-09T11:00:00",
              "y": "14021/15000"
            },
            {
              "index": 564,
              "timeLabel": "2007-01-09T12:00:00",
              "y": "2077/7500"
            },
            {
              "index": 565,
              "timeLabel": "2007-01-09T13:00:00",
              "y": "9047/30000"
            },
            {
              "index": 566,
              "timeLabel": "2007-01-09T14:00:00",
              "y": "4/15"
            },
            {
              "index": 567,
              "timeLabel": "2007-01-09T15:00:00",
              "y": "3389/6000"
            },
            {
              "index": 568,
              "timeLabel": "2007-01-09T16:00:00",
              "y": "2207/1500"
            },
            {
              "index": 569,
              "timeLabel": "2007-01-09T17:00:00",
              "y": "15797/7500"
            },
            {
              "index": 570,
              "timeLabel": "2007-01-09T18:00:00",
              "y": "8899/3750"
            },
            {
              "index": 571,
              "timeLabel": "2007-01-09T19:00:00",
              "y": "4289/1875"
            },
            {
              "index": 572,
              "timeLabel": "2007-01-09T20:00:00",
              "y": "16053/5000"
            },
            {
              "index": 573,
              "timeLabel": "2007-01-09T21:00:00",
              "y": "49387/15000"
            },
            {
              "index": 574,
              "timeLabel": "2007-01-09T22:00:00",
              "y": "19369/15000"
            },
            {
              "index": 575,
              "timeLabel": "2007-01-09T23:00:00",
              "y": "49069/30000"
            },
            {
              "index": 576,
              "timeLabel": "2007-01-10T00:00:00",
              "y": "5179/10000"
            },
            {
              "index": 577,
              "timeLabel": "2007-01-10T01:00:00",
              "y": "6539/10000"
            },
            {
              "index": 578,
              "timeLabel": "2007-01-10T02:00:00",
              "y": "10211/30000"
            },
            {
              "index": 579,
              "timeLabel": "2007-01-10T03:00:00",
              "y": "8081/30000"
            },
            {
              "index": 580,
              "timeLabel": "2007-01-10T04:00:00",
              "y": "3469/10000"
            },
            {
              "index": 581,
              "timeLabel": "2007-01-10T05:00:00",
              "y": "8039/30000"
            },
            {
              "index": 582,
              "timeLabel": "2007-01-10T06:00:00",
              "y": "561/625"
            },
            {
              "index": 583,
              "timeLabel": "2007-01-10T07:00:00",
              "y": "23629/10000"
            },
            {
              "index": 584,
              "timeLabel": "2007-01-10T08:00:00",
              "y": "22297/7500"
            },
            {
              "index": 585,
              "timeLabel": "2007-01-10T09:00:00",
              "y": "59857/30000"
            },
            {
              "index": 586,
              "timeLabel": "2007-01-10T10:00:00",
              "y": "14271/10000"
            },
            {
              "index": 587,
              "timeLabel": "2007-01-10T11:00:00",
              "y": "119123/30000"
            },
            {
              "index": 588,
              "timeLabel": "2007-01-10T12:00:00",
              "y": "42923/30000"
            },
            {
              "index": 589,
              "timeLabel": "2007-01-10T13:00:00",
              "y": "16613/30000"
            },
            {
              "index": 590,
              "timeLabel": "2007-01-10T14:00:00",
              "y": "8477/5000"
            },
            {
              "index": 591,
              "timeLabel": "2007-01-10T15:00:00",
              "y": "38737/30000"
            },
            {
              "index": 592,
              "timeLabel": "2007-01-10T16:00:00",
              "y": "10253/15000"
            },
            {
              "index": 593,
              "timeLabel": "2007-01-10T17:00:00",
              "y": "4561/2500"
            },
            {
              "index": 594,
              "timeLabel": "2007-01-10T18:00:00",
              "y": "8411/2500"
            },
            {
              "index": 595,
              "timeLabel": "2007-01-10T19:00:00",
              "y": "95707/30000"
            },
            {
              "index": 596,
              "timeLabel": "2007-01-10T20:00:00",
              "y": "44009/15000"
            },
            {
              "index": 597,
              "timeLabel": "2007-01-10T21:00:00",
              "y": "16947/10000"
            },
            {
              "index": 598,
              "timeLabel": "2007-01-10T22:00:00",
              "y": "8519/10000"
            },
            {
              "index": 599,
              "timeLabel": "2007-01-10T23:00:00",
              "y": "2821/7500"
            },
            {
              "index": 600,
              "timeLabel": "2007-01-11T00:00:00",
              "y": "673/2000"
            },
            {
              "index": 601,
              "timeLabel": "2007-01-11T01:00:00",
              "y": "1273/5000"
            },
            {
              "index": 602,
              "timeLabel": "2007-01-11T02:00:00",
              "y": "463/1500"
            },
            {
              "index": 603,
              "timeLabel": "2007-01-11T03:00:00",
              "y": "5353/6000"
            },
            {
              "index": 604,
              "timeLabel": "2007-01-11T04:00:00",
              "y": "541/2000"
            },
            {
              "index": 605,
              "timeLabel": "2007-01-11T05:00:00",
              "y": "186/625"
            },
            {
              "index": 606,
              "timeLabel": "2007-01-11T06:00:00",
              "y": "22091/30000"
            },
            {
              "index": 607,
              "timeLabel": "2007-01-11T07:00:00",
              "y": "16213/6000"
            },
            {
              "index": 608,
              "timeLabel": "2007-01-11T08:00:00",
              "y": "37579/15000"
            },
            {
              "index": 609,
              "timeLabel": "2007-01-11T09:00:00",
              "y": "6851/5000"
            },
            {
              "index": 610,
              "timeLabel": "2007-01-11T10:00:00",
              "y": "10273/7500"
            },
            {
              "index": 611,
              "timeLabel": "2007-01-11T11:00:00",
              "y": "6911/6000"
            },
            {
              "index": 612,
              "timeLabel": "2007-01-11T12:00:00",
              "y": "901/3000"
            },
            {
              "index": 613,
              "timeLabel": "2007-01-11T13:00:00",
              "y": "247/625"
            },
            {
              "index": 614,
              "timeLabel": "2007-01-11T14:00:00",
              "y": "409/1250"
            },
            {
              "index": 615,
              "timeLabel": "2007-01-11T15:00:00",
              "y": "16249/30000"
            },
            {
              "index": 616,
              "timeLabel": "2007-01-11T16:00:00",
              "y": "6533/2500"
            },
            {
              "index": 617,
              "timeLabel": "2007-01-11T17:00:00",
              "y": "97147/30000"
            },
            {
              "index": 618,
              "timeLabel": "2007-01-11T18:00:00",
              "y": "58037/15000"
            },
            {
              "index": 619,
              "timeLabel": "2007-01-11T19:00:00",
              "y": "23921/5000"
            },
            {
              "index": 620,
              "timeLabel": "2007-01-11T20:00:00",
              "y": "27797/7500"
            },
            {
              "index": 621,
              "timeLabel": "2007-01-11T21:00:00",
              "y": "86411/30000"
            },
            {
              "index": 622,
              "timeLabel": "2007-01-11T22:00:00",
              "y": "14481/10000"
            },
            {
              "index": 623,
              "timeLabel": "2007-01-11T23:00:00",
              "y": "12871/10000"
            },
            {
              "index": 624,
              "timeLabel": "2007-01-12T00:00:00",
              "y": "17563/30000"
            },
            {
              "index": 625,
              "timeLabel": "2007-01-12T01:00:00",
              "y": "9367/30000"
            },
            {
              "index": 626,
              "timeLabel": "2007-01-12T02:00:00",
              "y": "189/625"
            },
            {
              "index": 627,
              "timeLabel": "2007-01-12T03:00:00",
              "y": "9647/30000"
            },
            {
              "index": 628,
              "timeLabel": "2007-01-12T04:00:00",
              "y": "8791/30000"
            },
            {
              "index": 629,
              "timeLabel": "2007-01-12T05:00:00",
              "y": "2437/3000"
            },
            {
              "index": 630,
              "timeLabel": "2007-01-12T06:00:00",
              "y": "43543/30000"
            },
            {
              "index": 631,
              "timeLabel": "2007-01-12T07:00:00",
              "y": "1133/400"
            },
            {
              "index": 632,
              "timeLabel": "2007-01-12T08:00:00",
              "y": "29909/15000"
            },
            {
              "index": 633,
              "timeLabel": "2007-01-12T09:00:00",
              "y": "6741/5000"
            },
            {
              "index": 634,
              "timeLabel": "2007-01-12T10:00:00",
              "y": "5441/6000"
            },
            {
              "index": 635,
              "timeLabel": "2007-01-12T11:00:00",
              "y": "1691/6000"
            },
            {
              "index": 636,
              "timeLabel": "2007-01-12T12:00:00",
              "y": "1473/5000"
            },
            {
              "index": 637,
              "timeLabel": "2007-01-12T13:00:00",
              "y": "476/1875"
            },
            {
              "index": 638,
              "timeLabel": "2007-01-12T14:00:00",
              "y": "3349/10000"
            },
            {
              "index": 639,
              "timeLabel": "2007-01-12T15:00:00",
              "y": "1963/7500"
            },
            {
              "index": 640,
              "timeLabel": "2007-01-12T16:00:00",
              "y": "481/1500"
            },
            {
              "index": 641,
              "timeLabel": "2007-01-12T17:00:00",
              "y": "5727/10000"
            },
            {
              "index": 642,
              "timeLabel": "2007-01-12T18:00:00",
              "y": "2549/1000"
            },
            {
              "index": 643,
              "timeLabel": "2007-01-12T19:00:00",
              "y": "22349/10000"
            },
            {
              "index": 644,
              "timeLabel": "2007-01-12T20:00:00",
              "y": "17213/7500"
            },
            {
              "index": 645,
              "timeLabel": "2007-01-12T21:00:00",
              "y": "22691/15000"
            },
            {
              "index": 646,
              "timeLabel": "2007-01-12T22:00:00",
              "y": "44513/30000"
            },
            {
              "index": 647,
              "timeLabel": "2007-01-12T23:00:00",
              "y": "11989/15000"
            },
            {
              "index": 648,
              "timeLabel": "2007-01-13T00:00:00",
              "y": "2221/2500"
            },
            {
              "index": 649,
              "timeLabel": "2007-01-13T01:00:00",
              "y": "4751/15000"
            },
            {
              "index": 650,
              "timeLabel": "2007-01-13T02:00:00",
              "y": "7693/30000"
            },
            {
              "index": 651,
              "timeLabel": "2007-01-13T03:00:00",
              "y": "1117/3750"
            },
            {
              "index": 652,
              "timeLabel": "2007-01-13T04:00:00",
              "y": "289/1000"
            },
            {
              "index": 653,
              "timeLabel": "2007-01-13T05:00:00",
              "y": "1323/5000"
            },
            {
              "index": 654,
              "timeLabel": "2007-01-13T06:00:00",
              "y": "1891/6000"
            },
            {
              "index": 655,
              "timeLabel": "2007-01-13T07:00:00",
              "y": "53779/30000"
            },
            {
              "index": 656,
              "timeLabel": "2007-01-13T08:00:00",
              "y": "39833/15000"
            },
            {
              "index": 657,
              "timeLabel": "2007-01-13T09:00:00",
              "y": "17159/10000"
            },
            {
              "index": 658,
              "timeLabel": "2007-01-13T10:00:00",
              "y": "95101/30000"
            },
            {
              "index": 659,
              "timeLabel": "2007-01-13T11:00:00",
              "y": "26723/7500"
            },
            {
              "index": 660,
              "timeLabel": "2007-01-13T12:00:00",
              "y": "11821/6000"
            },
            {
              "index": 661,
              "timeLabel": "2007-01-13T13:00:00",
              "y": "2049/1250"
            },
            {
              "index": 662,
              "timeLabel": "2007-01-13T14:00:00",
              "y": "16297/10000"
            },
            {
              "index": 663,
              "timeLabel": "2007-01-13T15:00:00",
              "y": "1243/600"
            },
            {
              "index": 664,
              "timeLabel": "2007-01-13T16:00:00",
              "y": "61729/30000"
            },
            {
              "index": 665,
              "timeLabel": "2007-01-13T17:00:00",
              "y": "41971/15000"
            },
            {
              "index": 666,
              "timeLabel": "2007-01-13T18:00:00",
              "y": "18881/10000"
            },
            {
              "index": 667,
              "timeLabel": "2007-01-13T19:00:00",
              "y": "6309/2000"
            },
            {
              "index": 668,
              "timeLabel": "2007-01-13T20:00:00",
              "y": "45121/10000"
            },
            {
              "index": 669,
              "timeLabel": "2007-01-13T21:00:00",
              "y": "37361/7500"
            },
            {
              "index": 670,
              "timeLabel": "2007-01-13T22:00:00",
              "y": "43607/7500"
            },
            {
              "index": 671,
              "timeLabel": "2007-01-13T23:00:00",
              "y": "7607/1500"
            },
            {
              "index": 672,
              "timeLabel": "2007-01-14T00:00:00",
              "y": "100217/30000"
            },
            {
              "index": 673,
              "timeLabel": "2007-01-14T01:00:00",
              "y": "729/250"
            },
            {
              "index": 674,
              "timeLabel": "2007-01-14T02:00:00",
              "y": "86383/30000"
            },
            {
              "index": 675,
              "timeLabel": "2007-01-14T03:00:00",
              "y": "8413/7500"
            },
            {
              "index": 676,
              "timeLabel": "2007-01-14T04:00:00",
              "y": "34027/30000"
            },
            {
              "index": 677,
              "timeLabel": "2007-01-14T05:00:00",
              "y": "11941/10000"
            },
            {
              "index": 678,
              "timeLabel": "2007-01-14T06:00:00",
              "y": "15761/10000"
            },
            {
              "index": 679,
              "timeLabel": "2007-01-14T07:00:00",
              "y": "4279/3750"
            },
            {
              "index": 680,
              "timeLabel": "2007-01-14T08:00:00",
              "y": "7891/6000"
            },
            {
              "index": 681,
              "timeLabel": "2007-01-14T09:00:00",
              "y": "66781/30000"
            },
            {
              "index": 682,
              "timeLabel": "2007-01-14T10:00:00",
              "y": "52091/30000"
            },
            {
              "index": 683,
              "timeLabel": "2007-01-14T11:00:00",
              "y": "30257/30000"
            },
            {
              "index": 684,
              "timeLabel": "2007-01-14T12:00:00",
              "y": "57/80"
            },
            {
              "index": 685,
              "timeLabel": "2007-01-14T13:00:00",
              "y": "12987/10000"
            },
            {
              "index": 686,
              "timeLabel": "2007-01-14T14:00:00",
              "y": "6853/3750"
            },
            {
              "index": 687,
              "timeLabel": "2007-01-14T15:00:00",
              "y": "3932/1875"
            },
            {
              "index": 688,
              "timeLabel": "2007-01-14T16:00:00",
              "y": "17129/5000"
            },
            {
              "index": 689,
              "timeLabel": "2007-01-14T17:00:00",
              "y": "63167/15000"
            },
            {
              "index": 690,
              "timeLabel": "2007-01-14T18:00:00",
              "y": null
            },
            {
              "index": 691,
              "timeLabel": "2007-01-14T19:00:00",
              "y": "6583/2000"
            },
            {
              "index": 692,
              "timeLabel": "2007-01-14T20:00:00",
              "y": "31929/10000"
            },
            {
              "index": 693,
              "timeLabel": "2007-01-14T21:00:00",
              "y": "63229/30000"
            },
            {
              "index": 694,
              "timeLabel": "2007-01-14T22:00:00",
              "y": "21941/15000"
            },
            {
              "index": 695,
              "timeLabel": "2007-01-14T23:00:00",
              "y": "10309/7500"
            },
            {
              "index": 696,
              "timeLabel": "2007-01-15T00:00:00",
              "y": "13573/10000"
            },
            {
              "index": 697,
              "timeLabel": "2007-01-15T01:00:00",
              "y": "10063/7500"
            },
            {
              "index": 698,
              "timeLabel": "2007-01-15T02:00:00",
              "y": "231/500"
            },
            {
              "index": 699,
              "timeLabel": "2007-01-15T03:00:00",
              "y": "1087/3750"
            },
            {
              "index": 700,
              "timeLabel": "2007-01-15T04:00:00",
              "y": "729/2500"
            },
            {
              "index": 701,
              "timeLabel": "2007-01-15T05:00:00",
              "y": "61/250"
            },
            {
              "index": 702,
              "timeLabel": "2007-01-15T06:00:00",
              "y": "37/120"
            },
            {
              "index": 703,
              "timeLabel": "2007-01-15T07:00:00",
              "y": "19449/10000"
            },
            {
              "index": 704,
              "timeLabel": "2007-01-15T08:00:00",
              "y": "4867/1875"
            },
            {
              "index": 705,
              "timeLabel": "2007-01-15T09:00:00",
              "y": "319/200"
            },
            {
              "index": 706,
              "timeLabel": "2007-01-15T10:00:00",
              "y": "27829/15000"
            },
            {
              "index": 707,
              "timeLabel": "2007-01-15T11:00:00",
              "y": "41143/30000"
            },
            {
              "index": 708,
              "timeLabel": "2007-01-15T12:00:00",
              "y": "33931/30000"
            },
            {
              "index": 709,
              "timeLabel": "2007-01-15T13:00:00",
              "y": "6521/10000"
            },
            {
              "index": 710,
              "timeLabel": "2007-01-15T14:00:00",
              "y": "11131/7500"
            },
            {
              "index": 711,
              "timeLabel": "2007-01-15T15:00:00",
              "y": "48697/30000"
            },
            {
              "index": 712,
              "timeLabel": "2007-01-15T16:00:00",
              "y": "4627/3000"
            },
            {
              "index": 713,
              "timeLabel": "2007-01-15T17:00:00",
              "y": "53759/30000"
            },
            {
              "index": 714,
              "timeLabel": "2007-01-15T18:00:00",
              "y": "13487/6000"
            },
            {
              "index": 715,
              "timeLabel": "2007-01-15T19:00:00",
              "y": "5572/1875"
            },
            {
              "index": 716,
              "timeLabel": "2007-01-15T20:00:00",
              "y": "82277/30000"
            },
            {
              "index": 717,
              "timeLabel": "2007-01-15T21:00:00",
              "y": "3247/2000"
            },
            {
              "index": 718,
              "timeLabel": "2007-01-15T22:00:00",
              "y": "55717/30000"
            },
            {
              "index": 719,
              "timeLabel": "2007-01-15T23:00:00",
              "y": "37297/15000"
            },
            {
              "index": 720,
              "timeLabel": "2007-01-16T00:00:00",
              "y": "11621/30000"
            },
            {
              "index": 721,
              "timeLabel": "2007-01-16T01:00:00",
              "y": "4489/15000"
            },
            {
              "index": 722,
              "timeLabel": "2007-01-16T02:00:00",
              "y": "617/2000"
            },
            {
              "index": 723,
              "timeLabel": "2007-01-16T03:00:00",
              "y": "881/3000"
            },
            {
              "index": 724,
              "timeLabel": "2007-01-16T04:00:00",
              "y": "23513/30000"
            },
            {
              "index": 725,
              "timeLabel": "2007-01-16T05:00:00",
              "y": "12259/30000"
            },
            {
              "index": 726,
              "timeLabel": "2007-01-16T06:00:00",
              "y": "21023/30000"
            },
            {
              "index": 727,
              "timeLabel": "2007-01-16T07:00:00",
              "y": "74527/30000"
            },
            {
              "index": 728,
              "timeLabel": "2007-01-16T08:00:00",
              "y": "10849/10000"
            },
            {
              "index": 729,
              "timeLabel": "2007-01-16T09:00:00",
              "y": "2219/2500"
            },
            {
              "index": 730,
              "timeLabel": "2007-01-16T10:00:00",
              "y": "6007/15000"
            },
            {
              "index": 731,
              "timeLabel": "2007-01-16T11:00:00",
              "y": "19211/30000"
            },
            {
              "index": 732,
              "timeLabel": "2007-01-16T12:00:00",
              "y": "1451/750"
            },
            {
              "index": 733,
              "timeLabel": "2007-01-16T13:00:00",
              "y": "28349/30000"
            },
            {
              "index": 734,
              "timeLabel": "2007-01-16T14:00:00",
              "y": "28753/15000"
            },
            {
              "index": 735,
              "timeLabel": "2007-01-16T15:00:00",
              "y": "1669/1875"
            },
            {
              "index": 736,
              "timeLabel": "2007-01-16T16:00:00",
              "y": "49469/30000"
            },
            {
              "index": 737,
              "timeLabel": "2007-01-16T17:00:00",
              "y": "5723/2000"
            },
            {
              "index": 738,
              "timeLabel": "2007-01-16T18:00:00",
              "y": "18757/6000"
            },
            {
              "index": 739,
              "timeLabel": "2007-01-16T19:00:00",
              "y": "3919/2000"
            },
            {
              "index": 740,
              "timeLabel": "2007-01-16T20:00:00",
              "y": "8381/6000"
            },
            {
              "index": 741,
              "timeLabel": "2007-01-16T21:00:00",
              "y": "42083/30000"
            },
            {
              "index": 742,
              "timeLabel": "2007-01-16T22:00:00",
              "y": "28643/30000"
            },
            {
              "index": 743,
              "timeLabel": "2007-01-16T23:00:00",
              "y": "5851/15000"
            },
            {
              "index": 744,
              "timeLabel": "2007-01-17T00:00:00",
              "y": "449/1500"
            },
            {
              "index": 745,
              "timeLabel": "2007-01-17T01:00:00",
              "y": "3697/15000"
            },
            {
              "index": 746,
              "timeLabel": "2007-01-17T02:00:00",
              "y": "12901/15000"
            },
            {
              "index": 747,
              "timeLabel": "2007-01-17T03:00:00",
              "y": "2673/10000"
            },
            {
              "index": 748,
              "timeLabel": "2007-01-17T04:00:00",
              "y": "2867/10000"
            },
            {
              "index": 749,
              "timeLabel": "2007-01-17T05:00:00",
              "y": "527/2000"
            },
            {
              "index": 750,
              "timeLabel": "2007-01-17T06:00:00",
              "y": "548/625"
            },
            {
              "index": 751,
              "timeLabel": "2007-01-17T07:00:00",
              "y": "11179/5000"
            },
            {
              "index": 752,
              "timeLabel": "2007-01-17T08:00:00",
              "y": "46799/15000"
            },
            {
              "index": 753,
              "timeLabel": "2007-01-17T09:00:00",
              "y": "48407/15000"
            },
            {
              "index": 754,
              "timeLabel": "2007-01-17T10:00:00",
              "y": "122573/30000"
            },
            {
              "index": 755,
              "timeLabel": "2007-01-17T11:00:00",
              "y": "3057/1250"
            },
            {
              "index": 756,
              "timeLabel": "2007-01-17T12:00:00",
              "y": "1092/625"
            },
            {
              "index": 757,
              "timeLabel": "2007-01-17T13:00:00",
              "y": "14257/10000"
            },
            {
              "index": 758,
              "timeLabel": "2007-01-17T14:00:00",
              "y": "15297/10000"
            },
            {
              "index": 759,
              "timeLabel": "2007-01-17T15:00:00",
              "y": "116159/30000"
            },
            {
              "index": 760,
              "timeLabel": "2007-01-17T16:00:00",
              "y": "3777/2000"
            },
            {
              "index": 761,
              "timeLabel": "2007-01-17T17:00:00",
              "y": "46003/15000"
            },
            {
              "index": 762,
              "timeLabel": "2007-01-17T18:00:00",
              "y": "16687/10000"
            },
            {
              "index": 763,
              "timeLabel": "2007-01-17T19:00:00",
              "y": "19549/7500"
            },
            {
              "index": 764,
              "timeLabel": "2007-01-17T20:00:00",
              "y": "773/240"
            },
            {
              "index": 765,
              "timeLabel": "2007-01-17T21:00:00",
              "y": "53171/15000"
            },
            {
              "index": 766,
              "timeLabel": "2007-01-17T22:00:00",
              "y": "4081/1500"
            },
            {
              "index": 767,
              "timeLabel": "2007-01-17T23:00:00",
              "y": "5867/3000"
            },
            {
              "index": 768,
              "timeLabel": "2007-01-18T00:00:00",
              "y": "841/600"
            },
            {
              "index": 769,
              "timeLabel": "2007-01-18T01:00:00",
              "y": "33857/30000"
            },
            {
              "index": 770,
              "timeLabel": "2007-01-18T02:00:00",
              "y": "4487/15000"
            },
            {
              "index": 771,
              "timeLabel": "2007-01-18T03:00:00",
              "y": "8561/30000"
            },
            {
              "index": 772,
              "timeLabel": "2007-01-18T04:00:00",
              "y": "4289/15000"
            },
            {
              "index": 773,
              "timeLabel": "2007-01-18T05:00:00",
              "y": "8177/30000"
            },
            {
              "index": 774,
              "timeLabel": "2007-01-18T06:00:00",
              "y": "1121/1500"
            },
            {
              "index": 775,
              "timeLabel": "2007-01-18T07:00:00",
              "y": "19663/7500"
            },
            {
              "index": 776,
              "timeLabel": "2007-01-18T08:00:00",
              "y": "12437/7500"
            },
            {
              "index": 777,
              "timeLabel": "2007-01-18T09:00:00",
              "y": "39797/30000"
            },
            {
              "index": 778,
              "timeLabel": "2007-01-18T10:00:00",
              "y": "1624/1875"
            },
            {
              "index": 779,
              "timeLabel": "2007-01-18T11:00:00",
              "y": "8389/30000"
            },
            {
              "index": 780,
              "timeLabel": "2007-01-18T12:00:00",
              "y": "9151/30000"
            },
            {
              "index": 781,
              "timeLabel": "2007-01-18T13:00:00",
              "y": "5061/10000"
            },
            {
              "index": 782,
              "timeLabel": "2007-01-18T14:00:00",
              "y": "11161/30000"
            },
            {
              "index": 783,
              "timeLabel": "2007-01-18T15:00:00",
              "y": "3677/6000"
            },
            {
              "index": 784,
              "timeLabel": "2007-01-18T16:00:00",
              "y": "3062/1875"
            },
            {
              "index": 785,
              "timeLabel": "2007-01-18T17:00:00",
              "y": "323/150"
            },
            {
              "index": 786,
              "timeLabel": "2007-01-18T18:00:00",
              "y": "23501/7500"
            },
            {
              "index": 787,
              "timeLabel": "2007-01-18T19:00:00",
              "y": "2793/1000"
            },
            {
              "index": 788,
              "timeLabel": "2007-01-18T20:00:00",
              "y": "5566/1875"
            },
            {
              "index": 789,
              "timeLabel": "2007-01-18T21:00:00",
              "y": "6947/2500"
            },
            {
              "index": 790,
              "timeLabel": "2007-01-18T22:00:00",
              "y": "42109/30000"
            },
            {
              "index": 791,
              "timeLabel": "2007-01-18T23:00:00",
              "y": "15749/30000"
            },
            {
              "index": 792,
              "timeLabel": "2007-01-19T00:00:00",
              "y": "9161/30000"
            },
            {
              "index": 793,
              "timeLabel": "2007-01-19T01:00:00",
              "y": "949/3000"
            },
            {
              "index": 794,
              "timeLabel": "2007-01-19T02:00:00",
              "y": "9143/30000"
            },
            {
              "index": 795,
              "timeLabel": "2007-01-19T03:00:00",
              "y": "9257/30000"
            },
            {
              "index": 796,
              "timeLabel": "2007-01-19T04:00:00",
              "y": "4759/15000"
            },
            {
              "index": 797,
              "timeLabel": "2007-01-19T05:00:00",
              "y": "9013/30000"
            },
            {
              "index": 798,
              "timeLabel": "2007-01-19T06:00:00",
              "y": "1201/1500"
            },
            {
              "index": 799,
              "timeLabel": "2007-01-19T07:00:00",
              "y": "28391/10000"
            },
            {
              "index": 800,
              "timeLabel": "2007-01-19T08:00:00",
              "y": "63833/30000"
            },
            {
              "index": 801,
              "timeLabel": "2007-01-19T09:00:00",
              "y": "54989/30000"
            },
            {
              "index": 802,
              "timeLabel": "2007-01-19T10:00:00",
              "y": "34339/30000"
            },
            {
              "index": 803,
              "timeLabel": "2007-01-19T11:00:00",
              "y": "2579/10000"
            },
            {
              "index": 804,
              "timeLabel": "2007-01-19T12:00:00",
              "y": "121/400"
            },
            {
              "index": 805,
              "timeLabel": "2007-01-19T13:00:00",
              "y": "1913/5000"
            },
            {
              "index": 806,
              "timeLabel": "2007-01-19T14:00:00",
              "y": "12691/30000"
            },
            {
              "index": 807,
              "timeLabel": "2007-01-19T15:00:00",
              "y": "269/750"
            },
            {
              "index": 808,
              "timeLabel": "2007-01-19T16:00:00",
              "y": "6193/6000"
            },
            {
              "index": 809,
              "timeLabel": "2007-01-19T17:00:00",
              "y": "20107/15000"
            },
            {
              "index": 810,
              "timeLabel": "2007-01-19T18:00:00",
              "y": "11023/15000"
            },
            {
              "index": 811,
              "timeLabel": "2007-01-19T19:00:00",
              "y": "28823/30000"
            },
            {
              "index": 812,
              "timeLabel": "2007-01-19T20:00:00",
              "y": "46367/30000"
            },
            {
              "index": 813,
              "timeLabel": "2007-01-19T21:00:00",
              "y": "72679/30000"
            },
            {
              "index": 814,
              "timeLabel": "2007-01-19T22:00:00",
              "y": "74719/30000"
            },
            {
              "index": 815,
              "timeLabel": "2007-01-19T23:00:00",
              "y": "5473/3000"
            },
            {
              "index": 816,
              "timeLabel": "2007-01-20T00:00:00",
              "y": "8659/5000"
            },
            {
              "index": 817,
              "timeLabel": "2007-01-20T01:00:00",
              "y": "17239/15000"
            },
            {
              "index": 818,
              "timeLabel": "2007-01-20T02:00:00",
              "y": "649/625"
            },
            {
              "index": 819,
              "timeLabel": "2007-01-20T03:00:00",
              "y": "3361/3000"
            },
            {
              "index": 820,
              "timeLabel": "2007-01-20T04:00:00",
              "y": "6139/6000"
            },
            {
              "index": 821,
              "timeLabel": "2007-01-20T05:00:00",
              "y": "1051/1000"
            },
            {
              "index": 822,
              "timeLabel": "2007-01-20T06:00:00",
              "y": "33211/30000"
            },
            {
              "index": 823,
              "timeLabel": "2007-01-20T07:00:00",
              "y": "31703/15000"
            },
            {
              "index": 824,
              "timeLabel": "2007-01-20T08:00:00",
              "y": "30527/15000"
            },
            {
              "index": 825,
              "timeLabel": "2007-01-20T09:00:00",
              "y": "3841/1875"
            },
            {
              "index": 826,
              "timeLabel": "2007-01-20T10:00:00",
              "y": "8549/3750"
            },
            {
              "index": 827,
              "timeLabel": "2007-01-20T11:00:00",
              "y": "5189/2500"
            },
            {
              "index": 828,
              "timeLabel": "2007-01-20T12:00:00",
              "y": "27647/15000"
            },
            {
              "index": 829,
              "timeLabel": "2007-01-20T13:00:00",
              "y": "127531/30000"
            },
            {
              "index": 830,
              "timeLabel": "2007-01-20T14:00:00",
              "y": "26337/10000"
            },
            {
              "index": 831,
              "timeLabel": "2007-01-20T15:00:00",
              "y": "59141/30000"
            },
            {
              "index": 832,
              "timeLabel": "2007-01-20T16:00:00",
              "y": "3661/1875"
            },
            {
              "index": 833,
              "timeLabel": "2007-01-20T17:00:00",
              "y": "1747/625"
            },
            {
              "index": 834,
              "timeLabel": "2007-01-20T18:00:00",
              "y": "129371/30000"
            },
            {
              "index": 835,
              "timeLabel": "2007-01-20T19:00:00",
              "y": "160291/30000"
            },
            {
              "index": 836,
              "timeLabel": "2007-01-20T20:00:00",
              "y": "27847/7500"
            },
            {
              "index": 837,
              "timeLabel": "2007-01-20T21:00:00",
              "y": "18193/7500"
            },
            {
              "index": 838,
              "timeLabel": "2007-01-20T22:00:00",
              "y": "32851/30000"
            },
            {
              "index": 839,
              "timeLabel": "2007-01-20T23:00:00",
              "y": "16789/15000"
            }
          ],
          "result": {
            "metrics": {
              "origin": "672",
              "trainingCalendar": "672",
              "trainingObserved": "670",
              "horizon": "168",
              "forecastDefined": "168",
              "scorePairs": "167",
              "MAE": "1496887/1252500",
              "MSE": "107356015189/37575000000"
            },
            "rows": [
              {
                "index": 672,
                "horizon": 1,
                "forecast": "2221/2500",
                "actual": "100217/30000",
                "error": "14713/6000"
              },
              {
                "index": 673,
                "horizon": 2,
                "forecast": "4751/15000",
                "actual": "729/250",
                "error": "38989/15000"
              },
              {
                "index": 674,
                "horizon": 3,
                "forecast": "7693/30000",
                "actual": "86383/30000",
                "error": "2623/1000"
              },
              {
                "index": 675,
                "horizon": 4,
                "forecast": "1117/3750",
                "actual": "8413/7500",
                "error": "6179/7500"
              },
              {
                "index": 676,
                "horizon": 5,
                "forecast": "289/1000",
                "actual": "34027/30000",
                "error": "25357/30000"
              },
              {
                "index": 677,
                "horizon": 6,
                "forecast": "1323/5000",
                "actual": "11941/10000",
                "error": "1859/2000"
              },
              {
                "index": 678,
                "horizon": 7,
                "forecast": "1891/6000",
                "actual": "15761/10000",
                "error": "9457/7500"
              },
              {
                "index": 679,
                "horizon": 8,
                "forecast": "53779/30000",
                "actual": "4279/3750",
                "error": "-19547/30000"
              },
              {
                "index": 680,
                "horizon": 9,
                "forecast": "39833/15000",
                "actual": "7891/6000",
                "error": "-40211/30000"
              },
              {
                "index": 681,
                "horizon": 10,
                "forecast": "17159/10000",
                "actual": "66781/30000",
                "error": "1913/3750"
              },
              {
                "index": 682,
                "horizon": 11,
                "forecast": "95101/30000",
                "actual": "52091/30000",
                "error": "-4301/3000"
              },
              {
                "index": 683,
                "horizon": 12,
                "forecast": "26723/7500",
                "actual": "30257/30000",
                "error": "-5109/2000"
              },
              {
                "index": 684,
                "horizon": 13,
                "forecast": "11821/6000",
                "actual": "57/80",
                "error": "-3773/3000"
              },
              {
                "index": 685,
                "horizon": 14,
                "forecast": "2049/1250",
                "actual": "12987/10000",
                "error": "-681/2000"
              },
              {
                "index": 686,
                "horizon": 15,
                "forecast": "16297/10000",
                "actual": "6853/3750",
                "error": "5933/30000"
              },
              {
                "index": 687,
                "horizon": 16,
                "forecast": "1243/600",
                "actual": "3932/1875",
                "error": "127/5000"
              },
              {
                "index": 688,
                "horizon": 17,
                "forecast": "61729/30000",
                "actual": "17129/5000",
                "error": "8209/6000"
              },
              {
                "index": 689,
                "horizon": 18,
                "forecast": "41971/15000",
                "actual": "63167/15000",
                "error": "5299/3750"
              },
              {
                "index": 690,
                "horizon": 19,
                "forecast": "18881/10000",
                "actual": null,
                "error": null
              },
              {
                "index": 691,
                "horizon": 20,
                "forecast": "6309/2000",
                "actual": "6583/2000",
                "error": "137/1000"
              },
              {
                "index": 692,
                "horizon": 21,
                "forecast": "45121/10000",
                "actual": "31929/10000",
                "error": "-1649/1250"
              },
              {
                "index": 693,
                "horizon": 22,
                "forecast": "37361/7500",
                "actual": "63229/30000",
                "error": "-17243/6000"
              },
              {
                "index": 694,
                "horizon": 23,
                "forecast": "43607/7500",
                "actual": "21941/15000",
                "error": "-65273/15000"
              },
              {
                "index": 695,
                "horizon": 24,
                "forecast": "7607/1500",
                "actual": "10309/7500",
                "error": "-4621/1250"
              },
              {
                "index": 696,
                "horizon": 25,
                "forecast": "2221/2500",
                "actual": "13573/10000",
                "error": "4689/10000"
              },
              {
                "index": 697,
                "horizon": 26,
                "forecast": "4751/15000",
                "actual": "10063/7500",
                "error": "41/40"
              },
              {
                "index": 698,
                "horizon": 27,
                "forecast": "7693/30000",
                "actual": "231/500",
                "error": "6167/30000"
              },
              {
                "index": 699,
                "horizon": 28,
                "forecast": "1117/3750",
                "actual": "1087/3750",
                "error": "-1/125"
              },
              {
                "index": 700,
                "horizon": 29,
                "forecast": "289/1000",
                "actual": "729/2500",
                "error": "13/5000"
              },
              {
                "index": 701,
                "horizon": 30,
                "forecast": "1323/5000",
                "actual": "61/250",
                "error": "-103/5000"
              },
              {
                "index": 702,
                "horizon": 31,
                "forecast": "1891/6000",
                "actual": "37/120",
                "error": "-41/6000"
              },
              {
                "index": 703,
                "horizon": 32,
                "forecast": "53779/30000",
                "actual": "19449/10000",
                "error": "571/3750"
              },
              {
                "index": 704,
                "horizon": 33,
                "forecast": "39833/15000",
                "actual": "4867/1875",
                "error": "-299/5000"
              },
              {
                "index": 705,
                "horizon": 34,
                "forecast": "17159/10000",
                "actual": "319/200",
                "error": "-1209/10000"
              },
              {
                "index": 706,
                "horizon": 35,
                "forecast": "95101/30000",
                "actual": "27829/15000",
                "error": "-39443/30000"
              },
              {
                "index": 707,
                "horizon": 36,
                "forecast": "26723/7500",
                "actual": "41143/30000",
                "error": "-65749/30000"
              },
              {
                "index": 708,
                "horizon": 37,
                "forecast": "11821/6000",
                "actual": "33931/30000",
                "error": "-12587/15000"
              },
              {
                "index": 709,
                "horizon": 38,
                "forecast": "2049/1250",
                "actual": "6521/10000",
                "error": "-9871/10000"
              },
              {
                "index": 710,
                "horizon": 39,
                "forecast": "16297/10000",
                "actual": "11131/7500",
                "error": "-4367/30000"
              },
              {
                "index": 711,
                "horizon": 40,
                "forecast": "1243/600",
                "actual": "48697/30000",
                "error": "-13453/30000"
              },
              {
                "index": 712,
                "horizon": 41,
                "forecast": "61729/30000",
                "actual": "4627/3000",
                "error": "-5153/10000"
              },
              {
                "index": 713,
                "horizon": 42,
                "forecast": "41971/15000",
                "actual": "53759/30000",
                "error": "-10061/10000"
              },
              {
                "index": 714,
                "horizon": 43,
                "forecast": "18881/10000",
                "actual": "13487/6000",
                "error": "1349/3750"
              },
              {
                "index": 715,
                "horizon": 44,
                "forecast": "6309/2000",
                "actual": "5572/1875",
                "error": "-5483/30000"
              },
              {
                "index": 716,
                "horizon": 45,
                "forecast": "45121/10000",
                "actual": "82277/30000",
                "error": "-26543/15000"
              },
              {
                "index": 717,
                "horizon": 46,
                "forecast": "37361/7500",
                "actual": "3247/2000",
                "error": "-100739/30000"
              },
              {
                "index": 718,
                "horizon": 47,
                "forecast": "43607/7500",
                "actual": "55717/30000",
                "error": "-118711/30000"
              },
              {
                "index": 719,
                "horizon": 48,
                "forecast": "7607/1500",
                "actual": "37297/15000",
                "error": "-38773/15000"
              },
              {
                "index": 720,
                "horizon": 49,
                "forecast": "2221/2500",
                "actual": "11621/30000",
                "error": "-15031/30000"
              },
              {
                "index": 721,
                "horizon": 50,
                "forecast": "4751/15000",
                "actual": "4489/15000",
                "error": "-131/7500"
              },
              {
                "index": 722,
                "horizon": 51,
                "forecast": "7693/30000",
                "actual": "617/2000",
                "error": "781/15000"
              },
              {
                "index": 723,
                "horizon": 52,
                "forecast": "1117/3750",
                "actual": "881/3000",
                "error": "-21/5000"
              },
              {
                "index": 724,
                "horizon": 53,
                "forecast": "289/1000",
                "actual": "23513/30000",
                "error": "14843/30000"
              },
              {
                "index": 725,
                "horizon": 54,
                "forecast": "1323/5000",
                "actual": "12259/30000",
                "error": "4321/30000"
              },
              {
                "index": 726,
                "horizon": 55,
                "forecast": "1891/6000",
                "actual": "21023/30000",
                "error": "241/625"
              },
              {
                "index": 727,
                "horizon": 56,
                "forecast": "53779/30000",
                "actual": "74527/30000",
                "error": "1729/2500"
              },
              {
                "index": 728,
                "horizon": 57,
                "forecast": "39833/15000",
                "actual": "10849/10000",
                "error": "-47119/30000"
              },
              {
                "index": 729,
                "horizon": 58,
                "forecast": "17159/10000",
                "actual": "2219/2500",
                "error": "-8283/10000"
              },
              {
                "index": 730,
                "horizon": 59,
                "forecast": "95101/30000",
                "actual": "6007/15000",
                "error": "-83087/30000"
              },
              {
                "index": 731,
                "horizon": 60,
                "forecast": "26723/7500",
                "actual": "19211/30000",
                "error": "-29227/10000"
              },
              {
                "index": 732,
                "horizon": 61,
                "forecast": "11821/6000",
                "actual": "1451/750",
                "error": "-71/2000"
              },
              {
                "index": 733,
                "horizon": 62,
                "forecast": "2049/1250",
                "actual": "28349/30000",
                "error": "-20827/30000"
              },
              {
                "index": 734,
                "horizon": 63,
                "forecast": "16297/10000",
                "actual": "28753/15000",
                "error": "1723/6000"
              },
              {
                "index": 735,
                "horizon": 64,
                "forecast": "1243/600",
                "actual": "1669/1875",
                "error": "-17723/15000"
              },
              {
                "index": 736,
                "horizon": 65,
                "forecast": "61729/30000",
                "actual": "49469/30000",
                "error": "-613/1500"
              },
              {
                "index": 737,
                "horizon": 66,
                "forecast": "41971/15000",
                "actual": "5723/2000",
                "error": "1903/30000"
              },
              {
                "index": 738,
                "horizon": 67,
                "forecast": "18881/10000",
                "actual": "18757/6000",
                "error": "18571/15000"
              },
              {
                "index": 739,
                "horizon": 68,
                "forecast": "6309/2000",
                "actual": "3919/2000",
                "error": "-239/200"
              },
              {
                "index": 740,
                "horizon": 69,
                "forecast": "45121/10000",
                "actual": "8381/6000",
                "error": "-46729/15000"
              },
              {
                "index": 741,
                "horizon": 70,
                "forecast": "37361/7500",
                "actual": "42083/30000",
                "error": "-35787/10000"
              },
              {
                "index": 742,
                "horizon": 71,
                "forecast": "43607/7500",
                "actual": "28643/30000",
                "error": "-9719/2000"
              },
              {
                "index": 743,
                "horizon": 72,
                "forecast": "7607/1500",
                "actual": "5851/15000",
                "error": "-70219/15000"
              },
              {
                "index": 744,
                "horizon": 73,
                "forecast": "2221/2500",
                "actual": "449/1500",
                "error": "-2209/3750"
              },
              {
                "index": 745,
                "horizon": 74,
                "forecast": "4751/15000",
                "actual": "3697/15000",
                "error": "-527/7500"
              },
              {
                "index": 746,
                "horizon": 75,
                "forecast": "7693/30000",
                "actual": "12901/15000",
                "error": "18109/30000"
              },
              {
                "index": 747,
                "horizon": 76,
                "forecast": "1117/3750",
                "actual": "2673/10000",
                "error": "-917/30000"
              },
              {
                "index": 748,
                "horizon": 77,
                "forecast": "289/1000",
                "actual": "2867/10000",
                "error": "-23/10000"
              },
              {
                "index": 749,
                "horizon": 78,
                "forecast": "1323/5000",
                "actual": "527/2000",
                "error": "-11/10000"
              },
              {
                "index": 750,
                "horizon": 79,
                "forecast": "1891/6000",
                "actual": "548/625",
                "error": "16849/30000"
              },
              {
                "index": 751,
                "horizon": 80,
                "forecast": "53779/30000",
                "actual": "11179/5000",
                "error": "2659/6000"
              },
              {
                "index": 752,
                "horizon": 81,
                "forecast": "39833/15000",
                "actual": "46799/15000",
                "error": "1161/2500"
              },
              {
                "index": 753,
                "horizon": 82,
                "forecast": "17159/10000",
                "actual": "48407/15000",
                "error": "45337/30000"
              },
              {
                "index": 754,
                "horizon": 83,
                "forecast": "95101/30000",
                "actual": "122573/30000",
                "error": "1717/1875"
              },
              {
                "index": 755,
                "horizon": 84,
                "forecast": "26723/7500",
                "actual": "3057/1250",
                "error": "-8381/7500"
              },
              {
                "index": 756,
                "horizon": 85,
                "forecast": "11821/6000",
                "actual": "1092/625",
                "error": "-6689/30000"
              },
              {
                "index": 757,
                "horizon": 86,
                "forecast": "2049/1250",
                "actual": "14257/10000",
                "error": "-427/2000"
              },
              {
                "index": 758,
                "horizon": 87,
                "forecast": "16297/10000",
                "actual": "15297/10000",
                "error": "-1/10"
              },
              {
                "index": 759,
                "horizon": 88,
                "forecast": "1243/600",
                "actual": "116159/30000",
                "error": "18003/10000"
              },
              {
                "index": 760,
                "horizon": 89,
                "forecast": "61729/30000",
                "actual": "3777/2000",
                "error": "-2537/15000"
              },
              {
                "index": 761,
                "horizon": 90,
                "forecast": "41971/15000",
                "actual": "46003/15000",
                "error": "168/625"
              },
              {
                "index": 762,
                "horizon": 91,
                "forecast": "18881/10000",
                "actual": "16687/10000",
                "error": "-1097/5000"
              },
              {
                "index": 763,
                "horizon": 92,
                "forecast": "6309/2000",
                "actual": "19549/7500",
                "error": "-16439/30000"
              },
              {
                "index": 764,
                "horizon": 93,
                "forecast": "45121/10000",
                "actual": "773/240",
                "error": "-19369/15000"
              },
              {
                "index": 765,
                "horizon": 94,
                "forecast": "37361/7500",
                "actual": "53171/15000",
                "error": "-21551/15000"
              },
              {
                "index": 766,
                "horizon": 95,
                "forecast": "43607/7500",
                "actual": "4081/1500",
                "error": "-3867/1250"
              },
              {
                "index": 767,
                "horizon": 96,
                "forecast": "7607/1500",
                "actual": "5867/3000",
                "error": "-9347/3000"
              },
              {
                "index": 768,
                "horizon": 97,
                "forecast": "2221/2500",
                "actual": "841/600",
                "error": "7699/15000"
              },
              {
                "index": 769,
                "horizon": 98,
                "forecast": "4751/15000",
                "actual": "33857/30000",
                "error": "4871/6000"
              },
              {
                "index": 770,
                "horizon": 99,
                "forecast": "7693/30000",
                "actual": "4487/15000",
                "error": "427/10000"
              },
              {
                "index": 771,
                "horizon": 100,
                "forecast": "1117/3750",
                "actual": "8561/30000",
                "error": "-1/80"
              },
              {
                "index": 772,
                "horizon": 101,
                "forecast": "289/1000",
                "actual": "4289/15000",
                "error": "-23/7500"
              },
              {
                "index": 773,
                "horizon": 102,
                "forecast": "1323/5000",
                "actual": "8177/30000",
                "error": "239/30000"
              },
              {
                "index": 774,
                "horizon": 103,
                "forecast": "1891/6000",
                "actual": "1121/1500",
                "error": "2593/6000"
              },
              {
                "index": 775,
                "horizon": 104,
                "forecast": "53779/30000",
                "actual": "19663/7500",
                "error": "8291/10000"
              },
              {
                "index": 776,
                "horizon": 105,
                "forecast": "39833/15000",
                "actual": "12437/7500",
                "error": "-14959/15000"
              },
              {
                "index": 777,
                "horizon": 106,
                "forecast": "17159/10000",
                "actual": "39797/30000",
                "error": "-146/375"
              },
              {
                "index": 778,
                "horizon": 107,
                "forecast": "95101/30000",
                "actual": "1624/1875",
                "error": "-23039/10000"
              },
              {
                "index": 779,
                "horizon": 108,
                "forecast": "26723/7500",
                "actual": "8389/30000",
                "error": "-98503/30000"
              },
              {
                "index": 780,
                "horizon": 109,
                "forecast": "11821/6000",
                "actual": "9151/30000",
                "error": "-24977/15000"
              },
              {
                "index": 781,
                "horizon": 110,
                "forecast": "2049/1250",
                "actual": "5061/10000",
                "error": "-11331/10000"
              },
              {
                "index": 782,
                "horizon": 111,
                "forecast": "16297/10000",
                "actual": "11161/30000",
                "error": "-3773/3000"
              },
              {
                "index": 783,
                "horizon": 112,
                "forecast": "1243/600",
                "actual": "3677/6000",
                "error": "-8753/6000"
              },
              {
                "index": 784,
                "horizon": 113,
                "forecast": "61729/30000",
                "actual": "3062/1875",
                "error": "-12737/30000"
              },
              {
                "index": 785,
                "horizon": 114,
                "forecast": "41971/15000",
                "actual": "323/150",
                "error": "-9671/15000"
              },
              {
                "index": 786,
                "horizon": 115,
                "forecast": "18881/10000",
                "actual": "23501/7500",
                "error": "37361/30000"
              },
              {
                "index": 787,
                "horizon": 116,
                "forecast": "6309/2000",
                "actual": "2793/1000",
                "error": "-723/2000"
              },
              {
                "index": 788,
                "horizon": 117,
                "forecast": "45121/10000",
                "actual": "5566/1875",
                "error": "-46307/30000"
              },
              {
                "index": 789,
                "horizon": 118,
                "forecast": "37361/7500",
                "actual": "6947/2500",
                "error": "-826/375"
              },
              {
                "index": 790,
                "horizon": 119,
                "forecast": "43607/7500",
                "actual": "42109/30000",
                "error": "-132319/30000"
              },
              {
                "index": 791,
                "horizon": 120,
                "forecast": "7607/1500",
                "actual": "15749/30000",
                "error": "-136391/30000"
              },
              {
                "index": 792,
                "horizon": 121,
                "forecast": "2221/2500",
                "actual": "9161/30000",
                "error": "-17491/30000"
              },
              {
                "index": 793,
                "horizon": 122,
                "forecast": "4751/15000",
                "actual": "949/3000",
                "error": "-1/2500"
              },
              {
                "index": 794,
                "horizon": 123,
                "forecast": "7693/30000",
                "actual": "9143/30000",
                "error": "29/600"
              },
              {
                "index": 795,
                "horizon": 124,
                "forecast": "1117/3750",
                "actual": "9257/30000",
                "error": "107/10000"
              },
              {
                "index": 796,
                "horizon": 125,
                "forecast": "289/1000",
                "actual": "4759/15000",
                "error": "53/1875"
              },
              {
                "index": 797,
                "horizon": 126,
                "forecast": "1323/5000",
                "actual": "9013/30000",
                "error": "43/1200"
              },
              {
                "index": 798,
                "horizon": 127,
                "forecast": "1891/6000",
                "actual": "1201/1500",
                "error": "971/2000"
              },
              {
                "index": 799,
                "horizon": 128,
                "forecast": "53779/30000",
                "actual": "28391/10000",
                "error": "15697/15000"
              },
              {
                "index": 800,
                "horizon": 129,
                "forecast": "39833/15000",
                "actual": "63833/30000",
                "error": "-15833/30000"
              },
              {
                "index": 801,
                "horizon": 130,
                "forecast": "17159/10000",
                "actual": "54989/30000",
                "error": "439/3750"
              },
              {
                "index": 802,
                "horizon": 131,
                "forecast": "95101/30000",
                "actual": "34339/30000",
                "error": "-10127/5000"
              },
              {
                "index": 803,
                "horizon": 132,
                "forecast": "26723/7500",
                "actual": "2579/10000",
                "error": "-19831/6000"
              },
              {
                "index": 804,
                "horizon": 133,
                "forecast": "11821/6000",
                "actual": "121/400",
                "error": "-5003/3000"
              },
              {
                "index": 805,
                "horizon": 134,
                "forecast": "2049/1250",
                "actual": "1913/5000",
                "error": "-6283/5000"
              },
              {
                "index": 806,
                "horizon": 135,
                "forecast": "16297/10000",
                "actual": "12691/30000",
                "error": "-181/150"
              },
              {
                "index": 807,
                "horizon": 136,
                "forecast": "1243/600",
                "actual": "269/750",
                "error": "-1713/1000"
              },
              {
                "index": 808,
                "horizon": 137,
                "forecast": "61729/30000",
                "actual": "6193/6000",
                "error": "-7691/7500"
              },
              {
                "index": 809,
                "horizon": 138,
                "forecast": "41971/15000",
                "actual": "20107/15000",
                "error": "-911/625"
              },
              {
                "index": 810,
                "horizon": 139,
                "forecast": "18881/10000",
                "actual": "11023/15000",
                "error": "-34597/30000"
              },
              {
                "index": 811,
                "horizon": 140,
                "forecast": "6309/2000",
                "actual": "28823/30000",
                "error": "-16453/7500"
              },
              {
                "index": 812,
                "horizon": 141,
                "forecast": "45121/10000",
                "actual": "46367/30000",
                "error": "-22249/7500"
              },
              {
                "index": 813,
                "horizon": 142,
                "forecast": "37361/7500",
                "actual": "72679/30000",
                "error": "-15353/6000"
              },
              {
                "index": 814,
                "horizon": 143,
                "forecast": "43607/7500",
                "actual": "74719/30000",
                "error": "-99709/30000"
              },
              {
                "index": 815,
                "horizon": 144,
                "forecast": "7607/1500",
                "actual": "5473/3000",
                "error": "-3247/1000"
              },
              {
                "index": 816,
                "horizon": 145,
                "forecast": "2221/2500",
                "actual": "8659/5000",
                "error": "4217/5000"
              },
              {
                "index": 817,
                "horizon": 146,
                "forecast": "4751/15000",
                "actual": "17239/15000",
                "error": "1561/1875"
              },
              {
                "index": 818,
                "horizon": 147,
                "forecast": "7693/30000",
                "actual": "649/625",
                "error": "23459/30000"
              },
              {
                "index": 819,
                "horizon": 148,
                "forecast": "1117/3750",
                "actual": "3361/3000",
                "error": "12337/15000"
              },
              {
                "index": 820,
                "horizon": 149,
                "forecast": "289/1000",
                "actual": "6139/6000",
                "error": "881/1200"
              },
              {
                "index": 821,
                "horizon": 150,
                "forecast": "1323/5000",
                "actual": "1051/1000",
                "error": "983/1250"
              },
              {
                "index": 822,
                "horizon": 151,
                "forecast": "1891/6000",
                "actual": "33211/30000",
                "error": "5939/7500"
              },
              {
                "index": 823,
                "horizon": 152,
                "forecast": "53779/30000",
                "actual": "31703/15000",
                "error": "3209/10000"
              },
              {
                "index": 824,
                "horizon": 153,
                "forecast": "39833/15000",
                "actual": "30527/15000",
                "error": "-1551/2500"
              },
              {
                "index": 825,
                "horizon": 154,
                "forecast": "17159/10000",
                "actual": "3841/1875",
                "error": "9979/30000"
              },
              {
                "index": 826,
                "horizon": 155,
                "forecast": "95101/30000",
                "actual": "8549/3750",
                "error": "-8903/10000"
              },
              {
                "index": 827,
                "horizon": 156,
                "forecast": "26723/7500",
                "actual": "5189/2500",
                "error": "-2789/1875"
              },
              {
                "index": 828,
                "horizon": 157,
                "forecast": "11821/6000",
                "actual": "27647/15000",
                "error": "-3811/30000"
              },
              {
                "index": 829,
                "horizon": 158,
                "forecast": "2049/1250",
                "actual": "127531/30000",
                "error": "15671/6000"
              },
              {
                "index": 830,
                "horizon": 159,
                "forecast": "16297/10000",
                "actual": "26337/10000",
                "error": "251/250"
              },
              {
                "index": 831,
                "horizon": 160,
                "forecast": "1243/600",
                "actual": "59141/30000",
                "error": "-1003/10000"
              },
              {
                "index": 832,
                "horizon": 161,
                "forecast": "61729/30000",
                "actual": "3661/1875",
                "error": "-1051/10000"
              },
              {
                "index": 833,
                "horizon": 162,
                "forecast": "41971/15000",
                "actual": "1747/625",
                "error": "-43/15000"
              },
              {
                "index": 834,
                "horizon": 163,
                "forecast": "18881/10000",
                "actual": "129371/30000",
                "error": "9091/3750"
              },
              {
                "index": 835,
                "horizon": 164,
                "forecast": "6309/2000",
                "actual": "160291/30000",
                "error": "8207/3750"
              },
              {
                "index": 836,
                "horizon": 165,
                "forecast": "45121/10000",
                "actual": "27847/7500",
                "error": "-959/1200"
              },
              {
                "index": 837,
                "horizon": 166,
                "forecast": "37361/7500",
                "actual": "18193/7500",
                "error": "-4792/1875"
              },
              {
                "index": 838,
                "horizon": 167,
                "forecast": "43607/7500",
                "actual": "32851/30000",
                "error": "-141577/30000"
              },
              {
                "index": 839,
                "horizon": 168,
                "forecast": "7607/1500",
                "actual": "16789/15000",
                "error": "-59281/15000"
              }
            ],
            "fit": null,
            "fitrows": []
          }
        },
        "plotPoints": [
          {
            "label": "Actual recorded values",
            "x": [
              648,
              649,
              650,
              651,
              652,
              653,
              654,
              655,
              656,
              657,
              658,
              659,
              660,
              661,
              662,
              663,
              664,
              665,
              666,
              667,
              668,
              669,
              670,
              671,
              672,
              673,
              674,
              675,
              676,
              677,
              678,
              679,
              680,
              681,
              682,
              683,
              684,
              685,
              686,
              687,
              688,
              689,
              690,
              691,
              692,
              693,
              694,
              695,
              696,
              697,
              698,
              699,
              700,
              701,
              702,
              703,
              704,
              705,
              706,
              707,
              708,
              709,
              710,
              711,
              712,
              713,
              714,
              715,
              716,
              717,
              718,
              719,
              720,
              721,
              722,
              723,
              724,
              725,
              726,
              727,
              728,
              729,
              730,
              731,
              732,
              733,
              734,
              735,
              736,
              737,
              738,
              739,
              740,
              741,
              742,
              743,
              744,
              745,
              746,
              747,
              748,
              749,
              750,
              751,
              752,
              753,
              754,
              755,
              756,
              757,
              758,
              759,
              760,
              761,
              762,
              763,
              764,
              765,
              766,
              767,
              768,
              769,
              770,
              771,
              772,
              773,
              774,
              775,
              776,
              777,
              778,
              779,
              780,
              781,
              782,
              783,
              784,
              785,
              786,
              787,
              788,
              789,
              790,
              791,
              792,
              793,
              794,
              795,
              796,
              797,
              798,
              799,
              800,
              801,
              802,
              803,
              804,
              805,
              806,
              807,
              808,
              809,
              810,
              811,
              812,
              813,
              814,
              815,
              816,
              817,
              818,
              819,
              820,
              821,
              822,
              823,
              824,
              825,
              826,
              827,
              828,
              829,
              830,
              831,
              832,
              833,
              834,
              835,
              836,
              837,
              838,
              839
            ],
            "y": [
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              3.3405666666666667,
              2.916,
              2.8794333333333335,
              1.1217333333333332,
              1.1342333333333334,
              1.1941,
              1.5761,
              1.1410666666666667,
              1.3151666666666666,
              2.2260333333333335,
              1.7363666666666666,
              1.0085666666666666,
              0.7125,
              1.2987,
              1.8274666666666666,
              2.0970666666666666,
              3.4258,
              4.211133333333334,
              null,
              3.2915,
              3.1929,
              2.1076333333333332,
              1.4627333333333334,
              1.3745333333333334,
              1.3573,
              1.3417333333333332,
              0.462,
              0.28986666666666666,
              0.2916,
              0.244,
              0.30833333333333335,
              1.9449,
              2.5957333333333334,
              1.595,
              1.8552666666666666,
              1.3714333333333333,
              1.1310333333333333,
              0.6521,
              1.4841333333333333,
              1.6232333333333333,
              1.5423333333333333,
              1.7919666666666667,
              2.2478333333333333,
              2.9717333333333333,
              2.742566666666667,
              1.6235,
              1.8572333333333333,
              2.486466666666667,
              0.3873666666666667,
              0.2992666666666667,
              0.3085,
              0.2936666666666667,
              0.7837666666666666,
              0.40863333333333335,
              0.7007666666666666,
              2.4842333333333335,
              1.0849,
              0.8876,
              0.4004666666666667,
              0.6403666666666666,
              1.9346666666666668,
              0.9449666666666666,
              1.9168666666666667,
              0.8901333333333333,
              1.6489666666666667,
              2.8615,
              3.1261666666666668,
              1.9595,
              1.3968333333333334,
              1.4027666666666667,
              0.9547666666666667,
              0.3900666666666667,
              0.29933333333333334,
              0.24646666666666667,
              0.8600666666666666,
              0.2673,
              0.2867,
              0.2635,
              0.8768,
              2.2358,
              3.1199333333333334,
              3.227133333333333,
              4.085766666666666,
              2.4456,
              1.7472,
              1.4257,
              1.5297,
              3.871966666666667,
              1.8885,
              3.066866666666667,
              1.6687,
              2.606533333333333,
              3.220833333333333,
              3.5447333333333333,
              2.720666666666667,
              1.9556666666666667,
              1.4016666666666666,
              1.1285666666666667,
              0.2991333333333333,
              0.28536666666666666,
              0.2859333333333333,
              0.2725666666666667,
              0.7473333333333333,
              2.6217333333333332,
              1.6582666666666668,
              1.3265666666666667,
              0.8661333333333333,
              0.27963333333333334,
              0.3050333333333333,
              0.5061,
              0.3720333333333333,
              0.6128333333333333,
              1.6330666666666667,
              2.1533333333333333,
              3.1334666666666666,
              2.793,
              2.9685333333333332,
              2.7788,
              1.4036333333333333,
              0.5249666666666667,
              0.3053666666666667,
              0.31633333333333336,
              0.3047666666666667,
              0.30856666666666666,
              0.31726666666666664,
              0.30043333333333333,
              0.8006666666666666,
              2.8391,
              2.1277666666666666,
              1.8329666666666666,
              1.1446333333333334,
              0.2579,
              0.3025,
              0.3826,
              0.4230333333333333,
              0.3586666666666667,
              1.0321666666666667,
              1.3404666666666667,
              0.7348666666666667,
              0.9607666666666667,
              1.5455666666666668,
              2.422633333333333,
              2.4906333333333333,
              1.8243333333333334,
              1.7318,
              1.1492666666666667,
              1.0384,
              1.1203333333333334,
              1.0231666666666666,
              1.051,
              1.1070333333333333,
              2.1135333333333333,
              2.0351333333333335,
              2.0485333333333333,
              2.279733333333333,
              2.0756,
              1.8431333333333333,
              4.251033333333333,
              2.6337,
              1.9713666666666667,
              1.9525333333333332,
              2.7952,
              4.312366666666667,
              5.3430333333333335,
              3.7129333333333334,
              2.4257333333333335,
              1.0950333333333333,
              1.1192666666666666
            ]
          },
          {
            "label": "Declared model forecast",
            "x": [
              672,
              673,
              674,
              675,
              676,
              677,
              678,
              679,
              680,
              681,
              682,
              683,
              684,
              685,
              686,
              687,
              688,
              689,
              690,
              691,
              692,
              693,
              694,
              695,
              696,
              697,
              698,
              699,
              700,
              701,
              702,
              703,
              704,
              705,
              706,
              707,
              708,
              709,
              710,
              711,
              712,
              713,
              714,
              715,
              716,
              717,
              718,
              719,
              720,
              721,
              722,
              723,
              724,
              725,
              726,
              727,
              728,
              729,
              730,
              731,
              732,
              733,
              734,
              735,
              736,
              737,
              738,
              739,
              740,
              741,
              742,
              743,
              744,
              745,
              746,
              747,
              748,
              749,
              750,
              751,
              752,
              753,
              754,
              755,
              756,
              757,
              758,
              759,
              760,
              761,
              762,
              763,
              764,
              765,
              766,
              767,
              768,
              769,
              770,
              771,
              772,
              773,
              774,
              775,
              776,
              777,
              778,
              779,
              780,
              781,
              782,
              783,
              784,
              785,
              786,
              787,
              788,
              789,
              790,
              791,
              792,
              793,
              794,
              795,
              796,
              797,
              798,
              799,
              800,
              801,
              802,
              803,
              804,
              805,
              806,
              807,
              808,
              809,
              810,
              811,
              812,
              813,
              814,
              815,
              816,
              817,
              818,
              819,
              820,
              821,
              822,
              823,
              824,
              825,
              826,
              827,
              828,
              829,
              830,
              831,
              832,
              833,
              834,
              835,
              836,
              837,
              838,
              839
            ],
            "y": [
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335
            ]
          }
        ],
        "plotFile": "metr14-plots/realdata-person-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "company": {
        "api": "realdata",
        "variant": "company",
        "language": "python",
        "codeFile": "metr14-code/realdata-company.py",
        "codeText": "from pathlib import Path\nimport importlib.util,sys\nroot=Path(__file__).resolve().parents[1]\nspec=importlib.util.spec_from_file_location(\"metr14_fixed\",root/\"metr14-fixed-support.py\")\nmodule=importlib.util.module_from_spec(spec);spec.loader.exec_module(module)\nmodule.run('realdata','company',sys.argv[1] if len(sys.argv)>1 else \"realdata-company-output\")\n",
        "codeSHA": "7de5b4dfa0171b6f352d73d659622626a40ff852ce4578dc1a9f55fde4dc7aa4",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.py",
            "codeText": "\"\"\"Public fixed examples. Python fractions for calculations; matplotlib for SVG.\nInputs below are assumed teaching values except the explicitly labeled realdata cases.\nRun through the small public programs in metr14-code/. No JavaScript engine is used.\n\"\"\"\nfrom pathlib import Path\nfrom fractions import Fraction as F\nimport importlib.util,json,sys,math\nROOT=Path(__file__).resolve().parent\nspec=importlib.util.spec_from_file_location('metr14_public_reproduce',ROOT/'metr14-reproduce.py');R=importlib.util.module_from_spec(spec);spec.loader.exec_module(R)\ndef series(v):return [dict(index=i,y=None if x is None else str(x))for i,x in enumerate(v)]\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,(list,tuple)):return [encode(x)for x in v]\n return v\ndef run(api,variant,outdir):\n out=Path(outdir);out.mkdir(parents=True,exist_ok=True);plot=[];xlabel='Assumed calendar index';ylabel='Assumed outcome units';title=api+' / '+variant+' (assumed teaching values)';full={};summary={}\n if api=='difference':\n  if variant=='default':values=list(map(F,[1,4,9,16]));a=R.delta(1,0,1);z=R.transform(values,a);summary=dict(rows=F(4),defined=F(3),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('First differences',list(range(4)),z)]\n  elif variant=='inverse':\n   values=list(map(F,[4,9]));z=[F(2),F(2)];result=[]\n   for v in z:values.append(v+2*values[-1]-values[-2]);result.append(values[-1])\n   summary=dict(rows=F(2),defined=F(2),last=result[-1]);full=dict(history=[F(4),F(9)],predictedSecondDifferences=z,levels=result);plot=[('Reconstructed levels',[2,3],result)]\n  else:\n   values=[F(1),None,F(9)];a=R.delta(0,1,2);z=R.transform(values,a);summary=dict(rows=F(3),defined=F(1),last=z[-1]);full=dict(levels=values,polynomial=a,transformed=z);plot=[('Seasonal differences',[0,1,2],z)]\n elif api=='polynomial':\n  o=dict(phi=['1/2'],theta=['1/4'],horizon=8,origin=0)if variant=='default'else dict(phi=[],theta=['-1'],d=1,horizon=8,origin=0)\n  r=R.forecast(series([0]),o);summary={**{'psi'+str(j):r['psi'][j]for j in range(4)},'expandedDegree':F(len(r['P'])-1)};full=dict(inputs=o,expandedPolynomial=r['P'],psi=r['psi']);plot=[('Level impulse weights',list(range(8)),r['psi'])];ylabel='Assumed level impulse response'\n elif api=='fit':\n  values=[1,3,5,7]if variant=='default'else[5];o=dict(origin=len(values),arOrder=0,intercept=True,trend=True);r=R.fit(series(values),o);identified=[all(b[j]==0 for b in r['basis'])for j in range(len(r['part']))];summary=dict(rank=F(r['rank']),RSS=r['rss'],df=F(r['df']),intercept=r['part'][0]if identified[0]else None,trend=r['part'][1]if identified[1]else None);full=dict(inputs=o,levels=values,fit=r);plot=[('Observed assumed values',list(range(len(values))),list(map(F,values))),('Fitted assumed values',r['used'],r['fitted'])]\n elif api=='forecast':\n  if variant=='invalid':raise ValueError('nonnegative-innovation-variance: supplied -1')\n  o=dict(origin=3,phi=['1/2'],theta=['1/4'],constant='0',initialInnovations=['0'],horizon=6)if variant=='default'else dict(origin=2,phi=['1','-1'],theta=[],constant='0',horizon=6)\n  values=[2,1,2]if variant=='default'else[None,4];r=R.forecast(series(values),o);means=[None if terms else v for v,terms in r['means']];summary=dict(defined=F(sum(v is not None for v in means)),first=means[0],last=means[-1],lastInnovationVariance=None if r['means'][-1][1]else r['variances'][-1]);full=dict(inputs=o,levels=values,result=r);plot=[('Identified level means',list(range(o['origin'],o['origin']+6)),means)];ylabel='Assumed conditional level mean'\n elif api=='origins':\n  values=[1,2,3,10,5,6];o=dict(origin=3,horizon=3,model='naive'if variant=='default'else'drift');r=R.path_profile(series(values),o);summary={k:r['metrics'][k]for k in ['forecastDefined','scorePairs','MAE','MSE']};full=dict(inputs=o,levels=values,result=r);plot=[('Actual assumed outcomes',[3,4,5],[F(10),F(5),F(6)]),('Forecast path',[3,4,5],[v['forecast']for v in r['rows']])]\n elif api=='realdata':\n  models=R.load_sources(ROOT);profiles=json.loads((ROOT/'metr14-profiles.json').read_bytes());id={'country':'country-ar1-trend','person':'person-seasonal24','company':'company-ar1-dummies7-trend'}[variant];p=next(p for p in profiles if p['id']==id);r=R.path_profile(models[variant],p['options']);summary={k:r['metrics'][k]for k in ['origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE']};full=dict(profile=p,originalCalendar=models[variant],result=r);origin=p['options']['origin'];start=max(0,origin-(5 if variant=='country'else 24));rr=models[variant][start:origin+p['options']['horizon']];xx=lambda i:int(models[variant][i]['timeLabel'])if variant=='country'else i;plot=[('Actual recorded values',[xx(v['index'])for v in rr],[R.q(v['y'])for v in rr]),('Declared model forecast',[xx(v['index'])for v in r['rows']],[v['forecast']for v in r['rows']])];xlabel='Year'if variant=='country'else('Original hour index'if variant=='person'else'Original calendar-day index');ylabel={'country':'Constant-2015 USD/person','person':'kW (complete-hour mean)','company':'Recorded gross SKU units'}[variant];title='Actual '+variant+' / '+id+'; disclosed local plot window'\n else:raise ValueError('unknown fixed API')\n (out/'summary.json').write_text(json.dumps(encode(summary),indent=2)+'\\n',encoding='utf8');(out/'full.json').write_text(json.dumps(encode(full),indent=2)+'\\n',encoding='utf8')\n import matplotlib\n matplotlib.use('Agg')\n import matplotlib.pyplot as plt\n fig,ax=plt.subplots(figsize=(7.2,4.2));colors=['#0f766e','#c2410c','#2563eb']\n for j,(label,x,y)in enumerate(plot):ax.plot(x,[float(v)if v is not None else math.nan for v in y],'-o'if len(x)<12 else'-',markersize=4,linewidth=1.6,label=label,color=colors[j%3])\n ax.set_title(title,fontsize=10,wrap=True);ax.set_xlabel(xlabel,fontsize=10);ax.set_ylabel(ylabel,fontsize=10);ax.tick_params(labelsize=10);ax.grid(True,alpha=.2);ax.legend(fontsize=9,loc='best');fig.tight_layout(pad=1.5);fig.savefig(out/'plot.svg',format='svg');plt.close(fig)\n (out/'plot-points.json').write_text(json.dumps([dict(label=label,x=x,y=[None if v is None else float(v)for v in y])for label,x,y in plot],indent=2)+'\\n',encoding='utf8');print(json.dumps(dict(api=api,variant=variant,summary=R.encode(summary),scope='Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.'),ensure_ascii=False))\n",
            "sha256": "76dd5cc0578d47aa08b114d634f875424cb3822e7c99ec69205aeaa1ac8bdd6b"
          },
          {
            "file": "metr14-reproduce.py",
            "codeText": "\"\"\"Standalone METR14 exact reproduction; Python standard library only.\nRead the five public selected-source CSVs and profiles beside this script.\nNo production JS engine, private author checker, online request or hidden data.\nOutputs <base>.json, <base>-metrics.csv, <base>-forecasts.csv, <base>-fitrows.csv.\nRetrospective retained-vintage calculations; no real-time or causal claim.\n\"\"\"\nfrom fractions import Fraction as F\nfrom math import comb\nZ=F();O=F(1)\ndef q(x):return None if x is None else F(str(x))\ndef delta(d,D,s):\n a=[Z]*(d+D*s+1)\n for i in range(d+1):\n  for j in range(D+1):a[i+j*s]+=F((-1)**(i+j)*comb(d,i)*comb(D,j))\n return a\ndef transform(ys,a):return [None if any(i<j or ys[i-j]is None for j,v in enumerate(a)if v)else sum((v*ys[i-j]for j,v in enumerate(a)if v),Z)for i in range(len(ys))]\ndef rref(A):\n A=[r[:]for r in A];h=0;piv=[]\n for j in range(len(A[0])-1 if A else 0):\n  k=next((k for k in range(h,len(A))if A[k][j]),None)\n  if k is None:continue\n  A[h],A[k]=A[k],A[h];v=A[h][j];A[h]=[x/v for x in A[h]]\n  for k in range(len(A)):\n   if k!=h:v=A[k][j];A[k]=[x-v*y for x,y in zip(A[k],A[h])]\n  piv.append(j);h+=1\n  if h==len(A):break\n return A,piv\ndef least(X,y,k):\n # Unnormalized exact Gram-Schmidt projects y onto the column space of X.\n # Coefficient families are then obtained from X beta=projected-y,not X'X.\n Q=[]\n for j in range(k):\n  v=[r[j]for r in X]\n  for b in Q:\n   coefficient=sum((x*a for x,a in zip(v,b)),Z)/sum((a*a for a in b),Z);v=[x-coefficient*a for x,a in zip(v,b)]\n  if any(v):Q.append(v)\n fitted=[Z]*len(y)\n for b in Q:\n  c=sum((a*v for a,v in zip(b,y)),Z)/sum((a*a for a in b),Z);fitted=[x+c*a for x,a in zip(fitted,b)]\n A,piv=rref([row+[v]for row,v in zip(X,fitted)]);part=[Z]*k\n for i,j in enumerate(piv):part[j]=A[i][-1]\n basis=[]\n for f in range(k):\n  if f in piv:continue\n  b=[Z]*k;b[f]=O\n  for i,j in enumerate(piv):b[j]=-A[i][f]\n  basis.append(b)\n residual=[a-b for a,b in zip(y,fitted)];rss=sum((v*v for v in residual),Z);return {'part':part,'basis':basis,'rank':len(piv),'fitted':fitted,'residual':residual,'rss':rss,'df':len(y)-len(piv)}\ndef spec(o):\n p=o.get('arOrder',1);inter=o.get('intercept',True);trend=o.get('trend',False);s=o.get('season',0);Q=o.get('quarterHarmonics',0);names=[]\n if inter:names+=['intercept']\n names+=['ARlag'+str(j)for j in range(1,p+1)]\n if trend:names+=['time-from-trendOrigin']\n if s:names+=['season-phase'+str(j)for j in range(1 if inter else 0,s)]\n if Q:names+=['quarter-cos1','quarter-sin1']+(['quarter-cos2']if Q==2 else[])\n return names\ndef features(index,lagmap,o):\n vals=[]\n if o.get('intercept',True):vals+=[O]\n vals+=[lagmap.get(index-j)for j in range(1,o.get('arOrder',1)+1)]\n if o.get('trend',False):vals+=[F(index-o.get('trendOrigin',0))]\n s=o.get('season',0);phase=index-o.get('phaseOrigin',0)\n if s:vals+=[F(phase%s==j)for j in range(1 if o.get('intercept',True)else 0,s)]\n Q=o.get('quarterHarmonics',0)\n if Q:vals+=[F([1,0,-1,0][phase%4]),F([0,1,0,-1][phase%4])]+([F(1 if phase%2==0 else-1)]if Q==2 else[])\n return vals\ndef fit(series,o):\n first=series[0]['index'];origin=o.get('origin',series[-1]['index']+1);w=o.get('window');train=[r for r in series if r['index']<origin and(w is None or r['index']>=origin-w)];ys=[q(r['y'])for r in train];a=delta(o.get('d',0),o.get('D',0),o.get('period',1));zs=transform(ys,a);lookup={r['index']:z for r,z in zip(train,zs)};X=[];Y=[];used=[]\n for r,z in zip(train,zs):\n  xx=features(r['index'],lookup,o)\n  if z is not None and all(x is not None for x in xx):X.append(xx);Y.append(z);used.append(r['index'])\n v=least(X,Y,len(spec(o)));return {**v,'train':train,'z':zs,'X':X,'Y':Y,'used':used,'names':spec(o),'delta':a,'origin':origin}\n# Affine forms carry independent unresolved state coordinates without filling them.\ndef known(v):return (v,{})\ndef unknown(k):return (Z,{k:O})\ndef add(a,b):\n c=a[0]+b[0];d=a[1].copy()\n for k,v in b[1].items():d[k]=d.get(k,Z)+v\n return c,{k:v for k,v in d.items()if v}\ndef scale(a,s):return (a[0]*s,{k:v*s for k,v in a[1].items()if v*s})\ndef dot(xs,vs):\n a=known(Z)\n for x,v in zip(xs,vs):a=add(a,scale(v,x))\n return a\ndef forecast(series,o):\n origin=o.get('origin',series[-1]['index']+1);window=o.get('window');train=[r for r in series if r['index']<origin and(window is None or r['index']>=origin-window)];phi=list(map(F,o.get('phi',['1/2'])));theta=list(map(F,o.get('theta',[])));de=delta(o.get('d',0),o.get('D',0),o.get('period',1));P=[Z]*(len(de)+len(phi))\n for j,v in enumerate(de):\n  P[j]+=v\n  for i,x in enumerate(phi,1):P[j+i]-=x*v\n while len(P)>1 and not P[-1]:P.pop()\n levels={r['index']:known(q(r['y']))if r['y']is not None else unknown('missing-observed-level@'+str(r['index']))for r in train};eps={};constant=F(o.get('constant',0));start=(train[0]['index']if train else origin)+len(P)-1;anchor=min(start,origin);initial=list(map(F,o.get('initialInnovations',[0]*len(theta))))\n def lev(i):return levels.setdefault(i,unknown('unprovided-level@'+str(i)))\n def ep(i):return eps.setdefault(i,unknown('unprovided-innovation@'+str(i)))\n for j,v in enumerate(initial):eps[anchor-len(theta)+j]=known(v)\n # Historical conditional innovations satisfy the expanded uncancelled equation.\n for r in train:\n  t=r['index']\n  if t<start:continue\n  residual=add(lev(t),known(-constant))\n  for j in range(1,len(P)):residual=add(residual,scale(lev(t-j),P[j]))\n  for j,v in enumerate(theta,1):residual=add(residual,scale(ep(t-j),-v))\n  eps[t]=residual\n # Independent companion-state transition. Include a constant state and an\n # output coordinate even when the expanded AR polynomial has degree zero.\n ny=max(1,len(P)-1);ne=len(theta);n=ny+ne+1;T=[[Z]*n for _ in range(n)]\n for j in range(1,len(P)):T[0][j-1]=-P[j]\n for j,v in enumerate(theta):T[0][ny+j]=v\n T[0][-1]=constant\n for j in range(1,ny):T[j][j-1]=O\n for j in range(1,ne):T[ny+j][ny+j-1]=O\n T[-1][-1]=O;x=[lev(origin-j)for j in range(1,ny+1)]+[ep(origin-j)for j in range(1,ne+1)]+[known(O)];noise=[Z]*n;noise[0]=O\n if ne:noise[ny]=O\n horizon=o.get('horizon',12);means=[];var=[];sigma=F(o.get('innovationVariance',1));variance=Z;response=noise[:];psi=[]\n for h in range(horizon):\n  x=[dot(row,x)for row in T];t=origin+h;levels[t]=x[0];means.append(x[0]);psi.append(response[0]);variance+=sigma*response[0]**2;var.append(variance);response=[sum((a*b for a,b in zip(row,response)),Z)for row in T]\n transformed=[]\n for h in range(horizon):transformed.append(dot(de,[lev(origin+h-j)for j in range(len(de))]))\n return {'means':means,'transformed':transformed,'variances':var,'psi':psi,'P':P,'start':start,'anchor':anchor}\n\nfrom pathlib import Path\nfrom datetime import datetime,timedelta\nimport csv,json,sys,platform\ndef load_sources(root):\n d=root/'metr14-sources'\n def rd(n):return list(csv.DictReader((d/n).open(encoding='utf-8-sig',newline='')))\n country=[dict(index=i,timeLabel=r['year'],y=r['gdpOriginalToken'])for i,r in enumerate(rd('actual45-KOR-GDPpercapita-original-1980-2024.csv'))]\n minute=rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');person=[]\n for i in range(840):\n  rr=minute[60*i:60*(i+1)];assert len(rr)==60\n  vals=[F(r['Global_active_power'])for r in rr if r['Global_active_power']not in['','?']]\n  person.append(dict(index=i,timeLabel=(datetime(2006,12,17)+timedelta(hours=i)).isoformat(),y=str(sum(vals,Z)/60)if len(vals)==60 else None))\n retail=rd('actual2313-retail-SKU85123A-all8-original-fields.csv');gross={}\n for r in retail:\n  day=(datetime(1899,12,30)+timedelta(days=int(F(r['InvoiceDate'])))).date().isoformat();gross[day]=gross.get(day,Z)+max(Z,F(r['Quantity']))\n company=[]\n for i,r in enumerate(rd('derived374-retail-calendar-day-gross-net-and-coverage.csv')):\n  eligible=int(r['allRetailerRecordedRows'])>0 and r['calendarDate']not in['2010-12-01','2011-12-09'];company.append(dict(index=i,timeLabel=r['calendarDate'],y=str(gross.get(r['calendarDate'],Z))if eligible else None))\n return dict(country=country,person=person,company=company)\ndef path_profile(series,o):\n origin=o['origin'];horizon=o['horizon'];train=[r for r in series if r['index']<origin and(o.get('window')is None or r['index']>=origin-o['window'])];actual={r['index']:q(r['y'])for r in series};base={r['index']:q(r['y'])for r in train};model=o['model'];f=None;pred=[]\n if model=='AR':\n  f=fit(series,o);lookup={r['index']:z for r,z in zip(f['train'],f['z'])};levels=base.copy();zero=[p==0 and all(b[j]==0 for b in f['basis'])for j,p in enumerate(f['part'])]\n  for h in range(horizon):\n   t=origin+h;xx=features(t,lookup,o);xx=[Z if x is None and zero[j]else x for j,x in enumerate(xx)];v=None\n   if all(x is not None for x in xx)and all(sum((x*b for x,b in zip(xx,n)),Z)==0 for n in f['basis']):v=sum((x*b for x,b in zip(xx,f['part'])),Z)\n   lookup[t]=v;level=v\n   for j,a in enumerate(f['delta'][1:],1):\n    if not a:continue\n    if levels.get(t-j)is None:level=None;break\n    if level is not None:level-=a*levels[t-j]\n   levels[t]=level;pred.append(level)\n else:\n  observed=[x for x in base.values()if x is not None];mu=sum(observed,Z)/len(observed)if observed else None\n  for h in range(horizon):\n   t=origin+h;v=None\n   if model=='mean':v=mu\n   elif model=='naive':v=base.get(origin-1)\n   elif model=='drift'and train and base[train[0]['index']]is not None and base[train[-1]['index']]is not None and len(train)>1:v=base[train[-1]['index']]+F(h+1,len(train)-1)*(base[train[-1]['index']]-base[train[0]['index']])\n   elif model=='seasonalNaive':s=o['baselinePeriod'];v=base.get(t-s*((t-origin)//s+1))\n   pred.append(v)\n errors=[actual.get(origin+h)-v if v is not None and actual.get(origin+h)is not None else None for h,v in enumerate(pred)];es=[v for v in errors if v is not None]\n metrics=dict(origin=F(origin),trainingCalendar=F(len(train)),trainingObserved=F(sum(r['y']is not None for r in train)),horizon=F(horizon),forecastDefined=F(sum(v is not None for v in pred)),scorePairs=F(len(es)),MAE=sum(map(abs,es),Z)/len(es)if es else None,MSE=sum((e*e for e in es),Z)/len(es)if es else None)\n if f:\n  metrics.update(fitRows=F(len(f['Y'])),rank=F(f['rank']),parameters=F(len(f['part'])),df=F(f['df']),RSS=f['rss'],residualVariance=f['rss']/f['df']if f['df']>0 else None)\n  for j,name in enumerate(f['names']):metrics['coefficient:'+name]=f['part'][j]if all(b[j]==0 for b in f['basis'])else None\n rows=[dict(index=origin+h,horizon=h+1,forecast=v,actual=actual.get(origin+h),error=errors[h])for h,v in enumerate(pred)]\n fitrows=[]if not f else[dict(index=t,observed=y,fitted=a,residual=b,features=xx)for t,y,a,b,xx in zip(f['used'],f['Y'],f['fitted'],f['residual'],f['X'])]\n return dict(metrics=metrics,rows=rows,fit=f,fitrows=fitrows)\ndef encode(v):\n if isinstance(v,F):return str(v)\n if isinstance(v,dict):return {str(k):encode(x)for k,x in v.items()}\n if isinstance(v,list):return list(map(encode,v))\n return v\ndef main():\n root=Path(__file__).resolve().parent;base=Path(sys.argv[1]if len(sys.argv)>1 else'metr14-results');models=load_sources(root);profiles=json.loads((root/'metr14-profiles.json').read_bytes());allresults=[];metrics=[];forecasts=[];fitrows=[]\n for p in profiles:\n  r=path_profile(models[p['kind']],p['options']);allresults.append(dict(profile=p,**r));metrics.extend([p['id'],k,encode(v)]for k,v in r['metrics'].items())\n  forecasts.extend([p['id'],row['index'],models[p['kind']][row['index']]['timeLabel'],row['horizon'],encode(row['forecast']),encode(row['actual']),encode(row['error'])]for row in r['rows'])\n  fitrows.extend([p['id'],row['index'],encode(row['observed']),encode(row['fitted']),encode(row['residual']),'|'.join(encode(x)for x in row['features'])]for row in r['fitrows'])\n result=dict(chapter='METR-14',software=platform.python_version(),numericMethod='Exact Fraction column-space projection and X-system family;only defined registered public profiles,not a generic missing-state Kalman implementation.',sourceScope='Retained-vintage observations/complete-hour aggregation/recorded gross SKU units;no realtime-vintage/causality/stationarity certificate.',models=models,results=allresults)\n base.with_suffix('.json').write_text(json.dumps(encode(result),ensure_ascii=False,indent=2)+'\\n',encoding='utf8')\n for suffix,headers,rr in[('metrics',['profile','metric','exactValue'],metrics),('forecasts',['profile','index','timeLabel','horizon','forecast','actual','error'],forecasts),('fitrows',['profile','index','transformedObserved','fitted','residual','features'],fitrows)]:\n  with base.with_name(base.name+'-'+suffix+'.csv').open('w',encoding='utf-8-sig',newline='')as f:w=csv.writer(f);w.writerow(headers);w.writerows(rr)\n print(json.dumps(dict(profiles=len(profiles),metrics=len(metrics),forecastRows=len(forecasts),conditionalFitRows=len(fitrows))))\nif __name__=='__main__':main()\n",
            "sha256": "0ca4c81445d4aa0a94db808a208a4b269de3070c399cbacf36753947e67d2bfd"
          },
          {
            "file": "metr14-profiles.json",
            "codeText": "[\n  {\n    \"id\": \"country-naive\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 마지막 수준\",\n      \"en\": \"GDP · last level\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"naive\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-drift\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 양 끝 드리프트\",\n      \"en\": \"GDP · endpoint drift\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"drift\",\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-ar1-trend\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · AR1과 추세\",\n      \"en\": \"GDP · AR1 and trend\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"trend\": true,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"country-difference-mean\",\n    \"kind\": \"country\",\n    \"title\": {\n      \"ko\": \"GDP · 평균 증가분\",\n      \"en\": \"GDP · mean increment\"\n    },\n    \"options\": {\n      \"origin\": 35,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"d\": 1,\n      \"horizon\": 10\n    }\n  },\n  {\n    \"id\": \"person-seasonal24\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 전날 같은 시간\",\n      \"en\": \"Household · same hour yesterday\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 24,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 시간 더미와 추세\",\n      \"en\": \"Household · hour dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 168\n    }\n  },\n  {\n    \"id\": \"person-ar1-dummies24-trend\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · AR1·시간 더미·추세\",\n      \"en\": \"Household · AR1,hour dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 24,\n      \"trend\": true,\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"person-naive-day\",\n    \"kind\": \"person\",\n    \"title\": {\n      \"ko\": \"가구 · 마지막 수준,하루\",\n      \"en\": \"Household · last level,one day\"\n    },\n    \"options\": {\n      \"origin\": 672,\n      \"model\": \"naive\",\n      \"horizon\": 24\n    }\n  },\n  {\n    \"id\": \"company-seasonal7\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 지난주 같은 요일\",\n      \"en\": \"Retailer · same weekday last week\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"seasonalNaive\",\n      \"baselinePeriod\": 7,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 요일 더미와 추세\",\n      \"en\": \"Retailer · weekday dummies and trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 0,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-ar1-dummies7-trend\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · AR1·요일 더미·추세\",\n      \"en\": \"Retailer · AR1,weekday dummies,trend\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"AR\",\n      \"arOrder\": 1,\n      \"season\": 7,\n      \"trend\": true,\n      \"horizon\": 39\n    }\n  },\n  {\n    \"id\": \"company-naive\",\n    \"kind\": \"company\",\n    \"title\": {\n      \"ko\": \"기업 · 마지막 수준\",\n      \"en\": \"Retailer · last level\"\n    },\n    \"options\": {\n      \"origin\": 335,\n      \"model\": \"naive\",\n      \"horizon\": 39\n    }\n  }\n]\n",
            "sha256": "57540f539ce6fcd563792f36646c003735a897db70fd0b0ddcfc025fafee08d3"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\": \"realdata\", \"variant\": \"company\", \"summary\": {\"origin\": \"335\", \"trainingObserved\": \"270\", \"forecastDefined\": \"4\", \"scorePairs\": \"4\", \"MAE\": \"14167497529396982718525740818110958618899785388842882410141834112210485155622851567/43175474782611598032908016067033136502665976070120844989275624355480904379605000\", \"MSE\": \"142265631473850400244211904013698412143668559077166441404838859005509579963504129857825807973560670765160767855520954431317579330468967037497653363943187491635343699/466030405675982504604363939952384241990626309268865521483085613112400267743526202671352701825891461511623779191614666212240275010702968895468317484989006250000\"}, \"scope\": \"Actual data only for realdata;other numbers explicitly assumed. SVG and full exact outputs written.\"}\n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "origin": "335",
          "trainingObserved": "270",
          "forecastDefined": "4",
          "scorePairs": "4",
          "MAE": "14167497529396982718525740818110958618899785388842882410141834112210485155622851567/43175474782611598032908016067033136502665976070120844989275624355480904379605000",
          "MSE": "142265631473850400244211904013698412143668559077166441404838859005509579963504129857825807973560670765160767855520954431317579330468967037497653363943187491635343699/466030405675982504604363939952384241990626309268865521483085613112400267743526202671352701825891461511623779191614666212240275010702968895468317484989006250000"
        },
        "fullResult": {
          "profile": {
            "id": "company-ar1-dummies7-trend",
            "kind": "company",
            "title": {
              "ko": "기업 · AR1·요일 더미·추세",
              "en": "Retailer · AR1,weekday dummies,trend"
            },
            "options": {
              "origin": 335,
              "model": "AR",
              "arOrder": 1,
              "season": 7,
              "trend": true,
              "horizon": 39
            }
          },
          "originalCalendar": [
            {
              "index": 0,
              "timeLabel": "2010-12-01",
              "y": null
            },
            {
              "index": 1,
              "timeLabel": "2010-12-02",
              "y": "309"
            },
            {
              "index": 2,
              "timeLabel": "2010-12-03",
              "y": "25"
            },
            {
              "index": 3,
              "timeLabel": "2010-12-04",
              "y": null
            },
            {
              "index": 4,
              "timeLabel": "2010-12-05",
              "y": "198"
            },
            {
              "index": 5,
              "timeLabel": "2010-12-06",
              "y": "161"
            },
            {
              "index": 6,
              "timeLabel": "2010-12-07",
              "y": "331"
            },
            {
              "index": 7,
              "timeLabel": "2010-12-08",
              "y": "151"
            },
            {
              "index": 8,
              "timeLabel": "2010-12-09",
              "y": "195"
            },
            {
              "index": 9,
              "timeLabel": "2010-12-10",
              "y": "165"
            },
            {
              "index": 10,
              "timeLabel": "2010-12-11",
              "y": null
            },
            {
              "index": 11,
              "timeLabel": "2010-12-12",
              "y": "42"
            },
            {
              "index": 12,
              "timeLabel": "2010-12-13",
              "y": "337"
            },
            {
              "index": 13,
              "timeLabel": "2010-12-14",
              "y": "185"
            },
            {
              "index": 14,
              "timeLabel": "2010-12-15",
              "y": "112"
            },
            {
              "index": 15,
              "timeLabel": "2010-12-16",
              "y": "790"
            },
            {
              "index": 16,
              "timeLabel": "2010-12-17",
              "y": "58"
            },
            {
              "index": 17,
              "timeLabel": "2010-12-18",
              "y": null
            },
            {
              "index": 18,
              "timeLabel": "2010-12-19",
              "y": "42"
            },
            {
              "index": 19,
              "timeLabel": "2010-12-20",
              "y": "85"
            },
            {
              "index": 20,
              "timeLabel": "2010-12-21",
              "y": "41"
            },
            {
              "index": 21,
              "timeLabel": "2010-12-22",
              "y": "25"
            },
            {
              "index": 22,
              "timeLabel": "2010-12-23",
              "y": "47"
            },
            {
              "index": 23,
              "timeLabel": "2010-12-24",
              "y": null
            },
            {
              "index": 24,
              "timeLabel": "2010-12-25",
              "y": null
            },
            {
              "index": 25,
              "timeLabel": "2010-12-26",
              "y": null
            },
            {
              "index": 26,
              "timeLabel": "2010-12-27",
              "y": null
            },
            {
              "index": 27,
              "timeLabel": "2010-12-28",
              "y": null
            },
            {
              "index": 28,
              "timeLabel": "2010-12-29",
              "y": null
            },
            {
              "index": 29,
              "timeLabel": "2010-12-30",
              "y": null
            },
            {
              "index": 30,
              "timeLabel": "2010-12-31",
              "y": null
            },
            {
              "index": 31,
              "timeLabel": "2011-01-01",
              "y": null
            },
            {
              "index": 32,
              "timeLabel": "2011-01-02",
              "y": null
            },
            {
              "index": 33,
              "timeLabel": "2011-01-03",
              "y": null
            },
            {
              "index": 34,
              "timeLabel": "2011-01-04",
              "y": "67"
            },
            {
              "index": 35,
              "timeLabel": "2011-01-05",
              "y": "304"
            },
            {
              "index": 36,
              "timeLabel": "2011-01-06",
              "y": "171"
            },
            {
              "index": 37,
              "timeLabel": "2011-01-07",
              "y": "334"
            },
            {
              "index": 38,
              "timeLabel": "2011-01-08",
              "y": null
            },
            {
              "index": 39,
              "timeLabel": "2011-01-09",
              "y": "97"
            },
            {
              "index": 40,
              "timeLabel": "2011-01-10",
              "y": "12"
            },
            {
              "index": 41,
              "timeLabel": "2011-01-11",
              "y": "3114"
            },
            {
              "index": 42,
              "timeLabel": "2011-01-12",
              "y": "83"
            },
            {
              "index": 43,
              "timeLabel": "2011-01-13",
              "y": "8"
            },
            {
              "index": 44,
              "timeLabel": "2011-01-14",
              "y": "89"
            },
            {
              "index": 45,
              "timeLabel": "2011-01-15",
              "y": null
            },
            {
              "index": 46,
              "timeLabel": "2011-01-16",
              "y": "23"
            },
            {
              "index": 47,
              "timeLabel": "2011-01-17",
              "y": "220"
            },
            {
              "index": 48,
              "timeLabel": "2011-01-18",
              "y": "18"
            },
            {
              "index": 49,
              "timeLabel": "2011-01-19",
              "y": "271"
            },
            {
              "index": 50,
              "timeLabel": "2011-01-20",
              "y": "42"
            },
            {
              "index": 51,
              "timeLabel": "2011-01-21",
              "y": "63"
            },
            {
              "index": 52,
              "timeLabel": "2011-01-22",
              "y": null
            },
            {
              "index": 53,
              "timeLabel": "2011-01-23",
              "y": "47"
            },
            {
              "index": 54,
              "timeLabel": "2011-01-24",
              "y": "11"
            },
            {
              "index": 55,
              "timeLabel": "2011-01-25",
              "y": "92"
            },
            {
              "index": 56,
              "timeLabel": "2011-01-26",
              "y": "183"
            },
            {
              "index": 57,
              "timeLabel": "2011-01-27",
              "y": "64"
            },
            {
              "index": 58,
              "timeLabel": "2011-01-28",
              "y": "68"
            },
            {
              "index": 59,
              "timeLabel": "2011-01-29",
              "y": null
            },
            {
              "index": 60,
              "timeLabel": "2011-01-30",
              "y": "123"
            },
            {
              "index": 61,
              "timeLabel": "2011-01-31",
              "y": "29"
            },
            {
              "index": 62,
              "timeLabel": "2011-02-01",
              "y": "195"
            },
            {
              "index": 63,
              "timeLabel": "2011-02-02",
              "y": "222"
            },
            {
              "index": 64,
              "timeLabel": "2011-02-03",
              "y": "63"
            },
            {
              "index": 65,
              "timeLabel": "2011-02-04",
              "y": "42"
            },
            {
              "index": 66,
              "timeLabel": "2011-02-05",
              "y": null
            },
            {
              "index": 67,
              "timeLabel": "2011-02-06",
              "y": "35"
            },
            {
              "index": 68,
              "timeLabel": "2011-02-07",
              "y": "69"
            },
            {
              "index": 69,
              "timeLabel": "2011-02-08",
              "y": "153"
            },
            {
              "index": 70,
              "timeLabel": "2011-02-09",
              "y": "14"
            },
            {
              "index": 71,
              "timeLabel": "2011-02-10",
              "y": "66"
            },
            {
              "index": 72,
              "timeLabel": "2011-02-11",
              "y": "209"
            },
            {
              "index": 73,
              "timeLabel": "2011-02-12",
              "y": null
            },
            {
              "index": 74,
              "timeLabel": "2011-02-13",
              "y": "6"
            },
            {
              "index": 75,
              "timeLabel": "2011-02-14",
              "y": "66"
            },
            {
              "index": 76,
              "timeLabel": "2011-02-15",
              "y": "12"
            },
            {
              "index": 77,
              "timeLabel": "2011-02-16",
              "y": "203"
            },
            {
              "index": 78,
              "timeLabel": "2011-02-17",
              "y": "50"
            },
            {
              "index": 79,
              "timeLabel": "2011-02-18",
              "y": "6"
            },
            {
              "index": 80,
              "timeLabel": "2011-02-19",
              "y": null
            },
            {
              "index": 81,
              "timeLabel": "2011-02-20",
              "y": "28"
            },
            {
              "index": 82,
              "timeLabel": "2011-02-21",
              "y": "23"
            },
            {
              "index": 83,
              "timeLabel": "2011-02-22",
              "y": "96"
            },
            {
              "index": 84,
              "timeLabel": "2011-02-23",
              "y": "116"
            },
            {
              "index": 85,
              "timeLabel": "2011-02-24",
              "y": "99"
            },
            {
              "index": 86,
              "timeLabel": "2011-02-25",
              "y": "40"
            },
            {
              "index": 87,
              "timeLabel": "2011-02-26",
              "y": null
            },
            {
              "index": 88,
              "timeLabel": "2011-02-27",
              "y": "27"
            },
            {
              "index": 89,
              "timeLabel": "2011-02-28",
              "y": "37"
            },
            {
              "index": 90,
              "timeLabel": "2011-03-01",
              "y": "86"
            },
            {
              "index": 91,
              "timeLabel": "2011-03-02",
              "y": "33"
            },
            {
              "index": 92,
              "timeLabel": "2011-03-03",
              "y": "96"
            },
            {
              "index": 93,
              "timeLabel": "2011-03-04",
              "y": "27"
            },
            {
              "index": 94,
              "timeLabel": "2011-03-05",
              "y": null
            },
            {
              "index": 95,
              "timeLabel": "2011-03-06",
              "y": "101"
            },
            {
              "index": 96,
              "timeLabel": "2011-03-07",
              "y": "26"
            },
            {
              "index": 97,
              "timeLabel": "2011-03-08",
              "y": "145"
            },
            {
              "index": 98,
              "timeLabel": "2011-03-09",
              "y": "98"
            },
            {
              "index": 99,
              "timeLabel": "2011-03-10",
              "y": "57"
            },
            {
              "index": 100,
              "timeLabel": "2011-03-11",
              "y": "125"
            },
            {
              "index": 101,
              "timeLabel": "2011-03-12",
              "y": null
            },
            {
              "index": 102,
              "timeLabel": "2011-03-13",
              "y": "3"
            },
            {
              "index": 103,
              "timeLabel": "2011-03-14",
              "y": "19"
            },
            {
              "index": 104,
              "timeLabel": "2011-03-15",
              "y": "114"
            },
            {
              "index": 105,
              "timeLabel": "2011-03-16",
              "y": "141"
            },
            {
              "index": 106,
              "timeLabel": "2011-03-17",
              "y": "87"
            },
            {
              "index": 107,
              "timeLabel": "2011-03-18",
              "y": "57"
            },
            {
              "index": 108,
              "timeLabel": "2011-03-19",
              "y": null
            },
            {
              "index": 109,
              "timeLabel": "2011-03-20",
              "y": "47"
            },
            {
              "index": 110,
              "timeLabel": "2011-03-21",
              "y": "38"
            },
            {
              "index": 111,
              "timeLabel": "2011-03-22",
              "y": "84"
            },
            {
              "index": 112,
              "timeLabel": "2011-03-23",
              "y": "83"
            },
            {
              "index": 113,
              "timeLabel": "2011-03-24",
              "y": "52"
            },
            {
              "index": 114,
              "timeLabel": "2011-03-25",
              "y": "31"
            },
            {
              "index": 115,
              "timeLabel": "2011-03-26",
              "y": null
            },
            {
              "index": 116,
              "timeLabel": "2011-03-27",
              "y": "77"
            },
            {
              "index": 117,
              "timeLabel": "2011-03-28",
              "y": "44"
            },
            {
              "index": 118,
              "timeLabel": "2011-03-29",
              "y": "185"
            },
            {
              "index": 119,
              "timeLabel": "2011-03-30",
              "y": "68"
            },
            {
              "index": 120,
              "timeLabel": "2011-03-31",
              "y": "75"
            },
            {
              "index": 121,
              "timeLabel": "2011-04-01",
              "y": "133"
            },
            {
              "index": 122,
              "timeLabel": "2011-04-02",
              "y": null
            },
            {
              "index": 123,
              "timeLabel": "2011-04-03",
              "y": "77"
            },
            {
              "index": 124,
              "timeLabel": "2011-04-04",
              "y": "66"
            },
            {
              "index": 125,
              "timeLabel": "2011-04-05",
              "y": "51"
            },
            {
              "index": 126,
              "timeLabel": "2011-04-06",
              "y": "65"
            },
            {
              "index": 127,
              "timeLabel": "2011-04-07",
              "y": "50"
            },
            {
              "index": 128,
              "timeLabel": "2011-04-08",
              "y": "68"
            },
            {
              "index": 129,
              "timeLabel": "2011-04-09",
              "y": null
            },
            {
              "index": 130,
              "timeLabel": "2011-04-10",
              "y": "74"
            },
            {
              "index": 131,
              "timeLabel": "2011-04-11",
              "y": "45"
            },
            {
              "index": 132,
              "timeLabel": "2011-04-12",
              "y": "198"
            },
            {
              "index": 133,
              "timeLabel": "2011-04-13",
              "y": "73"
            },
            {
              "index": 134,
              "timeLabel": "2011-04-14",
              "y": "127"
            },
            {
              "index": 135,
              "timeLabel": "2011-04-15",
              "y": "8"
            },
            {
              "index": 136,
              "timeLabel": "2011-04-16",
              "y": null
            },
            {
              "index": 137,
              "timeLabel": "2011-04-17",
              "y": "23"
            },
            {
              "index": 138,
              "timeLabel": "2011-04-18",
              "y": "2102"
            },
            {
              "index": 139,
              "timeLabel": "2011-04-19",
              "y": "110"
            },
            {
              "index": 140,
              "timeLabel": "2011-04-20",
              "y": "73"
            },
            {
              "index": 141,
              "timeLabel": "2011-04-21",
              "y": "137"
            },
            {
              "index": 142,
              "timeLabel": "2011-04-22",
              "y": null
            },
            {
              "index": 143,
              "timeLabel": "2011-04-23",
              "y": null
            },
            {
              "index": 144,
              "timeLabel": "2011-04-24",
              "y": null
            },
            {
              "index": 145,
              "timeLabel": "2011-04-25",
              "y": null
            },
            {
              "index": 146,
              "timeLabel": "2011-04-26",
              "y": "179"
            },
            {
              "index": 147,
              "timeLabel": "2011-04-27",
              "y": "73"
            },
            {
              "index": 148,
              "timeLabel": "2011-04-28",
              "y": "111"
            },
            {
              "index": 149,
              "timeLabel": "2011-04-29",
              "y": null
            },
            {
              "index": 150,
              "timeLabel": "2011-04-30",
              "y": null
            },
            {
              "index": 151,
              "timeLabel": "2011-05-01",
              "y": "12"
            },
            {
              "index": 152,
              "timeLabel": "2011-05-02",
              "y": null
            },
            {
              "index": 153,
              "timeLabel": "2011-05-03",
              "y": "317"
            },
            {
              "index": 154,
              "timeLabel": "2011-05-04",
              "y": "85"
            },
            {
              "index": 155,
              "timeLabel": "2011-05-05",
              "y": "421"
            },
            {
              "index": 156,
              "timeLabel": "2011-05-06",
              "y": "179"
            },
            {
              "index": 157,
              "timeLabel": "2011-05-07",
              "y": null
            },
            {
              "index": 158,
              "timeLabel": "2011-05-08",
              "y": "142"
            },
            {
              "index": 159,
              "timeLabel": "2011-05-09",
              "y": "216"
            },
            {
              "index": 160,
              "timeLabel": "2011-05-10",
              "y": "142"
            },
            {
              "index": 161,
              "timeLabel": "2011-05-11",
              "y": "120"
            },
            {
              "index": 162,
              "timeLabel": "2011-05-12",
              "y": "227"
            },
            {
              "index": 163,
              "timeLabel": "2011-05-13",
              "y": "25"
            },
            {
              "index": 164,
              "timeLabel": "2011-05-14",
              "y": null
            },
            {
              "index": 165,
              "timeLabel": "2011-05-15",
              "y": "143"
            },
            {
              "index": 166,
              "timeLabel": "2011-05-16",
              "y": "201"
            },
            {
              "index": 167,
              "timeLabel": "2011-05-17",
              "y": "156"
            },
            {
              "index": 168,
              "timeLabel": "2011-05-18",
              "y": "73"
            },
            {
              "index": 169,
              "timeLabel": "2011-05-19",
              "y": "108"
            },
            {
              "index": 170,
              "timeLabel": "2011-05-20",
              "y": "92"
            },
            {
              "index": 171,
              "timeLabel": "2011-05-21",
              "y": null
            },
            {
              "index": 172,
              "timeLabel": "2011-05-22",
              "y": "153"
            },
            {
              "index": 173,
              "timeLabel": "2011-05-23",
              "y": "113"
            },
            {
              "index": 174,
              "timeLabel": "2011-05-24",
              "y": "144"
            },
            {
              "index": 175,
              "timeLabel": "2011-05-25",
              "y": "68"
            },
            {
              "index": 176,
              "timeLabel": "2011-05-26",
              "y": "653"
            },
            {
              "index": 177,
              "timeLabel": "2011-05-27",
              "y": "22"
            },
            {
              "index": 178,
              "timeLabel": "2011-05-28",
              "y": null
            },
            {
              "index": 179,
              "timeLabel": "2011-05-29",
              "y": "26"
            },
            {
              "index": 180,
              "timeLabel": "2011-05-30",
              "y": null
            },
            {
              "index": 181,
              "timeLabel": "2011-05-31",
              "y": "168"
            },
            {
              "index": 182,
              "timeLabel": "2011-06-01",
              "y": "29"
            },
            {
              "index": 183,
              "timeLabel": "2011-06-02",
              "y": "353"
            },
            {
              "index": 184,
              "timeLabel": "2011-06-03",
              "y": "29"
            },
            {
              "index": 185,
              "timeLabel": "2011-06-04",
              "y": null
            },
            {
              "index": 186,
              "timeLabel": "2011-06-05",
              "y": "49"
            },
            {
              "index": 187,
              "timeLabel": "2011-06-06",
              "y": "108"
            },
            {
              "index": 188,
              "timeLabel": "2011-06-07",
              "y": "56"
            },
            {
              "index": 189,
              "timeLabel": "2011-06-08",
              "y": "109"
            },
            {
              "index": 190,
              "timeLabel": "2011-06-09",
              "y": "4015"
            },
            {
              "index": 191,
              "timeLabel": "2011-06-10",
              "y": "68"
            },
            {
              "index": 192,
              "timeLabel": "2011-06-11",
              "y": null
            },
            {
              "index": 193,
              "timeLabel": "2011-06-12",
              "y": "33"
            },
            {
              "index": 194,
              "timeLabel": "2011-06-13",
              "y": "17"
            },
            {
              "index": 195,
              "timeLabel": "2011-06-14",
              "y": "50"
            },
            {
              "index": 196,
              "timeLabel": "2011-06-15",
              "y": "118"
            },
            {
              "index": 197,
              "timeLabel": "2011-06-16",
              "y": "42"
            },
            {
              "index": 198,
              "timeLabel": "2011-06-17",
              "y": "15"
            },
            {
              "index": 199,
              "timeLabel": "2011-06-18",
              "y": null
            },
            {
              "index": 200,
              "timeLabel": "2011-06-19",
              "y": "147"
            },
            {
              "index": 201,
              "timeLabel": "2011-06-20",
              "y": "29"
            },
            {
              "index": 202,
              "timeLabel": "2011-06-21",
              "y": "13"
            },
            {
              "index": 203,
              "timeLabel": "2011-06-22",
              "y": "18"
            },
            {
              "index": 204,
              "timeLabel": "2011-06-23",
              "y": "106"
            },
            {
              "index": 205,
              "timeLabel": "2011-06-24",
              "y": "38"
            },
            {
              "index": 206,
              "timeLabel": "2011-06-25",
              "y": null
            },
            {
              "index": 207,
              "timeLabel": "2011-06-26",
              "y": "32"
            },
            {
              "index": 208,
              "timeLabel": "2011-06-27",
              "y": "66"
            },
            {
              "index": 209,
              "timeLabel": "2011-06-28",
              "y": "13"
            },
            {
              "index": 210,
              "timeLabel": "2011-06-29",
              "y": "77"
            },
            {
              "index": 211,
              "timeLabel": "2011-06-30",
              "y": "46"
            },
            {
              "index": 212,
              "timeLabel": "2011-07-01",
              "y": "39"
            },
            {
              "index": 213,
              "timeLabel": "2011-07-02",
              "y": null
            },
            {
              "index": 214,
              "timeLabel": "2011-07-03",
              "y": "18"
            },
            {
              "index": 215,
              "timeLabel": "2011-07-04",
              "y": "8"
            },
            {
              "index": 216,
              "timeLabel": "2011-07-05",
              "y": "134"
            },
            {
              "index": 217,
              "timeLabel": "2011-07-06",
              "y": "5"
            },
            {
              "index": 218,
              "timeLabel": "2011-07-07",
              "y": "59"
            },
            {
              "index": 219,
              "timeLabel": "2011-07-08",
              "y": "32"
            },
            {
              "index": 220,
              "timeLabel": "2011-07-09",
              "y": null
            },
            {
              "index": 221,
              "timeLabel": "2011-07-10",
              "y": "20"
            },
            {
              "index": 222,
              "timeLabel": "2011-07-11",
              "y": "81"
            },
            {
              "index": 223,
              "timeLabel": "2011-07-12",
              "y": "786"
            },
            {
              "index": 224,
              "timeLabel": "2011-07-13",
              "y": "58"
            },
            {
              "index": 225,
              "timeLabel": "2011-07-14",
              "y": "224"
            },
            {
              "index": 226,
              "timeLabel": "2011-07-15",
              "y": "23"
            },
            {
              "index": 227,
              "timeLabel": "2011-07-16",
              "y": null
            },
            {
              "index": 228,
              "timeLabel": "2011-07-17",
              "y": "23"
            },
            {
              "index": 229,
              "timeLabel": "2011-07-18",
              "y": "114"
            },
            {
              "index": 230,
              "timeLabel": "2011-07-19",
              "y": "157"
            },
            {
              "index": 231,
              "timeLabel": "2011-07-20",
              "y": "104"
            },
            {
              "index": 232,
              "timeLabel": "2011-07-21",
              "y": "52"
            },
            {
              "index": 233,
              "timeLabel": "2011-07-22",
              "y": "132"
            },
            {
              "index": 234,
              "timeLabel": "2011-07-23",
              "y": null
            },
            {
              "index": 235,
              "timeLabel": "2011-07-24",
              "y": "160"
            },
            {
              "index": 236,
              "timeLabel": "2011-07-25",
              "y": "43"
            },
            {
              "index": 237,
              "timeLabel": "2011-07-26",
              "y": "8"
            },
            {
              "index": 238,
              "timeLabel": "2011-07-27",
              "y": "58"
            },
            {
              "index": 239,
              "timeLabel": "2011-07-28",
              "y": "490"
            },
            {
              "index": 240,
              "timeLabel": "2011-07-29",
              "y": "74"
            },
            {
              "index": 241,
              "timeLabel": "2011-07-30",
              "y": null
            },
            {
              "index": 242,
              "timeLabel": "2011-07-31",
              "y": "107"
            },
            {
              "index": 243,
              "timeLabel": "2011-08-01",
              "y": "61"
            },
            {
              "index": 244,
              "timeLabel": "2011-08-02",
              "y": "32"
            },
            {
              "index": 245,
              "timeLabel": "2011-08-03",
              "y": "91"
            },
            {
              "index": 246,
              "timeLabel": "2011-08-04",
              "y": "130"
            },
            {
              "index": 247,
              "timeLabel": "2011-08-05",
              "y": "38"
            },
            {
              "index": 248,
              "timeLabel": "2011-08-06",
              "y": null
            },
            {
              "index": 249,
              "timeLabel": "2011-08-07",
              "y": "89"
            },
            {
              "index": 250,
              "timeLabel": "2011-08-08",
              "y": "73"
            },
            {
              "index": 251,
              "timeLabel": "2011-08-09",
              "y": "121"
            },
            {
              "index": 252,
              "timeLabel": "2011-08-10",
              "y": "132"
            },
            {
              "index": 253,
              "timeLabel": "2011-08-11",
              "y": "60"
            },
            {
              "index": 254,
              "timeLabel": "2011-08-12",
              "y": "28"
            },
            {
              "index": 255,
              "timeLabel": "2011-08-13",
              "y": null
            },
            {
              "index": 256,
              "timeLabel": "2011-08-14",
              "y": "52"
            },
            {
              "index": 257,
              "timeLabel": "2011-08-15",
              "y": "104"
            },
            {
              "index": 258,
              "timeLabel": "2011-08-16",
              "y": "87"
            },
            {
              "index": 259,
              "timeLabel": "2011-08-17",
              "y": "69"
            },
            {
              "index": 260,
              "timeLabel": "2011-08-18",
              "y": "15"
            },
            {
              "index": 261,
              "timeLabel": "2011-08-19",
              "y": "6"
            },
            {
              "index": 262,
              "timeLabel": "2011-08-20",
              "y": null
            },
            {
              "index": 263,
              "timeLabel": "2011-08-21",
              "y": "15"
            },
            {
              "index": 264,
              "timeLabel": "2011-08-22",
              "y": "420"
            },
            {
              "index": 265,
              "timeLabel": "2011-08-23",
              "y": "122"
            },
            {
              "index": 266,
              "timeLabel": "2011-08-24",
              "y": "58"
            },
            {
              "index": 267,
              "timeLabel": "2011-08-25",
              "y": "107"
            },
            {
              "index": 268,
              "timeLabel": "2011-08-26",
              "y": "24"
            },
            {
              "index": 269,
              "timeLabel": "2011-08-27",
              "y": null
            },
            {
              "index": 270,
              "timeLabel": "2011-08-28",
              "y": "42"
            },
            {
              "index": 271,
              "timeLabel": "2011-08-29",
              "y": null
            },
            {
              "index": 272,
              "timeLabel": "2011-08-30",
              "y": "63"
            },
            {
              "index": 273,
              "timeLabel": "2011-08-31",
              "y": "37"
            },
            {
              "index": 274,
              "timeLabel": "2011-09-01",
              "y": "112"
            },
            {
              "index": 275,
              "timeLabel": "2011-09-02",
              "y": "166"
            },
            {
              "index": 276,
              "timeLabel": "2011-09-03",
              "y": null
            },
            {
              "index": 277,
              "timeLabel": "2011-09-04",
              "y": "16"
            },
            {
              "index": 278,
              "timeLabel": "2011-09-05",
              "y": "95"
            },
            {
              "index": 279,
              "timeLabel": "2011-09-06",
              "y": "184"
            },
            {
              "index": 280,
              "timeLabel": "2011-09-07",
              "y": "16"
            },
            {
              "index": 281,
              "timeLabel": "2011-09-08",
              "y": "27"
            },
            {
              "index": 282,
              "timeLabel": "2011-09-09",
              "y": "29"
            },
            {
              "index": 283,
              "timeLabel": "2011-09-10",
              "y": null
            },
            {
              "index": 284,
              "timeLabel": "2011-09-11",
              "y": "89"
            },
            {
              "index": 285,
              "timeLabel": "2011-09-12",
              "y": "117"
            },
            {
              "index": 286,
              "timeLabel": "2011-09-13",
              "y": "131"
            },
            {
              "index": 287,
              "timeLabel": "2011-09-14",
              "y": "85"
            },
            {
              "index": 288,
              "timeLabel": "2011-09-15",
              "y": "144"
            },
            {
              "index": 289,
              "timeLabel": "2011-09-16",
              "y": "100"
            },
            {
              "index": 290,
              "timeLabel": "2011-09-17",
              "y": null
            },
            {
              "index": 291,
              "timeLabel": "2011-09-18",
              "y": "81"
            },
            {
              "index": 292,
              "timeLabel": "2011-09-19",
              "y": "42"
            },
            {
              "index": 293,
              "timeLabel": "2011-09-20",
              "y": "398"
            },
            {
              "index": 294,
              "timeLabel": "2011-09-21",
              "y": "11"
            },
            {
              "index": 295,
              "timeLabel": "2011-09-22",
              "y": "58"
            },
            {
              "index": 296,
              "timeLabel": "2011-09-23",
              "y": "127"
            },
            {
              "index": 297,
              "timeLabel": "2011-09-24",
              "y": null
            },
            {
              "index": 298,
              "timeLabel": "2011-09-25",
              "y": "69"
            },
            {
              "index": 299,
              "timeLabel": "2011-09-26",
              "y": "48"
            },
            {
              "index": 300,
              "timeLabel": "2011-09-27",
              "y": "17"
            },
            {
              "index": 301,
              "timeLabel": "2011-09-28",
              "y": "125"
            },
            {
              "index": 302,
              "timeLabel": "2011-09-29",
              "y": "80"
            },
            {
              "index": 303,
              "timeLabel": "2011-09-30",
              "y": "111"
            },
            {
              "index": 304,
              "timeLabel": "2011-10-01",
              "y": null
            },
            {
              "index": 305,
              "timeLabel": "2011-10-02",
              "y": "21"
            },
            {
              "index": 306,
              "timeLabel": "2011-10-03",
              "y": "23"
            },
            {
              "index": 307,
              "timeLabel": "2011-10-04",
              "y": "20"
            },
            {
              "index": 308,
              "timeLabel": "2011-10-05",
              "y": "49"
            },
            {
              "index": 309,
              "timeLabel": "2011-10-06",
              "y": "13"
            },
            {
              "index": 310,
              "timeLabel": "2011-10-07",
              "y": "34"
            },
            {
              "index": 311,
              "timeLabel": "2011-10-08",
              "y": null
            },
            {
              "index": 312,
              "timeLabel": "2011-10-09",
              "y": "26"
            },
            {
              "index": 313,
              "timeLabel": "2011-10-10",
              "y": "123"
            },
            {
              "index": 314,
              "timeLabel": "2011-10-11",
              "y": "46"
            },
            {
              "index": 315,
              "timeLabel": "2011-10-12",
              "y": "25"
            },
            {
              "index": 316,
              "timeLabel": "2011-10-13",
              "y": "243"
            },
            {
              "index": 317,
              "timeLabel": "2011-10-14",
              "y": "187"
            },
            {
              "index": 318,
              "timeLabel": "2011-10-15",
              "y": null
            },
            {
              "index": 319,
              "timeLabel": "2011-10-16",
              "y": "55"
            },
            {
              "index": 320,
              "timeLabel": "2011-10-17",
              "y": "69"
            },
            {
              "index": 321,
              "timeLabel": "2011-10-18",
              "y": "21"
            },
            {
              "index": 322,
              "timeLabel": "2011-10-19",
              "y": "39"
            },
            {
              "index": 323,
              "timeLabel": "2011-10-20",
              "y": "26"
            },
            {
              "index": 324,
              "timeLabel": "2011-10-21",
              "y": "13"
            },
            {
              "index": 325,
              "timeLabel": "2011-10-22",
              "y": null
            },
            {
              "index": 326,
              "timeLabel": "2011-10-23",
              "y": "63"
            },
            {
              "index": 327,
              "timeLabel": "2011-10-24",
              "y": "76"
            },
            {
              "index": 328,
              "timeLabel": "2011-10-25",
              "y": "16"
            },
            {
              "index": 329,
              "timeLabel": "2011-10-26",
              "y": "17"
            },
            {
              "index": 330,
              "timeLabel": "2011-10-27",
              "y": "117"
            },
            {
              "index": 331,
              "timeLabel": "2011-10-28",
              "y": "90"
            },
            {
              "index": 332,
              "timeLabel": "2011-10-29",
              "y": null
            },
            {
              "index": 333,
              "timeLabel": "2011-10-30",
              "y": "128"
            },
            {
              "index": 334,
              "timeLabel": "2011-10-31",
              "y": "149"
            },
            {
              "index": 335,
              "timeLabel": "2011-11-01",
              "y": "39"
            },
            {
              "index": 336,
              "timeLabel": "2011-11-02",
              "y": "80"
            },
            {
              "index": 337,
              "timeLabel": "2011-11-03",
              "y": "1265"
            },
            {
              "index": 338,
              "timeLabel": "2011-11-04",
              "y": "85"
            },
            {
              "index": 339,
              "timeLabel": "2011-11-05",
              "y": null
            },
            {
              "index": 340,
              "timeLabel": "2011-11-06",
              "y": "86"
            },
            {
              "index": 341,
              "timeLabel": "2011-11-07",
              "y": "95"
            },
            {
              "index": 342,
              "timeLabel": "2011-11-08",
              "y": "97"
            },
            {
              "index": 343,
              "timeLabel": "2011-11-09",
              "y": "113"
            },
            {
              "index": 344,
              "timeLabel": "2011-11-10",
              "y": "71"
            },
            {
              "index": 345,
              "timeLabel": "2011-11-11",
              "y": "134"
            },
            {
              "index": 346,
              "timeLabel": "2011-11-12",
              "y": null
            },
            {
              "index": 347,
              "timeLabel": "2011-11-13",
              "y": "65"
            },
            {
              "index": 348,
              "timeLabel": "2011-11-14",
              "y": "380"
            },
            {
              "index": 349,
              "timeLabel": "2011-11-15",
              "y": "457"
            },
            {
              "index": 350,
              "timeLabel": "2011-11-16",
              "y": "157"
            },
            {
              "index": 351,
              "timeLabel": "2011-11-17",
              "y": "102"
            },
            {
              "index": 352,
              "timeLabel": "2011-11-18",
              "y": "125"
            },
            {
              "index": 353,
              "timeLabel": "2011-11-19",
              "y": null
            },
            {
              "index": 354,
              "timeLabel": "2011-11-20",
              "y": "101"
            },
            {
              "index": 355,
              "timeLabel": "2011-11-21",
              "y": "36"
            },
            {
              "index": 356,
              "timeLabel": "2011-11-22",
              "y": "253"
            },
            {
              "index": 357,
              "timeLabel": "2011-11-23",
              "y": "248"
            },
            {
              "index": 358,
              "timeLabel": "2011-11-24",
              "y": "131"
            },
            {
              "index": 359,
              "timeLabel": "2011-11-25",
              "y": "222"
            },
            {
              "index": 360,
              "timeLabel": "2011-11-26",
              "y": null
            },
            {
              "index": 361,
              "timeLabel": "2011-11-27",
              "y": "8"
            },
            {
              "index": 362,
              "timeLabel": "2011-11-28",
              "y": "133"
            },
            {
              "index": 363,
              "timeLabel": "2011-11-29",
              "y": "116"
            },
            {
              "index": 364,
              "timeLabel": "2011-11-30",
              "y": "311"
            },
            {
              "index": 365,
              "timeLabel": "2011-12-01",
              "y": "41"
            },
            {
              "index": 366,
              "timeLabel": "2011-12-02",
              "y": "117"
            },
            {
              "index": 367,
              "timeLabel": "2011-12-03",
              "y": null
            },
            {
              "index": 368,
              "timeLabel": "2011-12-04",
              "y": "8"
            },
            {
              "index": 369,
              "timeLabel": "2011-12-05",
              "y": "298"
            },
            {
              "index": 370,
              "timeLabel": "2011-12-06",
              "y": "39"
            },
            {
              "index": 371,
              "timeLabel": "2011-12-07",
              "y": "200"
            },
            {
              "index": 372,
              "timeLabel": "2011-12-08",
              "y": "108"
            },
            {
              "index": 373,
              "timeLabel": "2011-12-09",
              "y": null
            }
          ],
          "result": {
            "metrics": {
              "origin": "335",
              "trainingCalendar": "335",
              "trainingObserved": "270",
              "horizon": "39",
              "forecastDefined": "4",
              "scorePairs": "4",
              "MAE": "14167497529396982718525740818110958618899785388842882410141834112210485155622851567/43175474782611598032908016067033136502665976070120844989275624355480904379605000",
              "MSE": "142265631473850400244211904013698412143668559077166441404838859005509579963504129857825807973560670765160767855520954431317579330468967037497653363943187491635343699/466030405675982504604363939952384241990626309268865521483085613112400267743526202671352701825891461511623779191614666212240275010702968895468317484989006250000",
              "fitRows": "219",
              "rank": "7",
              "parameters": "9",
              "df": "212",
              "RSS": "2863217608077465695407541971/96397723847726903810",
              "residualVariance": "2863217608077465695407541971/20436317455718103607720",
              "coefficient:intercept": "14740855714638254378651/96397723847726903810",
              "coefficient:ARlag1": "-1107908002102860359/48198861923863451905",
              "coefficient:time-from-trendOrigin": "-118506281948131721309/337392033467044163335",
              "coefficient:season-phase1": "90274817539355754949457/674784066934088326670",
              "coefficient:season-phase2": "-1642873691228811702383/134956813386817665334",
              "coefficient:season-phase3": null,
              "coefficient:season-phase4": null,
              "coefficient:season-phase5": "2474358271734733714019/51906466687237563590",
              "coefficient:season-phase6": "72338717291204204284533/674784066934088326670"
            },
            "rows": [
              {
                "index": 335,
                "horizon": 1,
                "forecast": "6701028735431226067799/48198861923863451905",
                "actual": "39",
                "error": "-4821273120400551443504/48198861923863451905"
              },
              {
                "index": 336,
                "horizon": 2,
                "forecast": "147304902122902254856548318749940096530553/4646260581511308112444476351644496258050",
                "actual": "80",
                "error": "224395944398002394139009789381619604113447/4646260581511308112444476351644496258050"
              },
              {
                "index": 337,
                "horizon": 3,
                "forecast": "37533761530430159518615468608783373182741499294796186358156573/223944472230553048925053420445684006437197017406928644085250",
                "actual": "1265",
                "error": "245755995841219447371577108255006894960312727724968548409684677/223944472230553048925053420445684006437197017406928644085250"
              },
              {
                "index": 338,
                "horizon": 4,
                "forecast": "196139100227184620286954710290981953588341102511965375413150779510005216976929543/10793868695652899508227004016758284125666494017530211247318906088870226094901250",
                "actual": "85",
                "error": "721339738903311837912340631133472197093310888978102580608956238043964001089676707/10793868695652899508227004016758284125666494017530211247318906088870226094901250"
              },
              {
                "index": 339,
                "horizon": 5,
                "forecast": null,
                "actual": null,
                "error": null
              },
              {
                "index": 340,
                "horizon": 6,
                "forecast": null,
                "actual": "86",
                "error": null
              },
              {
                "index": 341,
                "horizon": 7,
                "forecast": null,
                "actual": "95",
                "error": null
              },
              {
                "index": 342,
                "horizon": 8,
                "forecast": null,
                "actual": "97",
                "error": null
              },
              {
                "index": 343,
                "horizon": 9,
                "forecast": null,
                "actual": "113",
                "error": null
              },
              {
                "index": 344,
                "horizon": 10,
                "forecast": null,
                "actual": "71",
                "error": null
              },
              {
                "index": 345,
                "horizon": 11,
                "forecast": null,
                "actual": "134",
                "error": null
              },
              {
                "index": 346,
                "horizon": 12,
                "forecast": null,
                "actual": null,
                "error": null
              },
              {
                "index": 347,
                "horizon": 13,
                "forecast": null,
                "actual": "65",
                "error": null
              },
              {
                "index": 348,
                "horizon": 14,
                "forecast": null,
                "actual": "380",
                "error": null
              },
              {
                "index": 349,
                "horizon": 15,
                "forecast": null,
                "actual": "457",
                "error": null
              },
              {
                "index": 350,
                "horizon": 16,
                "forecast": null,
                "actual": "157",
                "error": null
              },
              {
                "index": 351,
                "horizon": 17,
                "forecast": null,
                "actual": "102",
                "error": null
              },
              {
                "index": 352,
                "horizon": 18,
                "forecast": null,
                "actual": "125",
                "error": null
              },
              {
                "index": 353,
                "horizon": 19,
                "forecast": null,
                "actual": null,
                "error": null
              },
              {
                "index": 354,
                "horizon": 20,
                "forecast": null,
                "actual": "101",
                "error": null
              },
              {
                "index": 355,
                "horizon": 21,
                "forecast": null,
                "actual": "36",
                "error": null
              },
              {
                "index": 356,
                "horizon": 22,
                "forecast": null,
                "actual": "253",
                "error": null
              },
              {
                "index": 357,
                "horizon": 23,
                "forecast": null,
                "actual": "248",
                "error": null
              },
              {
                "index": 358,
                "horizon": 24,
                "forecast": null,
                "actual": "131",
                "error": null
              },
              {
                "index": 359,
                "horizon": 25,
                "forecast": null,
                "actual": "222",
                "error": null
              },
              {
                "index": 360,
                "horizon": 26,
                "forecast": null,
                "actual": null,
                "error": null
              },
              {
                "index": 361,
                "horizon": 27,
                "forecast": null,
                "actual": "8",
                "error": null
              },
              {
                "index": 362,
                "horizon": 28,
                "forecast": null,
                "actual": "133",
                "error": null
              },
              {
                "index": 363,
                "horizon": 29,
                "forecast": null,
                "actual": "116",
                "error": null
              },
              {
                "index": 364,
                "horizon": 30,
                "forecast": null,
                "actual": "311",
                "error": null
              },
              {
                "index": 365,
                "horizon": 31,
                "forecast": null,
                "actual": "41",
                "error": null
              },
              {
                "index": 366,
                "horizon": 32,
                "forecast": null,
                "actual": "117",
                "error": null
              },
              {
                "index": 367,
                "horizon": 33,
                "forecast": null,
                "actual": null,
                "error": null
              },
              {
                "index": 368,
                "horizon": 34,
                "forecast": null,
                "actual": "8",
                "error": null
              },
              {
                "index": 369,
                "horizon": 35,
                "forecast": null,
                "actual": "298",
                "error": null
              },
              {
                "index": 370,
                "horizon": 36,
                "forecast": null,
                "actual": "39",
                "error": null
              },
              {
                "index": 371,
                "horizon": 37,
                "forecast": null,
                "actual": "200",
                "error": null
              },
              {
                "index": 372,
                "horizon": 38,
                "forecast": null,
                "actual": "108",
                "error": null
              },
              {
                "index": 373,
                "horizon": 39,
                "forecast": null,
                "actual": null,
                "error": null
              }
            ],
            "fit": {
              "part": [
                "14740855714638254378651/96397723847726903810",
                "-1107908002102860359/48198861923863451905",
                "-118506281948131721309/337392033467044163335",
                "90274817539355754949457/674784066934088326670",
                "-1642873691228811702383/134956813386817665334",
                "0",
                "0",
                "2474358271734733714019/51906466687237563590",
                "72338717291204204284533/674784066934088326670"
              ],
              "basis": [
                [
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0",
                  "0"
                ]
              ],
              "rank": 7,
              "fitted": [
                "6407484742959587238598/48198861923863451905",
                "9364033123836348057469/48198861923863451905",
                "12257529090968182645014/48198861923863451905",
                "2754081610669979475675/19279544769545380762",
                "13515899251014855804296/48198861923863451905",
                "98696614973095101511/741520952674822337",
                "9418360490216262552164/48198861923863451905",
                "11944031000649947500521/48198861923863451905",
                "2771380925213533832117/19279544769545380762",
                "13440601381148735636988/48198861923863451905",
                "5637568430051847963301/48198861923863451905",
                "1859970841653626166171/9639772384772690381",
                "2420943507046347317936/9639772384772690381",
                "13938969566777029501359/96397723847726903810",
                "13418483095383552766912/48198861923863451905",
                "2681466644575030775491/19279544769545380762",
                "990181861453891637241/3707604763374111685",
                "1193568927501824672319/9639772384772690381",
                "8883400422308078347183/48198861923863451905",
                "182001168823705388184/741520952674822337",
                "6418729294164059407091/96397723847726903810",
                "12998705585417191702163/48198861923863451905",
                "6029927359903757878803/48198861923863451905",
                "1769375866503111658488/9639772384772690381",
                "11481124827155323555979/48198861923863451905",
                "13041883079288707307401/96397723847726903810",
                "12671912599073722233362/48198861923863451905",
                "5873752205884128905288/48198861923863451905",
                "1740356651703391584503/9639772384772690381",
                "11594171317646689649701/48198861923863451905",
                "12640900131081220531651/96397723847726903810",
                "2530180444262128444729/9639772384772690381",
                "5730871947889734256081/48198861923863451905",
                "653775074493000677994/3707604763374111685",
                "2291144538332141288386/9639772384772690381",
                "12175658518751767855079/96397723847726903810",
                "2497837505456099789667/9639772384772690381",
                "5613473573943705395131/48198861923863451905",
                "1695613118129185760841/9639772384772690381",
                "11292900089628460306261/48198861923863451905",
                "12031710227032144682617/96397723847726903810",
                "12601126109769762181698/48198861923863451905",
                "1098328713597853018549/9639772384772690381",
                "8391688640758780033307/48198861923863451905",
                "11177717531686637166029/48198861923863451905",
                "12107127719728887861237/96397723847726903810",
                "12273225215424189852538/48198861923863451905",
                "1078172762814955827436/9639772384772690381",
                "1649761676552877076820/9639772384772690381",
                "11106851293828928440157/48198861923863451905",
                "11683986611479343878307/96397723847726903810",
                "12251106929659006982462/48198861923863451905",
                "1043614008004721451656/9639772384772690381",
                "1626282001763671304630/9639772384772690381",
                "10972834299851356673822/48198861923863451905",
                "11469132207625137642869/96397723847726903810",
                "2444911402377082534190/9639772384772690381",
                "392529806313983393696/3707604763374111685",
                "1586183706942922627055/9639772384772690381",
                "10866515005926356416462/48198861923863451905",
                "11101386499480736677889/96397723847726903810",
                "12034036709800595026306/48198861923863451905",
                "1005517922443132790148/9639772384772690381",
                "7920987236972561729148/48198861923863451905",
                "827366467691764978282/3707604763374111685",
                "10933064231714850577529/96397723847726903810",
                "2373578076752408061912/9639772384772690381",
                "4875846090204446418661/48198861923863451905",
                "7753733002931904152043/48198861923863451905",
                "10616207546004858649536/48198861923863451905",
                "10762526147944758756451/96397723847726903810",
                "11813642765935874489073/48198861923863451905",
                "4796116588329914809917/48198861923863451905",
                "7601989480920686619964/48198861923863451905",
                "10491053816044109766073/48198861923863451905",
                "2060343233524743504263/19279544769545380762",
                "11711755104019285673149/48198861923863451905",
                "4652128422333417300351/48198861923863451905",
                "1496696639794510979731/9639772384772690381",
                "10348173558049715116866/48198861923863451905",
                "10361622948291020654909/96397723847726903810",
                "11596572546077462532917/48198861923863451905",
                "4561319840437857088017/48198861923863451905",
                "7368300641030731758423/48198861923863451905",
                "10252933344145743463096/48198861923863451905",
                "1959777086355303253349/19279544769545380762",
                "11469203000112507928736/48198861923863451905",
                "871500928465561023813/9639772384772690381",
                "7306297667189845915423/48198861923863451905",
                "7855460301872027983324/48198861923863451905",
                "9756864676250356247311/96397723847726903810",
                "873130516781875092879/3707604763374111685",
                "9366960808063898075151/96397723847726903810",
                "11232190436216244486118/48198861923863451905",
                "8824165635587245173449/96397723847726903810",
                "11100389258242878440501/48198861923863451905",
                "3676260843865169009592/48198861923863451905",
                "1363787553819042073755/9639772384772690381",
                "9589455947993627456471/48198861923863451905",
                "8974920872426982856481/96397723847726903810",
                "10943106196221146606627/48198861923863451905",
                "3772688714324992197929/48198861923863451905",
                "6699323579144975787107/48198861923863451905",
                "9487568286077038640547/48198861923863451905",
                "8706886884471839323811/96397723847726903810",
                "10876671590371849322191/48198861923863451905",
                "3786023484627100859341/48198861923863451905",
                "6569738217175815462208/48198861923863451905",
                "1893311581662791726166/9639772384772690381",
                "8496464112626044529809/96397723847726903810",
                "10763704848434231902677/48198861923863451905",
                "3063707341532910242377/48198861923863451905",
                "8206271964628843789959/96397723847726903810",
                "10688406978568111735369/48198861923863451905",
                "3277573460215636628768/48198861923863451905",
                "6447948085498249496926/48198861923863451905",
                "9235084884428209490007/48198861923863451905",
                "8217430793203621067757/96397723847726903810",
                "2096253611290350237068/9639772384772690381",
                "-898091925433169727199/48198861923863451905",
                "6347168331583763541361/48198861923863451905",
                "9217398230671438061367/48198861923863451905",
                "7993713125332591949447/96397723847726903810",
                "2070558120496938744160/9639772384772690381",
                "3385120284973362757799/48198861923863451905",
                "6102360537395905739126/48198861923863451905",
                "1817119410539614403150/9639772384772690381",
                "1567737150718388034679/19279544769545380762",
                "10345075120746848035391/48198861923863451905",
                "3195707890890647973514/48198861923863451905",
                "6111263675689602959102/48198861923863451905",
                "8926098174672134461158/48198861923863451905",
                "7601673189695676730777/96397723847726903810",
                "10161202266674647552901/48198861923863451905",
                "628735217813737574749/9639772384772690381",
                "6008268105770911282819/48198861923863451905",
                "8871850556845968640671/48198861923863451905",
                "7096546889290521081281/96397723847726903810",
                "155730236321198796576/741520952674822337",
                "3010767003093218967769/48198861923863451905",
                "5887546007818573840792/48198861923863451905",
                "1734493398148865622631/9639772384772690381",
                "5414822290652127730527/96397723847726903810",
                "9945239954818338457104/48198861923863451905",
                "541891180159623057445/9639772384772690381",
                "5765716001864133538406/48198861923863451905",
                "8517399744726801999999/48198861923863451905",
                "6571557993401262619531/96397723847726903810",
                "9775769904773475159281/48198861923863451905",
                "2781509795211675547664/48198861923863451905",
                "5495426323627909947914/48198861923863451905",
                "8477554930927973364179/48198861923863451905",
                "1332940402826330312779/19279544769545380762",
                "9708227390922075014486/48198861923863451905",
                "2177739808342490989113/48198861923863451905",
                "5435639165791229825632/48198861923863451905",
                "8339106304941990156408/48198861923863451905",
                "1274901973226890164809/19279544769545380762",
                "1910632028980909780266/9639772384772690381",
                "2458080407151388997044/48198861923863451905",
                "1067415045576189918157/9639772384772690381",
                "8207305126968624110791/48198861923863451905",
                "1188057935572775647505/19279544769545380762",
                "9389229634870199905302/48198861923863451905",
                "483425537070091500173/9639772384772690381",
                "5259561542010623702759/48198861923863451905",
                "619573361304254132181/3707604763374111685",
                "5778614858110609299319/96397723847726903810",
                "1868104311410909677322/9639772384772690381",
                "180652097192073422747/3707604763374111685",
                "5182047856140297814733/48198861923863451905",
                "1517169697268533624720/9639772384772690381",
                "5464048734067145631571/96397723847726903810",
                "1846840452625909625850/9639772384772690381",
                "2128043445355359621374/48198861923863451905",
                "1071553862883803942263/19279544769545380762",
                "1827792409845115295096/9639772384772690381",
                "400799524679342719654/9639772384772690381",
                "4943927384241931511756/48198861923863451905",
                "7708906023129834297657/48198861923863451905",
                "4852643014013864061819/96397723847726903810",
                "1808744367064320964342/9639772384772690381",
                "1979663521627325007476/48198861923863451905",
                "948908763628058196848/9639772384772690381",
                "1513205153027087929690/9639772384772690381",
                "946613739668100763451/19279544769545380762",
                "136134921557359626702/741520952674822337",
                "1731532003433158624164/48198861923863451905",
                "4634900800208982145803/48198861923863451905",
                "7530612583345022454066/48198861923863451905",
                "3904433261321312942931/96397723847726903810",
                "8812248811435855680887/48198861923863451905",
                "1708305809665872893729/48198861923863451905",
                "4529689414286084748802/48198861923863451905",
                "569650681029559505431/3707604763374111685",
                "4511646595027429093871/96397723847726903810",
                "8567441017247997878652/48198861923863451905",
                "1565425551671478244522/48198861923863451905",
                "892872543287778064945/9639772384772690381",
                "7314650271488713358269/48198861923863451905",
                "4267986583118548489099/96397723847726903810",
                "8533135743459683544627/48198861923863451905",
                "1521149105864238167266/48198861923863451905",
                "4340316894480244301621/48198861923863451905",
                "1417070637866059120212/9639772384772690381",
                "3973362803112936307813/96397723847726903810",
                "8441219253562020471934/48198861923863451905",
                "1147823983432448563387/48198861923863451905",
                "322283175420856125377/3707604763374111685",
                "7026673939495718339137/48198861923863451905",
                "758349127864363176629/19279544769545380762",
                "8307202259584448705599/48198861923863451905",
                "1269733737940637539981/48198861923863451905",
                "62497103607787308088/741520952674822337",
                "1380082460306573319063/9639772384772690381",
                "3565812155446581044117/96397723847726903810",
                "8213069953682579912188/48198861923863451905",
                "1050407827801145526003/48198861923863451905",
                "3871791432421357381076/48198861923863451905"
              ],
              "residual": [
                "-5202513194863000940973/48198861923863451905",
                "-1604016354094332300764/48198861923863451905",
                "3696294205830619935541/48198861923863451905",
                "157129649531373019387/19279544769545380762",
                "-4117121175861482682821/48198861923863451905",
                "23654342218250584094/741520952674822337",
                "6824655978125720739821/48198861923863451905",
                "-3027241544735208898096/48198861923863451905",
                "-612071911024451186773/19279544769545380762",
                "24636499538703391367962/48198861923863451905",
                "-2842034438467767752811/48198861923863451905",
                "-1040590188947947483786/9639772384772690381",
                "-2025712839270667012315/9639772384772690381",
                "-11529026470583856906109/96397723847726903810",
                "-11153136584961970527377/48198861923863451905",
                "3179514965366764976157/19279544769545380762",
                "-356181446916918539106/3707604763374111685",
                "2026115049012253914935/9639772384772690381",
                "-8305014079221716924323/48198861923863451905",
                "2127095077805691369234/741520952674822337",
                "1582281785197273609139/96397723847726903810",
                "-12613114690026284086923/48198861923863451905",
                "-1740228648679910659258/48198861923863451905",
                "351374058146880225332/9639772384772690381",
                "-10613545312525781421689/48198861923863451905",
                "13081900083445283625109/96397723847726903810",
                "-10647560398271457253352/48198861923863451905",
                "-2837223904680731435273/48198861923863451905",
                "-1634319155470891990312/9639772384772690381",
                "-7159876020651252074441/48198861923863451905",
                "4999883333052802865579/96397723847726903810",
                "-1913235011636676260345/9639772384772690381",
                "-2453349337067019526541/48198861923863451905",
                "-546254536355151439129/3707604763374111685",
                "-411388923301466664091/9639772384772690381",
                "9224636175443604790741/96397723847726903810",
                "-1890531845215420295664/9639772384772690381",
                "-3589121373141440415121/48198861923863451905",
                "-1030468823579870124552/9639772384772690381",
                "-3918474215277352164796/48198861923863451905",
                "-10682142093163968029277/96397723847726903810",
                "-9420001222794774355968/48198861923863451905",
                "916383714819639271080/9639772384772690381",
                "-5210563753783792207577/48198861923863451905",
                "-10599331188600275743169/48198861923863451905",
                "7461610221359673612193/96397723847726903810",
                "-9863282119231017257288/48198861923863451905",
                "-1020334128506319685150/9639772384772690381",
                "-1428046911703105198057/9639772384772690381",
                "-6479760549138037057277/48198861923863451905",
                "-501850645143023036347/96397723847726903810",
                "-7479419599196525243867/48198861923863451905",
                "-658023112613813836416/9639772384772690381",
                "-1269610423527081760533/9639772384772690381",
                "-6827732174399099809992/48198861923863451905",
                "-8288007320650149817139/96397723847726903810",
                "-1519493253438904257614/9639772384772690381",
                "-292424477702882378201/3707604763374111685",
                "-1335549624938832677149/9639772384772690381",
                "-3877680026966155890237/48198861923863451905",
                "-1654409562403500104509/96397723847726903810",
                "-9286701580140378267721/48198861923863451905",
                "199453625653453507477/9639772384772690381",
                "-7005208860419156142953/48198861923863451905",
                "-404699524667116246192/3707604763374111685",
                "2659014830814642859681/96397723847726903810",
                "-1534917879277183998765/9639772384772690381",
                "-2128510960544229660076/48198861923863451905",
                "-5922176249825092979653/48198861923863451905",
                "-6567503144400328689516/48198861923863451905",
                "-2761515068583425740221/96397723847726903810",
                "-9307301945894974990013/48198861923863451905",
                "-3301951868690147800862/48198861923863451905",
                "-5481239556270694736144/48198861923863451905",
                "-1574264360129371163648/48198861923863451905",
                "-749334189195657612447/19279544769545380762",
                "-8096840459729526780274/48198861923863451905",
                "1758320213540421803014/48198861923863451905",
                "-860471662399513414585/9639772384772690381",
                "-7890031599932679069711/48198861923863451905",
                "-4095770898188771907259/96397723847726903810",
                "-9186629449884289937667/48198861923863451905",
                "-1283797229615142358477/48198861923863451905",
                "-5199351854456876422698/48198861923863451905",
                "-709558683220779985906/48198861923863451905",
                "-552370318178490457723/19279544769545380762",
                "-5347947535781849536801/48198861923863451905",
                "-794382749387379500765/9639772384772690381",
                "94007710096771129988887/48198861923863451905",
                "-2553585490247048273774/48198861923863451905",
                "-2719830835366292269181/96397723847726903810",
                "-365188664199621792034/3707604763374111685",
                "-2329926967179834097021/96397723847726903810",
                "-5882116762667401324663/48198861923863451905",
                "-630359108530458349599/96397723847726903810",
                "9191331611703634811504/48198861923863451905",
                "4951335440506388881403/48198861923863451905",
                "718403281291859048541/9639772384772690381",
                "-2745217554805017285961/48198861923863451905",
                "2592805989300245600719/96397723847726903810",
                "-1964539504143024192/48198861923863451905",
                "-2567717166228405900304/48198861923863451905",
                "2988647667551578045798/48198861923863451905",
                "-1968545825954340143367/48198861923863451905",
                "-1669853043587775345681/96397723847726903810",
                "-5671194502594596516451/48198861923863451905",
                "648271812368336715919/48198861923863451905",
                "-1123266819779245396943/48198861923863451905",
                "-505184358255524311302/9639772384772690381",
                "-1941418890980615070729/96397723847726903810",
                "20710151987848602191288/48198861923863451905",
                "-2003332379207914300467/48198861923863451905",
                "-5410737973044763579469/96397723847726903810",
                "6325791280555686787096/48198861923863451905",
                "-1879806464423596523523/48198861923863451905",
                "-1242470997720996691186/48198861923863451905",
                "-6535948616691856183327/48198861923863451905",
                "2289921106198611447533/96397723847726903810",
                "36607432513572001642647/9639772384772690381",
                "4175614536255884456739/48198861923863451905",
                "-5527787678878084858976/48198861923863451905",
                "-6807455134478265466117/48198861923863451905",
                "3381218288699182700133/96397723847726903810",
                "-1665687680336485748158/9639772384772690381",
                "-2662137356115410979224/48198861923863451905",
                "-4704593541603865633881/48198861923863451905",
                "-1691802369537569428197/9639772384772690381",
                "-1220705344866571180963/19279544769545380762",
                "-5235995756817322133461/48198861923863451905",
                "-1364151137783836801124/48198861923863451905",
                "-2930138788714615133372/48198861923863451905",
                "-8299512969661909586393/48198861923863451905",
                "-179048453420705137407/96397723847726903810",
                "-7944054618176928765271/48198861923863451905",
                "-252784094807602649890/9639772384772690381",
                "-5622677210380003667579/48198861923863451905",
                "-2413203059048266085401/48198861923863451905",
                "-6614558270051886562231/96397723847726903810",
                "-111980500113384278693/741520952674822337",
                "-1468403421529588506809/48198861923863451905",
                "-1983438191985634236487/48198861923863451905",
                "5842367696282469016835/9639772384772690381",
                "176245692516032690453/96397723847726903810",
                "851305116127074769616/48198861923863451905",
                "-320176415309851178682/9639772384772690381",
                "-271045742543700021236/48198861923863451905",
                "-950178422680240050914/48198861923863451905",
                "3453805286762335376709/96397723847726903810",
                "-7269429084732575660221/48198861923863451905",
                "3580739978738300103796/48198861923863451905",
                "-3422875260901781515999/48198861923863451905",
                "-8091964035537065748939/48198861923863451905",
                "-214726806192698228583/19279544769545380762",
                "13909214951771016418964/48198861923863451905",
                "1388975974023404451857/48198861923863451905",
                "-2495508588435559259427/48198861923863451905",
                "-6796742723378359695448/48198861923863451905",
                "479536600801739484533/19279544769545380762",
                "-657461618960460030736/9639772384772690381",
                "-626523654044577824654/48198861923863451905",
                "-363711661487783520344/9639772384772690381",
                "-2375242834181146430286/48198861923863451905",
                "1356841974007214613079/19279544769545380762",
                "-6497297919438392791002/48198861923863451905",
                "-213511910296456169505/9639772384772690381",
                "-246879901928824704639/48198861923863451905",
                "-297011746890706415586/3707604763374111685",
                "872828087382547063571/96397723847726903810",
                "-1723507725639319321607/9639772384772690381",
                "-158406468611828752637/3707604763374111685",
                "15061474151882351985367/48198861923863451905",
                "-341117466326265398238/9639772384772690381",
                "127019249101014789409/96397723847726903810",
                "-815384807455231755083/9639772384772690381",
                "-971270759182636775654/48198861923863451905",
                "-358210706410624854069/19279544769545380762",
                "-748137902750573972424/9639772384772690381",
                "1199402691192923883592/9639772384772690381",
                "-365035501474903580781/48198861923863451905",
                "1159684570861040852863/48198861923863451905",
                "-3310279432450233600859/96397723847726903810",
                "-1548470512675458324055/9639772384772690381",
                "-581896525835284902231/48198861923863451905",
                "178944605390346577729/9639772384772690381",
                "-250394970621865489779/9639772384772690381",
                "692147565743256601319/19279544769545380762",
                "-29355904372185210174/741520952674822337",
                "3088354188953186566336/48198861923863451905",
                "-2610548599406717165793/48198861923863451905",
                "11652534462352631404124/48198861923863451905",
                "-2844058298996317001021/96397723847726903810",
                "-6016714819851775470397/48198861923863451905",
                "4412949654664785498206/48198861923863451905",
                "-2216144041940639057362/48198861923863451905",
                "-506621400052199606786/3707604763374111685",
                "7538068885938433882379/96397723847726903810",
                "-4711532063338921726252/48198861923863451905",
                "3784648121877364916933/48198861923863451905",
                "-671157778438006186182/9639772384772690381",
                "-6350673033011444320169/48198861923863451905",
                "455501885420069797591/96397723847726903810",
                "-7906550538449458669862/48198861923863451905",
                "117612199547119197504/48198861923863451905",
                "1588143122154960282694/48198861923863451905",
                "-973641108166515362686/9639772384772690381",
                "-1563419706919763712563/96397723847726903810",
                "3271104193936798340981/48198861923863451905",
                "7865363196330016942848/48198861923863451905",
                "-66458446748042419112/3707604763374111685",
                "-6014497839094585849132/48198861923863451905",
                "-6446881852093326911/19279544769545380762",
                "-7054031849563998956069/48198861923863451905",
                "-643148532930412665216/48198861923863451905",
                "-6141511204500810476/741520952674822337",
                "-1225846102150210272967/9639772384772690381",
                "-1927050850035223679347/96397723847726903810",
                "-2573803108590556039303/48198861923863451905",
                "3287489745346565145447/48198861923863451905",
                "3309838994234296952769/48198861923863451905"
              ],
              "rss": "2863217608077465695407541971/96397723847726903810",
              "df": 212,
              "train": [
                {
                  "index": 0,
                  "timeLabel": "2010-12-01",
                  "y": null
                },
                {
                  "index": 1,
                  "timeLabel": "2010-12-02",
                  "y": "309"
                },
                {
                  "index": 2,
                  "timeLabel": "2010-12-03",
                  "y": "25"
                },
                {
                  "index": 3,
                  "timeLabel": "2010-12-04",
                  "y": null
                },
                {
                  "index": 4,
                  "timeLabel": "2010-12-05",
                  "y": "198"
                },
                {
                  "index": 5,
                  "timeLabel": "2010-12-06",
                  "y": "161"
                },
                {
                  "index": 6,
                  "timeLabel": "2010-12-07",
                  "y": "331"
                },
                {
                  "index": 7,
                  "timeLabel": "2010-12-08",
                  "y": "151"
                },
                {
                  "index": 8,
                  "timeLabel": "2010-12-09",
                  "y": "195"
                },
                {
                  "index": 9,
                  "timeLabel": "2010-12-10",
                  "y": "165"
                },
                {
                  "index": 10,
                  "timeLabel": "2010-12-11",
                  "y": null
                },
                {
                  "index": 11,
                  "timeLabel": "2010-12-12",
                  "y": "42"
                },
                {
                  "index": 12,
                  "timeLabel": "2010-12-13",
                  "y": "337"
                },
                {
                  "index": 13,
                  "timeLabel": "2010-12-14",
                  "y": "185"
                },
                {
                  "index": 14,
                  "timeLabel": "2010-12-15",
                  "y": "112"
                },
                {
                  "index": 15,
                  "timeLabel": "2010-12-16",
                  "y": "790"
                },
                {
                  "index": 16,
                  "timeLabel": "2010-12-17",
                  "y": "58"
                },
                {
                  "index": 17,
                  "timeLabel": "2010-12-18",
                  "y": null
                },
                {
                  "index": 18,
                  "timeLabel": "2010-12-19",
                  "y": "42"
                },
                {
                  "index": 19,
                  "timeLabel": "2010-12-20",
                  "y": "85"
                },
                {
                  "index": 20,
                  "timeLabel": "2010-12-21",
                  "y": "41"
                },
                {
                  "index": 21,
                  "timeLabel": "2010-12-22",
                  "y": "25"
                },
                {
                  "index": 22,
                  "timeLabel": "2010-12-23",
                  "y": "47"
                },
                {
                  "index": 23,
                  "timeLabel": "2010-12-24",
                  "y": null
                },
                {
                  "index": 24,
                  "timeLabel": "2010-12-25",
                  "y": null
                },
                {
                  "index": 25,
                  "timeLabel": "2010-12-26",
                  "y": null
                },
                {
                  "index": 26,
                  "timeLabel": "2010-12-27",
                  "y": null
                },
                {
                  "index": 27,
                  "timeLabel": "2010-12-28",
                  "y": null
                },
                {
                  "index": 28,
                  "timeLabel": "2010-12-29",
                  "y": null
                },
                {
                  "index": 29,
                  "timeLabel": "2010-12-30",
                  "y": null
                },
                {
                  "index": 30,
                  "timeLabel": "2010-12-31",
                  "y": null
                },
                {
                  "index": 31,
                  "timeLabel": "2011-01-01",
                  "y": null
                },
                {
                  "index": 32,
                  "timeLabel": "2011-01-02",
                  "y": null
                },
                {
                  "index": 33,
                  "timeLabel": "2011-01-03",
                  "y": null
                },
                {
                  "index": 34,
                  "timeLabel": "2011-01-04",
                  "y": "67"
                },
                {
                  "index": 35,
                  "timeLabel": "2011-01-05",
                  "y": "304"
                },
                {
                  "index": 36,
                  "timeLabel": "2011-01-06",
                  "y": "171"
                },
                {
                  "index": 37,
                  "timeLabel": "2011-01-07",
                  "y": "334"
                },
                {
                  "index": 38,
                  "timeLabel": "2011-01-08",
                  "y": null
                },
                {
                  "index": 39,
                  "timeLabel": "2011-01-09",
                  "y": "97"
                },
                {
                  "index": 40,
                  "timeLabel": "2011-01-10",
                  "y": "12"
                },
                {
                  "index": 41,
                  "timeLabel": "2011-01-11",
                  "y": "3114"
                },
                {
                  "index": 42,
                  "timeLabel": "2011-01-12",
                  "y": "83"
                },
                {
                  "index": 43,
                  "timeLabel": "2011-01-13",
                  "y": "8"
                },
                {
                  "index": 44,
                  "timeLabel": "2011-01-14",
                  "y": "89"
                },
                {
                  "index": 45,
                  "timeLabel": "2011-01-15",
                  "y": null
                },
                {
                  "index": 46,
                  "timeLabel": "2011-01-16",
                  "y": "23"
                },
                {
                  "index": 47,
                  "timeLabel": "2011-01-17",
                  "y": "220"
                },
                {
                  "index": 48,
                  "timeLabel": "2011-01-18",
                  "y": "18"
                },
                {
                  "index": 49,
                  "timeLabel": "2011-01-19",
                  "y": "271"
                },
                {
                  "index": 50,
                  "timeLabel": "2011-01-20",
                  "y": "42"
                },
                {
                  "index": 51,
                  "timeLabel": "2011-01-21",
                  "y": "63"
                },
                {
                  "index": 52,
                  "timeLabel": "2011-01-22",
                  "y": null
                },
                {
                  "index": 53,
                  "timeLabel": "2011-01-23",
                  "y": "47"
                },
                {
                  "index": 54,
                  "timeLabel": "2011-01-24",
                  "y": "11"
                },
                {
                  "index": 55,
                  "timeLabel": "2011-01-25",
                  "y": "92"
                },
                {
                  "index": 56,
                  "timeLabel": "2011-01-26",
                  "y": "183"
                },
                {
                  "index": 57,
                  "timeLabel": "2011-01-27",
                  "y": "64"
                },
                {
                  "index": 58,
                  "timeLabel": "2011-01-28",
                  "y": "68"
                },
                {
                  "index": 59,
                  "timeLabel": "2011-01-29",
                  "y": null
                },
                {
                  "index": 60,
                  "timeLabel": "2011-01-30",
                  "y": "123"
                },
                {
                  "index": 61,
                  "timeLabel": "2011-01-31",
                  "y": "29"
                },
                {
                  "index": 62,
                  "timeLabel": "2011-02-01",
                  "y": "195"
                },
                {
                  "index": 63,
                  "timeLabel": "2011-02-02",
                  "y": "222"
                },
                {
                  "index": 64,
                  "timeLabel": "2011-02-03",
                  "y": "63"
                },
                {
                  "index": 65,
                  "timeLabel": "2011-02-04",
                  "y": "42"
                },
                {
                  "index": 66,
                  "timeLabel": "2011-02-05",
                  "y": null
                },
                {
                  "index": 67,
                  "timeLabel": "2011-02-06",
                  "y": "35"
                },
                {
                  "index": 68,
                  "timeLabel": "2011-02-07",
                  "y": "69"
                },
                {
                  "index": 69,
                  "timeLabel": "2011-02-08",
                  "y": "153"
                },
                {
                  "index": 70,
                  "timeLabel": "2011-02-09",
                  "y": "14"
                },
                {
                  "index": 71,
                  "timeLabel": "2011-02-10",
                  "y": "66"
                },
                {
                  "index": 72,
                  "timeLabel": "2011-02-11",
                  "y": "209"
                },
                {
                  "index": 73,
                  "timeLabel": "2011-02-12",
                  "y": null
                },
                {
                  "index": 74,
                  "timeLabel": "2011-02-13",
                  "y": "6"
                },
                {
                  "index": 75,
                  "timeLabel": "2011-02-14",
                  "y": "66"
                },
                {
                  "index": 76,
                  "timeLabel": "2011-02-15",
                  "y": "12"
                },
                {
                  "index": 77,
                  "timeLabel": "2011-02-16",
                  "y": "203"
                },
                {
                  "index": 78,
                  "timeLabel": "2011-02-17",
                  "y": "50"
                },
                {
                  "index": 79,
                  "timeLabel": "2011-02-18",
                  "y": "6"
                },
                {
                  "index": 80,
                  "timeLabel": "2011-02-19",
                  "y": null
                },
                {
                  "index": 81,
                  "timeLabel": "2011-02-20",
                  "y": "28"
                },
                {
                  "index": 82,
                  "timeLabel": "2011-02-21",
                  "y": "23"
                },
                {
                  "index": 83,
                  "timeLabel": "2011-02-22",
                  "y": "96"
                },
                {
                  "index": 84,
                  "timeLabel": "2011-02-23",
                  "y": "116"
                },
                {
                  "index": 85,
                  "timeLabel": "2011-02-24",
                  "y": "99"
                },
                {
                  "index": 86,
                  "timeLabel": "2011-02-25",
                  "y": "40"
                },
                {
                  "index": 87,
                  "timeLabel": "2011-02-26",
                  "y": null
                },
                {
                  "index": 88,
                  "timeLabel": "2011-02-27",
                  "y": "27"
                },
                {
                  "index": 89,
                  "timeLabel": "2011-02-28",
                  "y": "37"
                },
                {
                  "index": 90,
                  "timeLabel": "2011-03-01",
                  "y": "86"
                },
                {
                  "index": 91,
                  "timeLabel": "2011-03-02",
                  "y": "33"
                },
                {
                  "index": 92,
                  "timeLabel": "2011-03-03",
                  "y": "96"
                },
                {
                  "index": 93,
                  "timeLabel": "2011-03-04",
                  "y": "27"
                },
                {
                  "index": 94,
                  "timeLabel": "2011-03-05",
                  "y": null
                },
                {
                  "index": 95,
                  "timeLabel": "2011-03-06",
                  "y": "101"
                },
                {
                  "index": 96,
                  "timeLabel": "2011-03-07",
                  "y": "26"
                },
                {
                  "index": 97,
                  "timeLabel": "2011-03-08",
                  "y": "145"
                },
                {
                  "index": 98,
                  "timeLabel": "2011-03-09",
                  "y": "98"
                },
                {
                  "index": 99,
                  "timeLabel": "2011-03-10",
                  "y": "57"
                },
                {
                  "index": 100,
                  "timeLabel": "2011-03-11",
                  "y": "125"
                },
                {
                  "index": 101,
                  "timeLabel": "2011-03-12",
                  "y": null
                },
                {
                  "index": 102,
                  "timeLabel": "2011-03-13",
                  "y": "3"
                },
                {
                  "index": 103,
                  "timeLabel": "2011-03-14",
                  "y": "19"
                },
                {
                  "index": 104,
                  "timeLabel": "2011-03-15",
                  "y": "114"
                },
                {
                  "index": 105,
                  "timeLabel": "2011-03-16",
                  "y": "141"
                },
                {
                  "index": 106,
                  "timeLabel": "2011-03-17",
                  "y": "87"
                },
                {
                  "index": 107,
                  "timeLabel": "2011-03-18",
                  "y": "57"
                },
                {
                  "index": 108,
                  "timeLabel": "2011-03-19",
                  "y": null
                },
                {
                  "index": 109,
                  "timeLabel": "2011-03-20",
                  "y": "47"
                },
                {
                  "index": 110,
                  "timeLabel": "2011-03-21",
                  "y": "38"
                },
                {
                  "index": 111,
                  "timeLabel": "2011-03-22",
                  "y": "84"
                },
                {
                  "index": 112,
                  "timeLabel": "2011-03-23",
                  "y": "83"
                },
                {
                  "index": 113,
                  "timeLabel": "2011-03-24",
                  "y": "52"
                },
                {
                  "index": 114,
                  "timeLabel": "2011-03-25",
                  "y": "31"
                },
                {
                  "index": 115,
                  "timeLabel": "2011-03-26",
                  "y": null
                },
                {
                  "index": 116,
                  "timeLabel": "2011-03-27",
                  "y": "77"
                },
                {
                  "index": 117,
                  "timeLabel": "2011-03-28",
                  "y": "44"
                },
                {
                  "index": 118,
                  "timeLabel": "2011-03-29",
                  "y": "185"
                },
                {
                  "index": 119,
                  "timeLabel": "2011-03-30",
                  "y": "68"
                },
                {
                  "index": 120,
                  "timeLabel": "2011-03-31",
                  "y": "75"
                },
                {
                  "index": 121,
                  "timeLabel": "2011-04-01",
                  "y": "133"
                },
                {
                  "index": 122,
                  "timeLabel": "2011-04-02",
                  "y": null
                },
                {
                  "index": 123,
                  "timeLabel": "2011-04-03",
                  "y": "77"
                },
                {
                  "index": 124,
                  "timeLabel": "2011-04-04",
                  "y": "66"
                },
                {
                  "index": 125,
                  "timeLabel": "2011-04-05",
                  "y": "51"
                },
                {
                  "index": 126,
                  "timeLabel": "2011-04-06",
                  "y": "65"
                },
                {
                  "index": 127,
                  "timeLabel": "2011-04-07",
                  "y": "50"
                },
                {
                  "index": 128,
                  "timeLabel": "2011-04-08",
                  "y": "68"
                },
                {
                  "index": 129,
                  "timeLabel": "2011-04-09",
                  "y": null
                },
                {
                  "index": 130,
                  "timeLabel": "2011-04-10",
                  "y": "74"
                },
                {
                  "index": 131,
                  "timeLabel": "2011-04-11",
                  "y": "45"
                },
                {
                  "index": 132,
                  "timeLabel": "2011-04-12",
                  "y": "198"
                },
                {
                  "index": 133,
                  "timeLabel": "2011-04-13",
                  "y": "73"
                },
                {
                  "index": 134,
                  "timeLabel": "2011-04-14",
                  "y": "127"
                },
                {
                  "index": 135,
                  "timeLabel": "2011-04-15",
                  "y": "8"
                },
                {
                  "index": 136,
                  "timeLabel": "2011-04-16",
                  "y": null
                },
                {
                  "index": 137,
                  "timeLabel": "2011-04-17",
                  "y": "23"
                },
                {
                  "index": 138,
                  "timeLabel": "2011-04-18",
                  "y": "2102"
                },
                {
                  "index": 139,
                  "timeLabel": "2011-04-19",
                  "y": "110"
                },
                {
                  "index": 140,
                  "timeLabel": "2011-04-20",
                  "y": "73"
                },
                {
                  "index": 141,
                  "timeLabel": "2011-04-21",
                  "y": "137"
                },
                {
                  "index": 142,
                  "timeLabel": "2011-04-22",
                  "y": null
                },
                {
                  "index": 143,
                  "timeLabel": "2011-04-23",
                  "y": null
                },
                {
                  "index": 144,
                  "timeLabel": "2011-04-24",
                  "y": null
                },
                {
                  "index": 145,
                  "timeLabel": "2011-04-25",
                  "y": null
                },
                {
                  "index": 146,
                  "timeLabel": "2011-04-26",
                  "y": "179"
                },
                {
                  "index": 147,
                  "timeLabel": "2011-04-27",
                  "y": "73"
                },
                {
                  "index": 148,
                  "timeLabel": "2011-04-28",
                  "y": "111"
                },
                {
                  "index": 149,
                  "timeLabel": "2011-04-29",
                  "y": null
                },
                {
                  "index": 150,
                  "timeLabel": "2011-04-30",
                  "y": null
                },
                {
                  "index": 151,
                  "timeLabel": "2011-05-01",
                  "y": "12"
                },
                {
                  "index": 152,
                  "timeLabel": "2011-05-02",
                  "y": null
                },
                {
                  "index": 153,
                  "timeLabel": "2011-05-03",
                  "y": "317"
                },
                {
                  "index": 154,
                  "timeLabel": "2011-05-04",
                  "y": "85"
                },
                {
                  "index": 155,
                  "timeLabel": "2011-05-05",
                  "y": "421"
                },
                {
                  "index": 156,
                  "timeLabel": "2011-05-06",
                  "y": "179"
                },
                {
                  "index": 157,
                  "timeLabel": "2011-05-07",
                  "y": null
                },
                {
                  "index": 158,
                  "timeLabel": "2011-05-08",
                  "y": "142"
                },
                {
                  "index": 159,
                  "timeLabel": "2011-05-09",
                  "y": "216"
                },
                {
                  "index": 160,
                  "timeLabel": "2011-05-10",
                  "y": "142"
                },
                {
                  "index": 161,
                  "timeLabel": "2011-05-11",
                  "y": "120"
                },
                {
                  "index": 162,
                  "timeLabel": "2011-05-12",
                  "y": "227"
                },
                {
                  "index": 163,
                  "timeLabel": "2011-05-13",
                  "y": "25"
                },
                {
                  "index": 164,
                  "timeLabel": "2011-05-14",
                  "y": null
                },
                {
                  "index": 165,
                  "timeLabel": "2011-05-15",
                  "y": "143"
                },
                {
                  "index": 166,
                  "timeLabel": "2011-05-16",
                  "y": "201"
                },
                {
                  "index": 167,
                  "timeLabel": "2011-05-17",
                  "y": "156"
                },
                {
                  "index": 168,
                  "timeLabel": "2011-05-18",
                  "y": "73"
                },
                {
                  "index": 169,
                  "timeLabel": "2011-05-19",
                  "y": "108"
                },
                {
                  "index": 170,
                  "timeLabel": "2011-05-20",
                  "y": "92"
                },
                {
                  "index": 171,
                  "timeLabel": "2011-05-21",
                  "y": null
                },
                {
                  "index": 172,
                  "timeLabel": "2011-05-22",
                  "y": "153"
                },
                {
                  "index": 173,
                  "timeLabel": "2011-05-23",
                  "y": "113"
                },
                {
                  "index": 174,
                  "timeLabel": "2011-05-24",
                  "y": "144"
                },
                {
                  "index": 175,
                  "timeLabel": "2011-05-25",
                  "y": "68"
                },
                {
                  "index": 176,
                  "timeLabel": "2011-05-26",
                  "y": "653"
                },
                {
                  "index": 177,
                  "timeLabel": "2011-05-27",
                  "y": "22"
                },
                {
                  "index": 178,
                  "timeLabel": "2011-05-28",
                  "y": null
                },
                {
                  "index": 179,
                  "timeLabel": "2011-05-29",
                  "y": "26"
                },
                {
                  "index": 180,
                  "timeLabel": "2011-05-30",
                  "y": null
                },
                {
                  "index": 181,
                  "timeLabel": "2011-05-31",
                  "y": "168"
                },
                {
                  "index": 182,
                  "timeLabel": "2011-06-01",
                  "y": "29"
                },
                {
                  "index": 183,
                  "timeLabel": "2011-06-02",
                  "y": "353"
                },
                {
                  "index": 184,
                  "timeLabel": "2011-06-03",
                  "y": "29"
                },
                {
                  "index": 185,
                  "timeLabel": "2011-06-04",
                  "y": null
                },
                {
                  "index": 186,
                  "timeLabel": "2011-06-05",
                  "y": "49"
                },
                {
                  "index": 187,
                  "timeLabel": "2011-06-06",
                  "y": "108"
                },
                {
                  "index": 188,
                  "timeLabel": "2011-06-07",
                  "y": "56"
                },
                {
                  "index": 189,
                  "timeLabel": "2011-06-08",
                  "y": "109"
                },
                {
                  "index": 190,
                  "timeLabel": "2011-06-09",
                  "y": "4015"
                },
                {
                  "index": 191,
                  "timeLabel": "2011-06-10",
                  "y": "68"
                },
                {
                  "index": 192,
                  "timeLabel": "2011-06-11",
                  "y": null
                },
                {
                  "index": 193,
                  "timeLabel": "2011-06-12",
                  "y": "33"
                },
                {
                  "index": 194,
                  "timeLabel": "2011-06-13",
                  "y": "17"
                },
                {
                  "index": 195,
                  "timeLabel": "2011-06-14",
                  "y": "50"
                },
                {
                  "index": 196,
                  "timeLabel": "2011-06-15",
                  "y": "118"
                },
                {
                  "index": 197,
                  "timeLabel": "2011-06-16",
                  "y": "42"
                },
                {
                  "index": 198,
                  "timeLabel": "2011-06-17",
                  "y": "15"
                },
                {
                  "index": 199,
                  "timeLabel": "2011-06-18",
                  "y": null
                },
                {
                  "index": 200,
                  "timeLabel": "2011-06-19",
                  "y": "147"
                },
                {
                  "index": 201,
                  "timeLabel": "2011-06-20",
                  "y": "29"
                },
                {
                  "index": 202,
                  "timeLabel": "2011-06-21",
                  "y": "13"
                },
                {
                  "index": 203,
                  "timeLabel": "2011-06-22",
                  "y": "18"
                },
                {
                  "index": 204,
                  "timeLabel": "2011-06-23",
                  "y": "106"
                },
                {
                  "index": 205,
                  "timeLabel": "2011-06-24",
                  "y": "38"
                },
                {
                  "index": 206,
                  "timeLabel": "2011-06-25",
                  "y": null
                },
                {
                  "index": 207,
                  "timeLabel": "2011-06-26",
                  "y": "32"
                },
                {
                  "index": 208,
                  "timeLabel": "2011-06-27",
                  "y": "66"
                },
                {
                  "index": 209,
                  "timeLabel": "2011-06-28",
                  "y": "13"
                },
                {
                  "index": 210,
                  "timeLabel": "2011-06-29",
                  "y": "77"
                },
                {
                  "index": 211,
                  "timeLabel": "2011-06-30",
                  "y": "46"
                },
                {
                  "index": 212,
                  "timeLabel": "2011-07-01",
                  "y": "39"
                },
                {
                  "index": 213,
                  "timeLabel": "2011-07-02",
                  "y": null
                },
                {
                  "index": 214,
                  "timeLabel": "2011-07-03",
                  "y": "18"
                },
                {
                  "index": 215,
                  "timeLabel": "2011-07-04",
                  "y": "8"
                },
                {
                  "index": 216,
                  "timeLabel": "2011-07-05",
                  "y": "134"
                },
                {
                  "index": 217,
                  "timeLabel": "2011-07-06",
                  "y": "5"
                },
                {
                  "index": 218,
                  "timeLabel": "2011-07-07",
                  "y": "59"
                },
                {
                  "index": 219,
                  "timeLabel": "2011-07-08",
                  "y": "32"
                },
                {
                  "index": 220,
                  "timeLabel": "2011-07-09",
                  "y": null
                },
                {
                  "index": 221,
                  "timeLabel": "2011-07-10",
                  "y": "20"
                },
                {
                  "index": 222,
                  "timeLabel": "2011-07-11",
                  "y": "81"
                },
                {
                  "index": 223,
                  "timeLabel": "2011-07-12",
                  "y": "786"
                },
                {
                  "index": 224,
                  "timeLabel": "2011-07-13",
                  "y": "58"
                },
                {
                  "index": 225,
                  "timeLabel": "2011-07-14",
                  "y": "224"
                },
                {
                  "index": 226,
                  "timeLabel": "2011-07-15",
                  "y": "23"
                },
                {
                  "index": 227,
                  "timeLabel": "2011-07-16",
                  "y": null
                },
                {
                  "index": 228,
                  "timeLabel": "2011-07-17",
                  "y": "23"
                },
                {
                  "index": 229,
                  "timeLabel": "2011-07-18",
                  "y": "114"
                },
                {
                  "index": 230,
                  "timeLabel": "2011-07-19",
                  "y": "157"
                },
                {
                  "index": 231,
                  "timeLabel": "2011-07-20",
                  "y": "104"
                },
                {
                  "index": 232,
                  "timeLabel": "2011-07-21",
                  "y": "52"
                },
                {
                  "index": 233,
                  "timeLabel": "2011-07-22",
                  "y": "132"
                },
                {
                  "index": 234,
                  "timeLabel": "2011-07-23",
                  "y": null
                },
                {
                  "index": 235,
                  "timeLabel": "2011-07-24",
                  "y": "160"
                },
                {
                  "index": 236,
                  "timeLabel": "2011-07-25",
                  "y": "43"
                },
                {
                  "index": 237,
                  "timeLabel": "2011-07-26",
                  "y": "8"
                },
                {
                  "index": 238,
                  "timeLabel": "2011-07-27",
                  "y": "58"
                },
                {
                  "index": 239,
                  "timeLabel": "2011-07-28",
                  "y": "490"
                },
                {
                  "index": 240,
                  "timeLabel": "2011-07-29",
                  "y": "74"
                },
                {
                  "index": 241,
                  "timeLabel": "2011-07-30",
                  "y": null
                },
                {
                  "index": 242,
                  "timeLabel": "2011-07-31",
                  "y": "107"
                },
                {
                  "index": 243,
                  "timeLabel": "2011-08-01",
                  "y": "61"
                },
                {
                  "index": 244,
                  "timeLabel": "2011-08-02",
                  "y": "32"
                },
                {
                  "index": 245,
                  "timeLabel": "2011-08-03",
                  "y": "91"
                },
                {
                  "index": 246,
                  "timeLabel": "2011-08-04",
                  "y": "130"
                },
                {
                  "index": 247,
                  "timeLabel": "2011-08-05",
                  "y": "38"
                },
                {
                  "index": 248,
                  "timeLabel": "2011-08-06",
                  "y": null
                },
                {
                  "index": 249,
                  "timeLabel": "2011-08-07",
                  "y": "89"
                },
                {
                  "index": 250,
                  "timeLabel": "2011-08-08",
                  "y": "73"
                },
                {
                  "index": 251,
                  "timeLabel": "2011-08-09",
                  "y": "121"
                },
                {
                  "index": 252,
                  "timeLabel": "2011-08-10",
                  "y": "132"
                },
                {
                  "index": 253,
                  "timeLabel": "2011-08-11",
                  "y": "60"
                },
                {
                  "index": 254,
                  "timeLabel": "2011-08-12",
                  "y": "28"
                },
                {
                  "index": 255,
                  "timeLabel": "2011-08-13",
                  "y": null
                },
                {
                  "index": 256,
                  "timeLabel": "2011-08-14",
                  "y": "52"
                },
                {
                  "index": 257,
                  "timeLabel": "2011-08-15",
                  "y": "104"
                },
                {
                  "index": 258,
                  "timeLabel": "2011-08-16",
                  "y": "87"
                },
                {
                  "index": 259,
                  "timeLabel": "2011-08-17",
                  "y": "69"
                },
                {
                  "index": 260,
                  "timeLabel": "2011-08-18",
                  "y": "15"
                },
                {
                  "index": 261,
                  "timeLabel": "2011-08-19",
                  "y": "6"
                },
                {
                  "index": 262,
                  "timeLabel": "2011-08-20",
                  "y": null
                },
                {
                  "index": 263,
                  "timeLabel": "2011-08-21",
                  "y": "15"
                },
                {
                  "index": 264,
                  "timeLabel": "2011-08-22",
                  "y": "420"
                },
                {
                  "index": 265,
                  "timeLabel": "2011-08-23",
                  "y": "122"
                },
                {
                  "index": 266,
                  "timeLabel": "2011-08-24",
                  "y": "58"
                },
                {
                  "index": 267,
                  "timeLabel": "2011-08-25",
                  "y": "107"
                },
                {
                  "index": 268,
                  "timeLabel": "2011-08-26",
                  "y": "24"
                },
                {
                  "index": 269,
                  "timeLabel": "2011-08-27",
                  "y": null
                },
                {
                  "index": 270,
                  "timeLabel": "2011-08-28",
                  "y": "42"
                },
                {
                  "index": 271,
                  "timeLabel": "2011-08-29",
                  "y": null
                },
                {
                  "index": 272,
                  "timeLabel": "2011-08-30",
                  "y": "63"
                },
                {
                  "index": 273,
                  "timeLabel": "2011-08-31",
                  "y": "37"
                },
                {
                  "index": 274,
                  "timeLabel": "2011-09-01",
                  "y": "112"
                },
                {
                  "index": 275,
                  "timeLabel": "2011-09-02",
                  "y": "166"
                },
                {
                  "index": 276,
                  "timeLabel": "2011-09-03",
                  "y": null
                },
                {
                  "index": 277,
                  "timeLabel": "2011-09-04",
                  "y": "16"
                },
                {
                  "index": 278,
                  "timeLabel": "2011-09-05",
                  "y": "95"
                },
                {
                  "index": 279,
                  "timeLabel": "2011-09-06",
                  "y": "184"
                },
                {
                  "index": 280,
                  "timeLabel": "2011-09-07",
                  "y": "16"
                },
                {
                  "index": 281,
                  "timeLabel": "2011-09-08",
                  "y": "27"
                },
                {
                  "index": 282,
                  "timeLabel": "2011-09-09",
                  "y": "29"
                },
                {
                  "index": 283,
                  "timeLabel": "2011-09-10",
                  "y": null
                },
                {
                  "index": 284,
                  "timeLabel": "2011-09-11",
                  "y": "89"
                },
                {
                  "index": 285,
                  "timeLabel": "2011-09-12",
                  "y": "117"
                },
                {
                  "index": 286,
                  "timeLabel": "2011-09-13",
                  "y": "131"
                },
                {
                  "index": 287,
                  "timeLabel": "2011-09-14",
                  "y": "85"
                },
                {
                  "index": 288,
                  "timeLabel": "2011-09-15",
                  "y": "144"
                },
                {
                  "index": 289,
                  "timeLabel": "2011-09-16",
                  "y": "100"
                },
                {
                  "index": 290,
                  "timeLabel": "2011-09-17",
                  "y": null
                },
                {
                  "index": 291,
                  "timeLabel": "2011-09-18",
                  "y": "81"
                },
                {
                  "index": 292,
                  "timeLabel": "2011-09-19",
                  "y": "42"
                },
                {
                  "index": 293,
                  "timeLabel": "2011-09-20",
                  "y": "398"
                },
                {
                  "index": 294,
                  "timeLabel": "2011-09-21",
                  "y": "11"
                },
                {
                  "index": 295,
                  "timeLabel": "2011-09-22",
                  "y": "58"
                },
                {
                  "index": 296,
                  "timeLabel": "2011-09-23",
                  "y": "127"
                },
                {
                  "index": 297,
                  "timeLabel": "2011-09-24",
                  "y": null
                },
                {
                  "index": 298,
                  "timeLabel": "2011-09-25",
                  "y": "69"
                },
                {
                  "index": 299,
                  "timeLabel": "2011-09-26",
                  "y": "48"
                },
                {
                  "index": 300,
                  "timeLabel": "2011-09-27",
                  "y": "17"
                },
                {
                  "index": 301,
                  "timeLabel": "2011-09-28",
                  "y": "125"
                },
                {
                  "index": 302,
                  "timeLabel": "2011-09-29",
                  "y": "80"
                },
                {
                  "index": 303,
                  "timeLabel": "2011-09-30",
                  "y": "111"
                },
                {
                  "index": 304,
                  "timeLabel": "2011-10-01",
                  "y": null
                },
                {
                  "index": 305,
                  "timeLabel": "2011-10-02",
                  "y": "21"
                },
                {
                  "index": 306,
                  "timeLabel": "2011-10-03",
                  "y": "23"
                },
                {
                  "index": 307,
                  "timeLabel": "2011-10-04",
                  "y": "20"
                },
                {
                  "index": 308,
                  "timeLabel": "2011-10-05",
                  "y": "49"
                },
                {
                  "index": 309,
                  "timeLabel": "2011-10-06",
                  "y": "13"
                },
                {
                  "index": 310,
                  "timeLabel": "2011-10-07",
                  "y": "34"
                },
                {
                  "index": 311,
                  "timeLabel": "2011-10-08",
                  "y": null
                },
                {
                  "index": 312,
                  "timeLabel": "2011-10-09",
                  "y": "26"
                },
                {
                  "index": 313,
                  "timeLabel": "2011-10-10",
                  "y": "123"
                },
                {
                  "index": 314,
                  "timeLabel": "2011-10-11",
                  "y": "46"
                },
                {
                  "index": 315,
                  "timeLabel": "2011-10-12",
                  "y": "25"
                },
                {
                  "index": 316,
                  "timeLabel": "2011-10-13",
                  "y": "243"
                },
                {
                  "index": 317,
                  "timeLabel": "2011-10-14",
                  "y": "187"
                },
                {
                  "index": 318,
                  "timeLabel": "2011-10-15",
                  "y": null
                },
                {
                  "index": 319,
                  "timeLabel": "2011-10-16",
                  "y": "55"
                },
                {
                  "index": 320,
                  "timeLabel": "2011-10-17",
                  "y": "69"
                },
                {
                  "index": 321,
                  "timeLabel": "2011-10-18",
                  "y": "21"
                },
                {
                  "index": 322,
                  "timeLabel": "2011-10-19",
                  "y": "39"
                },
                {
                  "index": 323,
                  "timeLabel": "2011-10-20",
                  "y": "26"
                },
                {
                  "index": 324,
                  "timeLabel": "2011-10-21",
                  "y": "13"
                },
                {
                  "index": 325,
                  "timeLabel": "2011-10-22",
                  "y": null
                },
                {
                  "index": 326,
                  "timeLabel": "2011-10-23",
                  "y": "63"
                },
                {
                  "index": 327,
                  "timeLabel": "2011-10-24",
                  "y": "76"
                },
                {
                  "index": 328,
                  "timeLabel": "2011-10-25",
                  "y": "16"
                },
                {
                  "index": 329,
                  "timeLabel": "2011-10-26",
                  "y": "17"
                },
                {
                  "index": 330,
                  "timeLabel": "2011-10-27",
                  "y": "117"
                },
                {
                  "index": 331,
                  "timeLabel": "2011-10-28",
                  "y": "90"
                },
                {
                  "index": 332,
                  "timeLabel": "2011-10-29",
                  "y": null
                },
                {
                  "index": 333,
                  "timeLabel": "2011-10-30",
                  "y": "128"
                },
                {
                  "index": 334,
                  "timeLabel": "2011-10-31",
                  "y": "149"
                }
              ],
              "z": [
                null,
                "309",
                "25",
                null,
                "198",
                "161",
                "331",
                "151",
                "195",
                "165",
                null,
                "42",
                "337",
                "185",
                "112",
                "790",
                "58",
                null,
                "42",
                "85",
                "41",
                "25",
                "47",
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                "67",
                "304",
                "171",
                "334",
                null,
                "97",
                "12",
                "3114",
                "83",
                "8",
                "89",
                null,
                "23",
                "220",
                "18",
                "271",
                "42",
                "63",
                null,
                "47",
                "11",
                "92",
                "183",
                "64",
                "68",
                null,
                "123",
                "29",
                "195",
                "222",
                "63",
                "42",
                null,
                "35",
                "69",
                "153",
                "14",
                "66",
                "209",
                null,
                "6",
                "66",
                "12",
                "203",
                "50",
                "6",
                null,
                "28",
                "23",
                "96",
                "116",
                "99",
                "40",
                null,
                "27",
                "37",
                "86",
                "33",
                "96",
                "27",
                null,
                "101",
                "26",
                "145",
                "98",
                "57",
                "125",
                null,
                "3",
                "19",
                "114",
                "141",
                "87",
                "57",
                null,
                "47",
                "38",
                "84",
                "83",
                "52",
                "31",
                null,
                "77",
                "44",
                "185",
                "68",
                "75",
                "133",
                null,
                "77",
                "66",
                "51",
                "65",
                "50",
                "68",
                null,
                "74",
                "45",
                "198",
                "73",
                "127",
                "8",
                null,
                "23",
                "2102",
                "110",
                "73",
                "137",
                null,
                null,
                null,
                null,
                "179",
                "73",
                "111",
                null,
                null,
                "12",
                null,
                "317",
                "85",
                "421",
                "179",
                null,
                "142",
                "216",
                "142",
                "120",
                "227",
                "25",
                null,
                "143",
                "201",
                "156",
                "73",
                "108",
                "92",
                null,
                "153",
                "113",
                "144",
                "68",
                "653",
                "22",
                null,
                "26",
                null,
                "168",
                "29",
                "353",
                "29",
                null,
                "49",
                "108",
                "56",
                "109",
                "4015",
                "68",
                null,
                "33",
                "17",
                "50",
                "118",
                "42",
                "15",
                null,
                "147",
                "29",
                "13",
                "18",
                "106",
                "38",
                null,
                "32",
                "66",
                "13",
                "77",
                "46",
                "39",
                null,
                "18",
                "8",
                "134",
                "5",
                "59",
                "32",
                null,
                "20",
                "81",
                "786",
                "58",
                "224",
                "23",
                null,
                "23",
                "114",
                "157",
                "104",
                "52",
                "132",
                null,
                "160",
                "43",
                "8",
                "58",
                "490",
                "74",
                null,
                "107",
                "61",
                "32",
                "91",
                "130",
                "38",
                null,
                "89",
                "73",
                "121",
                "132",
                "60",
                "28",
                null,
                "52",
                "104",
                "87",
                "69",
                "15",
                "6",
                null,
                "15",
                "420",
                "122",
                "58",
                "107",
                "24",
                null,
                "42",
                null,
                "63",
                "37",
                "112",
                "166",
                null,
                "16",
                "95",
                "184",
                "16",
                "27",
                "29",
                null,
                "89",
                "117",
                "131",
                "85",
                "144",
                "100",
                null,
                "81",
                "42",
                "398",
                "11",
                "58",
                "127",
                null,
                "69",
                "48",
                "17",
                "125",
                "80",
                "111",
                null,
                "21",
                "23",
                "20",
                "49",
                "13",
                "34",
                null,
                "26",
                "123",
                "46",
                "25",
                "243",
                "187",
                null,
                "55",
                "69",
                "21",
                "39",
                "26",
                "13",
                null,
                "63",
                "76",
                "16",
                "17",
                "117",
                "90",
                null,
                "128",
                "149"
              ],
              "X": [
                [
                  "1",
                  "309",
                  "2",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "198",
                  "5",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "161",
                  "6",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "331",
                  "7",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "151",
                  "8",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "195",
                  "9",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "42",
                  "12",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "337",
                  "13",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "185",
                  "14",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "112",
                  "15",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "790",
                  "16",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "42",
                  "19",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "85",
                  "20",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "41",
                  "21",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "25",
                  "22",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "67",
                  "35",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "304",
                  "36",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "171",
                  "37",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "97",
                  "40",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "12",
                  "41",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "3114",
                  "42",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "83",
                  "43",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "8",
                  "44",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "23",
                  "47",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "220",
                  "48",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "18",
                  "49",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "271",
                  "50",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "42",
                  "51",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "47",
                  "54",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "11",
                  "55",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "92",
                  "56",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "183",
                  "57",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "64",
                  "58",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "123",
                  "61",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "29",
                  "62",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "195",
                  "63",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "222",
                  "64",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "63",
                  "65",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "35",
                  "68",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "69",
                  "69",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "153",
                  "70",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "14",
                  "71",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "66",
                  "72",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "6",
                  "75",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "66",
                  "76",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "12",
                  "77",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "203",
                  "78",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "50",
                  "79",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "28",
                  "82",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "23",
                  "83",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "96",
                  "84",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "116",
                  "85",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "99",
                  "86",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "27",
                  "89",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "37",
                  "90",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "86",
                  "91",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "33",
                  "92",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "96",
                  "93",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "101",
                  "96",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "26",
                  "97",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "145",
                  "98",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "98",
                  "99",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "57",
                  "100",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "3",
                  "103",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "19",
                  "104",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "114",
                  "105",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "141",
                  "106",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "87",
                  "107",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "47",
                  "110",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "38",
                  "111",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "84",
                  "112",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "83",
                  "113",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "52",
                  "114",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "77",
                  "117",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "44",
                  "118",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "185",
                  "119",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "68",
                  "120",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "75",
                  "121",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "77",
                  "124",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "66",
                  "125",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "51",
                  "126",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "65",
                  "127",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "50",
                  "128",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "74",
                  "131",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "45",
                  "132",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "198",
                  "133",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "73",
                  "134",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "127",
                  "135",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "23",
                  "138",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "2102",
                  "139",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "110",
                  "140",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "73",
                  "141",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "179",
                  "147",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "73",
                  "148",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "317",
                  "154",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "85",
                  "155",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "421",
                  "156",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "142",
                  "159",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "216",
                  "160",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "142",
                  "161",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "120",
                  "162",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "227",
                  "163",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "143",
                  "166",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "201",
                  "167",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "156",
                  "168",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "73",
                  "169",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "108",
                  "170",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "153",
                  "173",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "113",
                  "174",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "144",
                  "175",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "68",
                  "176",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "653",
                  "177",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "168",
                  "182",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "29",
                  "183",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "353",
                  "184",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "49",
                  "187",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "108",
                  "188",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "56",
                  "189",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "109",
                  "190",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "4015",
                  "191",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "33",
                  "194",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "17",
                  "195",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "50",
                  "196",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "118",
                  "197",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "42",
                  "198",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "147",
                  "201",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "29",
                  "202",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "13",
                  "203",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "18",
                  "204",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "106",
                  "205",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "32",
                  "208",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "66",
                  "209",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "13",
                  "210",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "77",
                  "211",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "46",
                  "212",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "18",
                  "215",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "8",
                  "216",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "134",
                  "217",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "5",
                  "218",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "59",
                  "219",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "20",
                  "222",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "81",
                  "223",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "786",
                  "224",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "58",
                  "225",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "224",
                  "226",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "23",
                  "229",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "114",
                  "230",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "157",
                  "231",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "104",
                  "232",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "52",
                  "233",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "160",
                  "236",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "43",
                  "237",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "8",
                  "238",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "58",
                  "239",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "490",
                  "240",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "107",
                  "243",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "61",
                  "244",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "32",
                  "245",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "91",
                  "246",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "130",
                  "247",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "89",
                  "250",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "73",
                  "251",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "121",
                  "252",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "132",
                  "253",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "60",
                  "254",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "52",
                  "257",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "104",
                  "258",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "87",
                  "259",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "69",
                  "260",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "15",
                  "261",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "15",
                  "264",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "420",
                  "265",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "122",
                  "266",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "58",
                  "267",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "107",
                  "268",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "63",
                  "273",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "37",
                  "274",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "112",
                  "275",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "16",
                  "278",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "95",
                  "279",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "184",
                  "280",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "16",
                  "281",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "27",
                  "282",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "89",
                  "285",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "117",
                  "286",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "131",
                  "287",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "85",
                  "288",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "144",
                  "289",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "81",
                  "292",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "42",
                  "293",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "398",
                  "294",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "11",
                  "295",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "58",
                  "296",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "69",
                  "299",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "48",
                  "300",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "17",
                  "301",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "125",
                  "302",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "80",
                  "303",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "21",
                  "306",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "23",
                  "307",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "20",
                  "308",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "49",
                  "309",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "13",
                  "310",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "26",
                  "313",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "123",
                  "314",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "46",
                  "315",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "25",
                  "316",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "243",
                  "317",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "55",
                  "320",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "69",
                  "321",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "21",
                  "322",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "39",
                  "323",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "26",
                  "324",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "63",
                  "327",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ],
                [
                  "1",
                  "76",
                  "328",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ],
                [
                  "1",
                  "16",
                  "329",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "17",
                  "330",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "117",
                  "331",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ],
                [
                  "1",
                  "128",
                  "334",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              ],
              "Y": [
                "25",
                "161",
                "331",
                "151",
                "195",
                "165",
                "337",
                "185",
                "112",
                "790",
                "58",
                "85",
                "41",
                "25",
                "47",
                "304",
                "171",
                "334",
                "12",
                "3114",
                "83",
                "8",
                "89",
                "220",
                "18",
                "271",
                "42",
                "63",
                "11",
                "92",
                "183",
                "64",
                "68",
                "29",
                "195",
                "222",
                "63",
                "42",
                "69",
                "153",
                "14",
                "66",
                "209",
                "66",
                "12",
                "203",
                "50",
                "6",
                "23",
                "96",
                "116",
                "99",
                "40",
                "37",
                "86",
                "33",
                "96",
                "27",
                "26",
                "145",
                "98",
                "57",
                "125",
                "19",
                "114",
                "141",
                "87",
                "57",
                "38",
                "84",
                "83",
                "52",
                "31",
                "44",
                "185",
                "68",
                "75",
                "133",
                "66",
                "51",
                "65",
                "50",
                "68",
                "45",
                "198",
                "73",
                "127",
                "8",
                "2102",
                "110",
                "73",
                "137",
                "73",
                "111",
                "85",
                "421",
                "179",
                "216",
                "142",
                "120",
                "227",
                "25",
                "201",
                "156",
                "73",
                "108",
                "92",
                "113",
                "144",
                "68",
                "653",
                "22",
                "29",
                "353",
                "29",
                "108",
                "56",
                "109",
                "4015",
                "68",
                "17",
                "50",
                "118",
                "42",
                "15",
                "29",
                "13",
                "18",
                "106",
                "38",
                "66",
                "13",
                "77",
                "46",
                "39",
                "8",
                "134",
                "5",
                "59",
                "32",
                "81",
                "786",
                "58",
                "224",
                "23",
                "114",
                "157",
                "104",
                "52",
                "132",
                "43",
                "8",
                "58",
                "490",
                "74",
                "61",
                "32",
                "91",
                "130",
                "38",
                "73",
                "121",
                "132",
                "60",
                "28",
                "104",
                "87",
                "69",
                "15",
                "6",
                "420",
                "122",
                "58",
                "107",
                "24",
                "37",
                "112",
                "166",
                "95",
                "184",
                "16",
                "27",
                "29",
                "117",
                "131",
                "85",
                "144",
                "100",
                "42",
                "398",
                "11",
                "58",
                "127",
                "48",
                "17",
                "125",
                "80",
                "111",
                "23",
                "20",
                "49",
                "13",
                "34",
                "123",
                "46",
                "25",
                "243",
                "187",
                "69",
                "21",
                "39",
                "26",
                "13",
                "76",
                "16",
                "17",
                "117",
                "90",
                "149"
              ],
              "used": [
                2,
                5,
                6,
                7,
                8,
                9,
                12,
                13,
                14,
                15,
                16,
                19,
                20,
                21,
                22,
                35,
                36,
                37,
                40,
                41,
                42,
                43,
                44,
                47,
                48,
                49,
                50,
                51,
                54,
                55,
                56,
                57,
                58,
                61,
                62,
                63,
                64,
                65,
                68,
                69,
                70,
                71,
                72,
                75,
                76,
                77,
                78,
                79,
                82,
                83,
                84,
                85,
                86,
                89,
                90,
                91,
                92,
                93,
                96,
                97,
                98,
                99,
                100,
                103,
                104,
                105,
                106,
                107,
                110,
                111,
                112,
                113,
                114,
                117,
                118,
                119,
                120,
                121,
                124,
                125,
                126,
                127,
                128,
                131,
                132,
                133,
                134,
                135,
                138,
                139,
                140,
                141,
                147,
                148,
                154,
                155,
                156,
                159,
                160,
                161,
                162,
                163,
                166,
                167,
                168,
                169,
                170,
                173,
                174,
                175,
                176,
                177,
                182,
                183,
                184,
                187,
                188,
                189,
                190,
                191,
                194,
                195,
                196,
                197,
                198,
                201,
                202,
                203,
                204,
                205,
                208,
                209,
                210,
                211,
                212,
                215,
                216,
                217,
                218,
                219,
                222,
                223,
                224,
                225,
                226,
                229,
                230,
                231,
                232,
                233,
                236,
                237,
                238,
                239,
                240,
                243,
                244,
                245,
                246,
                247,
                250,
                251,
                252,
                253,
                254,
                257,
                258,
                259,
                260,
                261,
                264,
                265,
                266,
                267,
                268,
                273,
                274,
                275,
                278,
                279,
                280,
                281,
                282,
                285,
                286,
                287,
                288,
                289,
                292,
                293,
                294,
                295,
                296,
                299,
                300,
                301,
                302,
                303,
                306,
                307,
                308,
                309,
                310,
                313,
                314,
                315,
                316,
                317,
                320,
                321,
                322,
                323,
                324,
                327,
                328,
                329,
                330,
                331,
                334
              ],
              "names": [
                "intercept",
                "ARlag1",
                "time-from-trendOrigin",
                "season-phase1",
                "season-phase2",
                "season-phase3",
                "season-phase4",
                "season-phase5",
                "season-phase6"
              ],
              "delta": [
                "1"
              ],
              "origin": 335
            },
            "fitrows": [
              {
                "index": 2,
                "observed": "25",
                "fitted": "6407484742959587238598/48198861923863451905",
                "residual": "-5202513194863000940973/48198861923863451905",
                "features": [
                  "1",
                  "309",
                  "2",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 5,
                "observed": "161",
                "fitted": "9364033123836348057469/48198861923863451905",
                "residual": "-1604016354094332300764/48198861923863451905",
                "features": [
                  "1",
                  "198",
                  "5",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 6,
                "observed": "331",
                "fitted": "12257529090968182645014/48198861923863451905",
                "residual": "3696294205830619935541/48198861923863451905",
                "features": [
                  "1",
                  "161",
                  "6",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 7,
                "observed": "151",
                "fitted": "2754081610669979475675/19279544769545380762",
                "residual": "157129649531373019387/19279544769545380762",
                "features": [
                  "1",
                  "331",
                  "7",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 8,
                "observed": "195",
                "fitted": "13515899251014855804296/48198861923863451905",
                "residual": "-4117121175861482682821/48198861923863451905",
                "features": [
                  "1",
                  "151",
                  "8",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 9,
                "observed": "165",
                "fitted": "98696614973095101511/741520952674822337",
                "residual": "23654342218250584094/741520952674822337",
                "features": [
                  "1",
                  "195",
                  "9",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 12,
                "observed": "337",
                "fitted": "9418360490216262552164/48198861923863451905",
                "residual": "6824655978125720739821/48198861923863451905",
                "features": [
                  "1",
                  "42",
                  "12",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 13,
                "observed": "185",
                "fitted": "11944031000649947500521/48198861923863451905",
                "residual": "-3027241544735208898096/48198861923863451905",
                "features": [
                  "1",
                  "337",
                  "13",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 14,
                "observed": "112",
                "fitted": "2771380925213533832117/19279544769545380762",
                "residual": "-612071911024451186773/19279544769545380762",
                "features": [
                  "1",
                  "185",
                  "14",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 15,
                "observed": "790",
                "fitted": "13440601381148735636988/48198861923863451905",
                "residual": "24636499538703391367962/48198861923863451905",
                "features": [
                  "1",
                  "112",
                  "15",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 16,
                "observed": "58",
                "fitted": "5637568430051847963301/48198861923863451905",
                "residual": "-2842034438467767752811/48198861923863451905",
                "features": [
                  "1",
                  "790",
                  "16",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 19,
                "observed": "85",
                "fitted": "1859970841653626166171/9639772384772690381",
                "residual": "-1040590188947947483786/9639772384772690381",
                "features": [
                  "1",
                  "42",
                  "19",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 20,
                "observed": "41",
                "fitted": "2420943507046347317936/9639772384772690381",
                "residual": "-2025712839270667012315/9639772384772690381",
                "features": [
                  "1",
                  "85",
                  "20",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 21,
                "observed": "25",
                "fitted": "13938969566777029501359/96397723847726903810",
                "residual": "-11529026470583856906109/96397723847726903810",
                "features": [
                  "1",
                  "41",
                  "21",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 22,
                "observed": "47",
                "fitted": "13418483095383552766912/48198861923863451905",
                "residual": "-11153136584961970527377/48198861923863451905",
                "features": [
                  "1",
                  "25",
                  "22",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 35,
                "observed": "304",
                "fitted": "2681466644575030775491/19279544769545380762",
                "residual": "3179514965366764976157/19279544769545380762",
                "features": [
                  "1",
                  "67",
                  "35",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 36,
                "observed": "171",
                "fitted": "990181861453891637241/3707604763374111685",
                "residual": "-356181446916918539106/3707604763374111685",
                "features": [
                  "1",
                  "304",
                  "36",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 37,
                "observed": "334",
                "fitted": "1193568927501824672319/9639772384772690381",
                "residual": "2026115049012253914935/9639772384772690381",
                "features": [
                  "1",
                  "171",
                  "37",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 40,
                "observed": "12",
                "fitted": "8883400422308078347183/48198861923863451905",
                "residual": "-8305014079221716924323/48198861923863451905",
                "features": [
                  "1",
                  "97",
                  "40",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 41,
                "observed": "3114",
                "fitted": "182001168823705388184/741520952674822337",
                "residual": "2127095077805691369234/741520952674822337",
                "features": [
                  "1",
                  "12",
                  "41",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 42,
                "observed": "83",
                "fitted": "6418729294164059407091/96397723847726903810",
                "residual": "1582281785197273609139/96397723847726903810",
                "features": [
                  "1",
                  "3114",
                  "42",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 43,
                "observed": "8",
                "fitted": "12998705585417191702163/48198861923863451905",
                "residual": "-12613114690026284086923/48198861923863451905",
                "features": [
                  "1",
                  "83",
                  "43",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 44,
                "observed": "89",
                "fitted": "6029927359903757878803/48198861923863451905",
                "residual": "-1740228648679910659258/48198861923863451905",
                "features": [
                  "1",
                  "8",
                  "44",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 47,
                "observed": "220",
                "fitted": "1769375866503111658488/9639772384772690381",
                "residual": "351374058146880225332/9639772384772690381",
                "features": [
                  "1",
                  "23",
                  "47",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 48,
                "observed": "18",
                "fitted": "11481124827155323555979/48198861923863451905",
                "residual": "-10613545312525781421689/48198861923863451905",
                "features": [
                  "1",
                  "220",
                  "48",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 49,
                "observed": "271",
                "fitted": "13041883079288707307401/96397723847726903810",
                "residual": "13081900083445283625109/96397723847726903810",
                "features": [
                  "1",
                  "18",
                  "49",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 50,
                "observed": "42",
                "fitted": "12671912599073722233362/48198861923863451905",
                "residual": "-10647560398271457253352/48198861923863451905",
                "features": [
                  "1",
                  "271",
                  "50",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 51,
                "observed": "63",
                "fitted": "5873752205884128905288/48198861923863451905",
                "residual": "-2837223904680731435273/48198861923863451905",
                "features": [
                  "1",
                  "42",
                  "51",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 54,
                "observed": "11",
                "fitted": "1740356651703391584503/9639772384772690381",
                "residual": "-1634319155470891990312/9639772384772690381",
                "features": [
                  "1",
                  "47",
                  "54",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 55,
                "observed": "92",
                "fitted": "11594171317646689649701/48198861923863451905",
                "residual": "-7159876020651252074441/48198861923863451905",
                "features": [
                  "1",
                  "11",
                  "55",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 56,
                "observed": "183",
                "fitted": "12640900131081220531651/96397723847726903810",
                "residual": "4999883333052802865579/96397723847726903810",
                "features": [
                  "1",
                  "92",
                  "56",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 57,
                "observed": "64",
                "fitted": "2530180444262128444729/9639772384772690381",
                "residual": "-1913235011636676260345/9639772384772690381",
                "features": [
                  "1",
                  "183",
                  "57",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 58,
                "observed": "68",
                "fitted": "5730871947889734256081/48198861923863451905",
                "residual": "-2453349337067019526541/48198861923863451905",
                "features": [
                  "1",
                  "64",
                  "58",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 61,
                "observed": "29",
                "fitted": "653775074493000677994/3707604763374111685",
                "residual": "-546254536355151439129/3707604763374111685",
                "features": [
                  "1",
                  "123",
                  "61",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 62,
                "observed": "195",
                "fitted": "2291144538332141288386/9639772384772690381",
                "residual": "-411388923301466664091/9639772384772690381",
                "features": [
                  "1",
                  "29",
                  "62",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 63,
                "observed": "222",
                "fitted": "12175658518751767855079/96397723847726903810",
                "residual": "9224636175443604790741/96397723847726903810",
                "features": [
                  "1",
                  "195",
                  "63",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 64,
                "observed": "63",
                "fitted": "2497837505456099789667/9639772384772690381",
                "residual": "-1890531845215420295664/9639772384772690381",
                "features": [
                  "1",
                  "222",
                  "64",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 65,
                "observed": "42",
                "fitted": "5613473573943705395131/48198861923863451905",
                "residual": "-3589121373141440415121/48198861923863451905",
                "features": [
                  "1",
                  "63",
                  "65",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 68,
                "observed": "69",
                "fitted": "1695613118129185760841/9639772384772690381",
                "residual": "-1030468823579870124552/9639772384772690381",
                "features": [
                  "1",
                  "35",
                  "68",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 69,
                "observed": "153",
                "fitted": "11292900089628460306261/48198861923863451905",
                "residual": "-3918474215277352164796/48198861923863451905",
                "features": [
                  "1",
                  "69",
                  "69",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 70,
                "observed": "14",
                "fitted": "12031710227032144682617/96397723847726903810",
                "residual": "-10682142093163968029277/96397723847726903810",
                "features": [
                  "1",
                  "153",
                  "70",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 71,
                "observed": "66",
                "fitted": "12601126109769762181698/48198861923863451905",
                "residual": "-9420001222794774355968/48198861923863451905",
                "features": [
                  "1",
                  "14",
                  "71",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 72,
                "observed": "209",
                "fitted": "1098328713597853018549/9639772384772690381",
                "residual": "916383714819639271080/9639772384772690381",
                "features": [
                  "1",
                  "66",
                  "72",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 75,
                "observed": "66",
                "fitted": "8391688640758780033307/48198861923863451905",
                "residual": "-5210563753783792207577/48198861923863451905",
                "features": [
                  "1",
                  "6",
                  "75",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 76,
                "observed": "12",
                "fitted": "11177717531686637166029/48198861923863451905",
                "residual": "-10599331188600275743169/48198861923863451905",
                "features": [
                  "1",
                  "66",
                  "76",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 77,
                "observed": "203",
                "fitted": "12107127719728887861237/96397723847726903810",
                "residual": "7461610221359673612193/96397723847726903810",
                "features": [
                  "1",
                  "12",
                  "77",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 78,
                "observed": "50",
                "fitted": "12273225215424189852538/48198861923863451905",
                "residual": "-9863282119231017257288/48198861923863451905",
                "features": [
                  "1",
                  "203",
                  "78",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 79,
                "observed": "6",
                "fitted": "1078172762814955827436/9639772384772690381",
                "residual": "-1020334128506319685150/9639772384772690381",
                "features": [
                  "1",
                  "50",
                  "79",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 82,
                "observed": "23",
                "fitted": "1649761676552877076820/9639772384772690381",
                "residual": "-1428046911703105198057/9639772384772690381",
                "features": [
                  "1",
                  "28",
                  "82",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 83,
                "observed": "96",
                "fitted": "11106851293828928440157/48198861923863451905",
                "residual": "-6479760549138037057277/48198861923863451905",
                "features": [
                  "1",
                  "23",
                  "83",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 84,
                "observed": "116",
                "fitted": "11683986611479343878307/96397723847726903810",
                "residual": "-501850645143023036347/96397723847726903810",
                "features": [
                  "1",
                  "96",
                  "84",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 85,
                "observed": "99",
                "fitted": "12251106929659006982462/48198861923863451905",
                "residual": "-7479419599196525243867/48198861923863451905",
                "features": [
                  "1",
                  "116",
                  "85",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 86,
                "observed": "40",
                "fitted": "1043614008004721451656/9639772384772690381",
                "residual": "-658023112613813836416/9639772384772690381",
                "features": [
                  "1",
                  "99",
                  "86",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 89,
                "observed": "37",
                "fitted": "1626282001763671304630/9639772384772690381",
                "residual": "-1269610423527081760533/9639772384772690381",
                "features": [
                  "1",
                  "27",
                  "89",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 90,
                "observed": "86",
                "fitted": "10972834299851356673822/48198861923863451905",
                "residual": "-6827732174399099809992/48198861923863451905",
                "features": [
                  "1",
                  "37",
                  "90",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 91,
                "observed": "33",
                "fitted": "11469132207625137642869/96397723847726903810",
                "residual": "-8288007320650149817139/96397723847726903810",
                "features": [
                  "1",
                  "86",
                  "91",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 92,
                "observed": "96",
                "fitted": "2444911402377082534190/9639772384772690381",
                "residual": "-1519493253438904257614/9639772384772690381",
                "features": [
                  "1",
                  "33",
                  "92",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 93,
                "observed": "27",
                "fitted": "392529806313983393696/3707604763374111685",
                "residual": "-292424477702882378201/3707604763374111685",
                "features": [
                  "1",
                  "96",
                  "93",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 96,
                "observed": "26",
                "fitted": "1586183706942922627055/9639772384772690381",
                "residual": "-1335549624938832677149/9639772384772690381",
                "features": [
                  "1",
                  "101",
                  "96",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 97,
                "observed": "145",
                "fitted": "10866515005926356416462/48198861923863451905",
                "residual": "-3877680026966155890237/48198861923863451905",
                "features": [
                  "1",
                  "26",
                  "97",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 98,
                "observed": "98",
                "fitted": "11101386499480736677889/96397723847726903810",
                "residual": "-1654409562403500104509/96397723847726903810",
                "features": [
                  "1",
                  "145",
                  "98",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 99,
                "observed": "57",
                "fitted": "12034036709800595026306/48198861923863451905",
                "residual": "-9286701580140378267721/48198861923863451905",
                "features": [
                  "1",
                  "98",
                  "99",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 100,
                "observed": "125",
                "fitted": "1005517922443132790148/9639772384772690381",
                "residual": "199453625653453507477/9639772384772690381",
                "features": [
                  "1",
                  "57",
                  "100",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 103,
                "observed": "19",
                "fitted": "7920987236972561729148/48198861923863451905",
                "residual": "-7005208860419156142953/48198861923863451905",
                "features": [
                  "1",
                  "3",
                  "103",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 104,
                "observed": "114",
                "fitted": "827366467691764978282/3707604763374111685",
                "residual": "-404699524667116246192/3707604763374111685",
                "features": [
                  "1",
                  "19",
                  "104",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 105,
                "observed": "141",
                "fitted": "10933064231714850577529/96397723847726903810",
                "residual": "2659014830814642859681/96397723847726903810",
                "features": [
                  "1",
                  "114",
                  "105",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 106,
                "observed": "87",
                "fitted": "2373578076752408061912/9639772384772690381",
                "residual": "-1534917879277183998765/9639772384772690381",
                "features": [
                  "1",
                  "141",
                  "106",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 107,
                "observed": "57",
                "fitted": "4875846090204446418661/48198861923863451905",
                "residual": "-2128510960544229660076/48198861923863451905",
                "features": [
                  "1",
                  "87",
                  "107",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 110,
                "observed": "38",
                "fitted": "7753733002931904152043/48198861923863451905",
                "residual": "-5922176249825092979653/48198861923863451905",
                "features": [
                  "1",
                  "47",
                  "110",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 111,
                "observed": "84",
                "fitted": "10616207546004858649536/48198861923863451905",
                "residual": "-6567503144400328689516/48198861923863451905",
                "features": [
                  "1",
                  "38",
                  "111",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 112,
                "observed": "83",
                "fitted": "10762526147944758756451/96397723847726903810",
                "residual": "-2761515068583425740221/96397723847726903810",
                "features": [
                  "1",
                  "84",
                  "112",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 113,
                "observed": "52",
                "fitted": "11813642765935874489073/48198861923863451905",
                "residual": "-9307301945894974990013/48198861923863451905",
                "features": [
                  "1",
                  "83",
                  "113",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 114,
                "observed": "31",
                "fitted": "4796116588329914809917/48198861923863451905",
                "residual": "-3301951868690147800862/48198861923863451905",
                "features": [
                  "1",
                  "52",
                  "114",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 117,
                "observed": "44",
                "fitted": "7601989480920686619964/48198861923863451905",
                "residual": "-5481239556270694736144/48198861923863451905",
                "features": [
                  "1",
                  "77",
                  "117",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 118,
                "observed": "185",
                "fitted": "10491053816044109766073/48198861923863451905",
                "residual": "-1574264360129371163648/48198861923863451905",
                "features": [
                  "1",
                  "44",
                  "118",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 119,
                "observed": "68",
                "fitted": "2060343233524743504263/19279544769545380762",
                "residual": "-749334189195657612447/19279544769545380762",
                "features": [
                  "1",
                  "185",
                  "119",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 120,
                "observed": "75",
                "fitted": "11711755104019285673149/48198861923863451905",
                "residual": "-8096840459729526780274/48198861923863451905",
                "features": [
                  "1",
                  "68",
                  "120",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 121,
                "observed": "133",
                "fitted": "4652128422333417300351/48198861923863451905",
                "residual": "1758320213540421803014/48198861923863451905",
                "features": [
                  "1",
                  "75",
                  "121",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 124,
                "observed": "66",
                "fitted": "1496696639794510979731/9639772384772690381",
                "residual": "-860471662399513414585/9639772384772690381",
                "features": [
                  "1",
                  "77",
                  "124",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 125,
                "observed": "51",
                "fitted": "10348173558049715116866/48198861923863451905",
                "residual": "-7890031599932679069711/48198861923863451905",
                "features": [
                  "1",
                  "66",
                  "125",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 126,
                "observed": "65",
                "fitted": "10361622948291020654909/96397723847726903810",
                "residual": "-4095770898188771907259/96397723847726903810",
                "features": [
                  "1",
                  "51",
                  "126",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 127,
                "observed": "50",
                "fitted": "11596572546077462532917/48198861923863451905",
                "residual": "-9186629449884289937667/48198861923863451905",
                "features": [
                  "1",
                  "65",
                  "127",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 128,
                "observed": "68",
                "fitted": "4561319840437857088017/48198861923863451905",
                "residual": "-1283797229615142358477/48198861923863451905",
                "features": [
                  "1",
                  "50",
                  "128",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 131,
                "observed": "45",
                "fitted": "7368300641030731758423/48198861923863451905",
                "residual": "-5199351854456876422698/48198861923863451905",
                "features": [
                  "1",
                  "74",
                  "131",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 132,
                "observed": "198",
                "fitted": "10252933344145743463096/48198861923863451905",
                "residual": "-709558683220779985906/48198861923863451905",
                "features": [
                  "1",
                  "45",
                  "132",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 133,
                "observed": "73",
                "fitted": "1959777086355303253349/19279544769545380762",
                "residual": "-552370318178490457723/19279544769545380762",
                "features": [
                  "1",
                  "198",
                  "133",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 134,
                "observed": "127",
                "fitted": "11469203000112507928736/48198861923863451905",
                "residual": "-5347947535781849536801/48198861923863451905",
                "features": [
                  "1",
                  "73",
                  "134",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 135,
                "observed": "8",
                "fitted": "871500928465561023813/9639772384772690381",
                "residual": "-794382749387379500765/9639772384772690381",
                "features": [
                  "1",
                  "127",
                  "135",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 138,
                "observed": "2102",
                "fitted": "7306297667189845915423/48198861923863451905",
                "residual": "94007710096771129988887/48198861923863451905",
                "features": [
                  "1",
                  "23",
                  "138",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 139,
                "observed": "110",
                "fitted": "7855460301872027983324/48198861923863451905",
                "residual": "-2553585490247048273774/48198861923863451905",
                "features": [
                  "1",
                  "2102",
                  "139",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 140,
                "observed": "73",
                "fitted": "9756864676250356247311/96397723847726903810",
                "residual": "-2719830835366292269181/96397723847726903810",
                "features": [
                  "1",
                  "110",
                  "140",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 141,
                "observed": "137",
                "fitted": "873130516781875092879/3707604763374111685",
                "residual": "-365188664199621792034/3707604763374111685",
                "features": [
                  "1",
                  "73",
                  "141",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 147,
                "observed": "73",
                "fitted": "9366960808063898075151/96397723847726903810",
                "residual": "-2329926967179834097021/96397723847726903810",
                "features": [
                  "1",
                  "179",
                  "147",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 148,
                "observed": "111",
                "fitted": "11232190436216244486118/48198861923863451905",
                "residual": "-5882116762667401324663/48198861923863451905",
                "features": [
                  "1",
                  "73",
                  "148",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 154,
                "observed": "85",
                "fitted": "8824165635587245173449/96397723847726903810",
                "residual": "-630359108530458349599/96397723847726903810",
                "features": [
                  "1",
                  "317",
                  "154",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 155,
                "observed": "421",
                "fitted": "11100389258242878440501/48198861923863451905",
                "residual": "9191331611703634811504/48198861923863451905",
                "features": [
                  "1",
                  "85",
                  "155",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 156,
                "observed": "179",
                "fitted": "3676260843865169009592/48198861923863451905",
                "residual": "4951335440506388881403/48198861923863451905",
                "features": [
                  "1",
                  "421",
                  "156",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 159,
                "observed": "216",
                "fitted": "1363787553819042073755/9639772384772690381",
                "residual": "718403281291859048541/9639772384772690381",
                "features": [
                  "1",
                  "142",
                  "159",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 160,
                "observed": "142",
                "fitted": "9589455947993627456471/48198861923863451905",
                "residual": "-2745217554805017285961/48198861923863451905",
                "features": [
                  "1",
                  "216",
                  "160",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 161,
                "observed": "120",
                "fitted": "8974920872426982856481/96397723847726903810",
                "residual": "2592805989300245600719/96397723847726903810",
                "features": [
                  "1",
                  "142",
                  "161",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 162,
                "observed": "227",
                "fitted": "10943106196221146606627/48198861923863451905",
                "residual": "-1964539504143024192/48198861923863451905",
                "features": [
                  "1",
                  "120",
                  "162",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 163,
                "observed": "25",
                "fitted": "3772688714324992197929/48198861923863451905",
                "residual": "-2567717166228405900304/48198861923863451905",
                "features": [
                  "1",
                  "227",
                  "163",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 166,
                "observed": "201",
                "fitted": "6699323579144975787107/48198861923863451905",
                "residual": "2988647667551578045798/48198861923863451905",
                "features": [
                  "1",
                  "143",
                  "166",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 167,
                "observed": "156",
                "fitted": "9487568286077038640547/48198861923863451905",
                "residual": "-1968545825954340143367/48198861923863451905",
                "features": [
                  "1",
                  "201",
                  "167",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 168,
                "observed": "73",
                "fitted": "8706886884471839323811/96397723847726903810",
                "residual": "-1669853043587775345681/96397723847726903810",
                "features": [
                  "1",
                  "156",
                  "168",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 169,
                "observed": "108",
                "fitted": "10876671590371849322191/48198861923863451905",
                "residual": "-5671194502594596516451/48198861923863451905",
                "features": [
                  "1",
                  "73",
                  "169",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 170,
                "observed": "92",
                "fitted": "3786023484627100859341/48198861923863451905",
                "residual": "648271812368336715919/48198861923863451905",
                "features": [
                  "1",
                  "108",
                  "170",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 173,
                "observed": "113",
                "fitted": "6569738217175815462208/48198861923863451905",
                "residual": "-1123266819779245396943/48198861923863451905",
                "features": [
                  "1",
                  "153",
                  "173",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 174,
                "observed": "144",
                "fitted": "1893311581662791726166/9639772384772690381",
                "residual": "-505184358255524311302/9639772384772690381",
                "features": [
                  "1",
                  "113",
                  "174",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 175,
                "observed": "68",
                "fitted": "8496464112626044529809/96397723847726903810",
                "residual": "-1941418890980615070729/96397723847726903810",
                "features": [
                  "1",
                  "144",
                  "175",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 176,
                "observed": "653",
                "fitted": "10763704848434231902677/48198861923863451905",
                "residual": "20710151987848602191288/48198861923863451905",
                "features": [
                  "1",
                  "68",
                  "176",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 177,
                "observed": "22",
                "fitted": "3063707341532910242377/48198861923863451905",
                "residual": "-2003332379207914300467/48198861923863451905",
                "features": [
                  "1",
                  "653",
                  "177",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 182,
                "observed": "29",
                "fitted": "8206271964628843789959/96397723847726903810",
                "residual": "-5410737973044763579469/96397723847726903810",
                "features": [
                  "1",
                  "168",
                  "182",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 183,
                "observed": "353",
                "fitted": "10688406978568111735369/48198861923863451905",
                "residual": "6325791280555686787096/48198861923863451905",
                "features": [
                  "1",
                  "29",
                  "183",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 184,
                "observed": "29",
                "fitted": "3277573460215636628768/48198861923863451905",
                "residual": "-1879806464423596523523/48198861923863451905",
                "features": [
                  "1",
                  "353",
                  "184",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 187,
                "observed": "108",
                "fitted": "6447948085498249496926/48198861923863451905",
                "residual": "-1242470997720996691186/48198861923863451905",
                "features": [
                  "1",
                  "49",
                  "187",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 188,
                "observed": "56",
                "fitted": "9235084884428209490007/48198861923863451905",
                "residual": "-6535948616691856183327/48198861923863451905",
                "features": [
                  "1",
                  "108",
                  "188",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 189,
                "observed": "109",
                "fitted": "8217430793203621067757/96397723847726903810",
                "residual": "2289921106198611447533/96397723847726903810",
                "features": [
                  "1",
                  "56",
                  "189",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 190,
                "observed": "4015",
                "fitted": "2096253611290350237068/9639772384772690381",
                "residual": "36607432513572001642647/9639772384772690381",
                "features": [
                  "1",
                  "109",
                  "190",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 191,
                "observed": "68",
                "fitted": "-898091925433169727199/48198861923863451905",
                "residual": "4175614536255884456739/48198861923863451905",
                "features": [
                  "1",
                  "4015",
                  "191",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 194,
                "observed": "17",
                "fitted": "6347168331583763541361/48198861923863451905",
                "residual": "-5527787678878084858976/48198861923863451905",
                "features": [
                  "1",
                  "33",
                  "194",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 195,
                "observed": "50",
                "fitted": "9217398230671438061367/48198861923863451905",
                "residual": "-6807455134478265466117/48198861923863451905",
                "features": [
                  "1",
                  "17",
                  "195",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 196,
                "observed": "118",
                "fitted": "7993713125332591949447/96397723847726903810",
                "residual": "3381218288699182700133/96397723847726903810",
                "features": [
                  "1",
                  "50",
                  "196",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 197,
                "observed": "42",
                "fitted": "2070558120496938744160/9639772384772690381",
                "residual": "-1665687680336485748158/9639772384772690381",
                "features": [
                  "1",
                  "118",
                  "197",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 198,
                "observed": "15",
                "fitted": "3385120284973362757799/48198861923863451905",
                "residual": "-2662137356115410979224/48198861923863451905",
                "features": [
                  "1",
                  "42",
                  "198",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 201,
                "observed": "29",
                "fitted": "6102360537395905739126/48198861923863451905",
                "residual": "-4704593541603865633881/48198861923863451905",
                "features": [
                  "1",
                  "147",
                  "201",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 202,
                "observed": "13",
                "fitted": "1817119410539614403150/9639772384772690381",
                "residual": "-1691802369537569428197/9639772384772690381",
                "features": [
                  "1",
                  "29",
                  "202",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 203,
                "observed": "18",
                "fitted": "1567737150718388034679/19279544769545380762",
                "residual": "-1220705344866571180963/19279544769545380762",
                "features": [
                  "1",
                  "13",
                  "203",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 204,
                "observed": "106",
                "fitted": "10345075120746848035391/48198861923863451905",
                "residual": "-5235995756817322133461/48198861923863451905",
                "features": [
                  "1",
                  "18",
                  "204",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 205,
                "observed": "38",
                "fitted": "3195707890890647973514/48198861923863451905",
                "residual": "-1364151137783836801124/48198861923863451905",
                "features": [
                  "1",
                  "106",
                  "205",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 208,
                "observed": "66",
                "fitted": "6111263675689602959102/48198861923863451905",
                "residual": "-2930138788714615133372/48198861923863451905",
                "features": [
                  "1",
                  "32",
                  "208",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 209,
                "observed": "13",
                "fitted": "8926098174672134461158/48198861923863451905",
                "residual": "-8299512969661909586393/48198861923863451905",
                "features": [
                  "1",
                  "66",
                  "209",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 210,
                "observed": "77",
                "fitted": "7601673189695676730777/96397723847726903810",
                "residual": "-179048453420705137407/96397723847726903810",
                "features": [
                  "1",
                  "13",
                  "210",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 211,
                "observed": "46",
                "fitted": "10161202266674647552901/48198861923863451905",
                "residual": "-7944054618176928765271/48198861923863451905",
                "features": [
                  "1",
                  "77",
                  "211",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 212,
                "observed": "39",
                "fitted": "628735217813737574749/9639772384772690381",
                "residual": "-252784094807602649890/9639772384772690381",
                "features": [
                  "1",
                  "46",
                  "212",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 215,
                "observed": "8",
                "fitted": "6008268105770911282819/48198861923863451905",
                "residual": "-5622677210380003667579/48198861923863451905",
                "features": [
                  "1",
                  "18",
                  "215",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 216,
                "observed": "134",
                "fitted": "8871850556845968640671/48198861923863451905",
                "residual": "-2413203059048266085401/48198861923863451905",
                "features": [
                  "1",
                  "8",
                  "216",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 217,
                "observed": "5",
                "fitted": "7096546889290521081281/96397723847726903810",
                "residual": "-6614558270051886562231/96397723847726903810",
                "features": [
                  "1",
                  "134",
                  "217",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 218,
                "observed": "59",
                "fitted": "155730236321198796576/741520952674822337",
                "residual": "-111980500113384278693/741520952674822337",
                "features": [
                  "1",
                  "5",
                  "218",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 219,
                "observed": "32",
                "fitted": "3010767003093218967769/48198861923863451905",
                "residual": "-1468403421529588506809/48198861923863451905",
                "features": [
                  "1",
                  "59",
                  "219",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 222,
                "observed": "81",
                "fitted": "5887546007818573840792/48198861923863451905",
                "residual": "-1983438191985634236487/48198861923863451905",
                "features": [
                  "1",
                  "20",
                  "222",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 223,
                "observed": "786",
                "fitted": "1734493398148865622631/9639772384772690381",
                "residual": "5842367696282469016835/9639772384772690381",
                "features": [
                  "1",
                  "81",
                  "223",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 224,
                "observed": "58",
                "fitted": "5414822290652127730527/96397723847726903810",
                "residual": "176245692516032690453/96397723847726903810",
                "features": [
                  "1",
                  "786",
                  "224",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 225,
                "observed": "224",
                "fitted": "9945239954818338457104/48198861923863451905",
                "residual": "851305116127074769616/48198861923863451905",
                "features": [
                  "1",
                  "58",
                  "225",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 226,
                "observed": "23",
                "fitted": "541891180159623057445/9639772384772690381",
                "residual": "-320176415309851178682/9639772384772690381",
                "features": [
                  "1",
                  "224",
                  "226",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 229,
                "observed": "114",
                "fitted": "5765716001864133538406/48198861923863451905",
                "residual": "-271045742543700021236/48198861923863451905",
                "features": [
                  "1",
                  "23",
                  "229",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 230,
                "observed": "157",
                "fitted": "8517399744726801999999/48198861923863451905",
                "residual": "-950178422680240050914/48198861923863451905",
                "features": [
                  "1",
                  "114",
                  "230",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 231,
                "observed": "104",
                "fitted": "6571557993401262619531/96397723847726903810",
                "residual": "3453805286762335376709/96397723847726903810",
                "features": [
                  "1",
                  "157",
                  "231",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 232,
                "observed": "52",
                "fitted": "9775769904773475159281/48198861923863451905",
                "residual": "-7269429084732575660221/48198861923863451905",
                "features": [
                  "1",
                  "104",
                  "232",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 233,
                "observed": "132",
                "fitted": "2781509795211675547664/48198861923863451905",
                "residual": "3580739978738300103796/48198861923863451905",
                "features": [
                  "1",
                  "52",
                  "233",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 236,
                "observed": "43",
                "fitted": "5495426323627909947914/48198861923863451905",
                "residual": "-3422875260901781515999/48198861923863451905",
                "features": [
                  "1",
                  "160",
                  "236",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 237,
                "observed": "8",
                "fitted": "8477554930927973364179/48198861923863451905",
                "residual": "-8091964035537065748939/48198861923863451905",
                "features": [
                  "1",
                  "43",
                  "237",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 238,
                "observed": "58",
                "fitted": "1332940402826330312779/19279544769545380762",
                "residual": "-214726806192698228583/19279544769545380762",
                "features": [
                  "1",
                  "8",
                  "238",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 239,
                "observed": "490",
                "fitted": "9708227390922075014486/48198861923863451905",
                "residual": "13909214951771016418964/48198861923863451905",
                "features": [
                  "1",
                  "58",
                  "239",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 240,
                "observed": "74",
                "fitted": "2177739808342490989113/48198861923863451905",
                "residual": "1388975974023404451857/48198861923863451905",
                "features": [
                  "1",
                  "490",
                  "240",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 243,
                "observed": "61",
                "fitted": "5435639165791229825632/48198861923863451905",
                "residual": "-2495508588435559259427/48198861923863451905",
                "features": [
                  "1",
                  "107",
                  "243",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 244,
                "observed": "32",
                "fitted": "8339106304941990156408/48198861923863451905",
                "residual": "-6796742723378359695448/48198861923863451905",
                "features": [
                  "1",
                  "61",
                  "244",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 245,
                "observed": "91",
                "fitted": "1274901973226890164809/19279544769545380762",
                "residual": "479536600801739484533/19279544769545380762",
                "features": [
                  "1",
                  "32",
                  "245",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 246,
                "observed": "130",
                "fitted": "1910632028980909780266/9639772384772690381",
                "residual": "-657461618960460030736/9639772384772690381",
                "features": [
                  "1",
                  "91",
                  "246",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 247,
                "observed": "38",
                "fitted": "2458080407151388997044/48198861923863451905",
                "residual": "-626523654044577824654/48198861923863451905",
                "features": [
                  "1",
                  "130",
                  "247",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 250,
                "observed": "73",
                "fitted": "1067415045576189918157/9639772384772690381",
                "residual": "-363711661487783520344/9639772384772690381",
                "features": [
                  "1",
                  "89",
                  "250",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 251,
                "observed": "121",
                "fitted": "8207305126968624110791/48198861923863451905",
                "residual": "-2375242834181146430286/48198861923863451905",
                "features": [
                  "1",
                  "73",
                  "251",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 252,
                "observed": "132",
                "fitted": "1188057935572775647505/19279544769545380762",
                "residual": "1356841974007214613079/19279544769545380762",
                "features": [
                  "1",
                  "121",
                  "252",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 253,
                "observed": "60",
                "fitted": "9389229634870199905302/48198861923863451905",
                "residual": "-6497297919438392791002/48198861923863451905",
                "features": [
                  "1",
                  "132",
                  "253",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 254,
                "observed": "28",
                "fitted": "483425537070091500173/9639772384772690381",
                "residual": "-213511910296456169505/9639772384772690381",
                "features": [
                  "1",
                  "60",
                  "254",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 257,
                "observed": "104",
                "fitted": "5259561542010623702759/48198861923863451905",
                "residual": "-246879901928824704639/48198861923863451905",
                "features": [
                  "1",
                  "52",
                  "257",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 258,
                "observed": "87",
                "fitted": "619573361304254132181/3707604763374111685",
                "residual": "-297011746890706415586/3707604763374111685",
                "features": [
                  "1",
                  "104",
                  "258",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 259,
                "observed": "69",
                "fitted": "5778614858110609299319/96397723847726903810",
                "residual": "872828087382547063571/96397723847726903810",
                "features": [
                  "1",
                  "87",
                  "259",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 260,
                "observed": "15",
                "fitted": "1868104311410909677322/9639772384772690381",
                "residual": "-1723507725639319321607/9639772384772690381",
                "features": [
                  "1",
                  "69",
                  "260",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 261,
                "observed": "6",
                "fitted": "180652097192073422747/3707604763374111685",
                "residual": "-158406468611828752637/3707604763374111685",
                "features": [
                  "1",
                  "15",
                  "261",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 264,
                "observed": "420",
                "fitted": "5182047856140297814733/48198861923863451905",
                "residual": "15061474151882351985367/48198861923863451905",
                "features": [
                  "1",
                  "15",
                  "264",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 265,
                "observed": "122",
                "fitted": "1517169697268533624720/9639772384772690381",
                "residual": "-341117466326265398238/9639772384772690381",
                "features": [
                  "1",
                  "420",
                  "265",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 266,
                "observed": "58",
                "fitted": "5464048734067145631571/96397723847726903810",
                "residual": "127019249101014789409/96397723847726903810",
                "features": [
                  "1",
                  "122",
                  "266",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 267,
                "observed": "107",
                "fitted": "1846840452625909625850/9639772384772690381",
                "residual": "-815384807455231755083/9639772384772690381",
                "features": [
                  "1",
                  "58",
                  "267",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 268,
                "observed": "24",
                "fitted": "2128043445355359621374/48198861923863451905",
                "residual": "-971270759182636775654/48198861923863451905",
                "features": [
                  "1",
                  "107",
                  "268",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 273,
                "observed": "37",
                "fitted": "1071553862883803942263/19279544769545380762",
                "residual": "-358210706410624854069/19279544769545380762",
                "features": [
                  "1",
                  "63",
                  "273",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 274,
                "observed": "112",
                "fitted": "1827792409845115295096/9639772384772690381",
                "residual": "-748137902750573972424/9639772384772690381",
                "features": [
                  "1",
                  "37",
                  "274",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 275,
                "observed": "166",
                "fitted": "400799524679342719654/9639772384772690381",
                "residual": "1199402691192923883592/9639772384772690381",
                "features": [
                  "1",
                  "112",
                  "275",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 278,
                "observed": "95",
                "fitted": "4943927384241931511756/48198861923863451905",
                "residual": "-365035501474903580781/48198861923863451905",
                "features": [
                  "1",
                  "16",
                  "278",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 279,
                "observed": "184",
                "fitted": "7708906023129834297657/48198861923863451905",
                "residual": "1159684570861040852863/48198861923863451905",
                "features": [
                  "1",
                  "95",
                  "279",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 280,
                "observed": "16",
                "fitted": "4852643014013864061819/96397723847726903810",
                "residual": "-3310279432450233600859/96397723847726903810",
                "features": [
                  "1",
                  "184",
                  "280",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 281,
                "observed": "27",
                "fitted": "1808744367064320964342/9639772384772690381",
                "residual": "-1548470512675458324055/9639772384772690381",
                "features": [
                  "1",
                  "16",
                  "281",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 282,
                "observed": "29",
                "fitted": "1979663521627325007476/48198861923863451905",
                "residual": "-581896525835284902231/48198861923863451905",
                "features": [
                  "1",
                  "27",
                  "282",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 285,
                "observed": "117",
                "fitted": "948908763628058196848/9639772384772690381",
                "residual": "178944605390346577729/9639772384772690381",
                "features": [
                  "1",
                  "89",
                  "285",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 286,
                "observed": "131",
                "fitted": "1513205153027087929690/9639772384772690381",
                "residual": "-250394970621865489779/9639772384772690381",
                "features": [
                  "1",
                  "117",
                  "286",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 287,
                "observed": "85",
                "fitted": "946613739668100763451/19279544769545380762",
                "residual": "692147565743256601319/19279544769545380762",
                "features": [
                  "1",
                  "131",
                  "287",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 288,
                "observed": "144",
                "fitted": "136134921557359626702/741520952674822337",
                "residual": "-29355904372185210174/741520952674822337",
                "features": [
                  "1",
                  "85",
                  "288",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 289,
                "observed": "100",
                "fitted": "1731532003433158624164/48198861923863451905",
                "residual": "3088354188953186566336/48198861923863451905",
                "features": [
                  "1",
                  "144",
                  "289",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 292,
                "observed": "42",
                "fitted": "4634900800208982145803/48198861923863451905",
                "residual": "-2610548599406717165793/48198861923863451905",
                "features": [
                  "1",
                  "81",
                  "292",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 293,
                "observed": "398",
                "fitted": "7530612583345022454066/48198861923863451905",
                "residual": "11652534462352631404124/48198861923863451905",
                "features": [
                  "1",
                  "42",
                  "293",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 294,
                "observed": "11",
                "fitted": "3904433261321312942931/96397723847726903810",
                "residual": "-2844058298996317001021/96397723847726903810",
                "features": [
                  "1",
                  "398",
                  "294",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 295,
                "observed": "58",
                "fitted": "8812248811435855680887/48198861923863451905",
                "residual": "-6016714819851775470397/48198861923863451905",
                "features": [
                  "1",
                  "11",
                  "295",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 296,
                "observed": "127",
                "fitted": "1708305809665872893729/48198861923863451905",
                "residual": "4412949654664785498206/48198861923863451905",
                "features": [
                  "1",
                  "58",
                  "296",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 299,
                "observed": "48",
                "fitted": "4529689414286084748802/48198861923863451905",
                "residual": "-2216144041940639057362/48198861923863451905",
                "features": [
                  "1",
                  "69",
                  "299",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 300,
                "observed": "17",
                "fitted": "569650681029559505431/3707604763374111685",
                "residual": "-506621400052199606786/3707604763374111685",
                "features": [
                  "1",
                  "48",
                  "300",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 301,
                "observed": "125",
                "fitted": "4511646595027429093871/96397723847726903810",
                "residual": "7538068885938433882379/96397723847726903810",
                "features": [
                  "1",
                  "17",
                  "301",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 302,
                "observed": "80",
                "fitted": "8567441017247997878652/48198861923863451905",
                "residual": "-4711532063338921726252/48198861923863451905",
                "features": [
                  "1",
                  "125",
                  "302",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 303,
                "observed": "111",
                "fitted": "1565425551671478244522/48198861923863451905",
                "residual": "3784648121877364916933/48198861923863451905",
                "features": [
                  "1",
                  "80",
                  "303",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 306,
                "observed": "23",
                "fitted": "892872543287778064945/9639772384772690381",
                "residual": "-671157778438006186182/9639772384772690381",
                "features": [
                  "1",
                  "21",
                  "306",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 307,
                "observed": "20",
                "fitted": "7314650271488713358269/48198861923863451905",
                "residual": "-6350673033011444320169/48198861923863451905",
                "features": [
                  "1",
                  "23",
                  "307",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 308,
                "observed": "49",
                "fitted": "4267986583118548489099/96397723847726903810",
                "residual": "455501885420069797591/96397723847726903810",
                "features": [
                  "1",
                  "20",
                  "308",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 309,
                "observed": "13",
                "fitted": "8533135743459683544627/48198861923863451905",
                "residual": "-7906550538449458669862/48198861923863451905",
                "features": [
                  "1",
                  "49",
                  "309",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 310,
                "observed": "34",
                "fitted": "1521149105864238167266/48198861923863451905",
                "residual": "117612199547119197504/48198861923863451905",
                "features": [
                  "1",
                  "13",
                  "310",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 313,
                "observed": "123",
                "fitted": "4340316894480244301621/48198861923863451905",
                "residual": "1588143122154960282694/48198861923863451905",
                "features": [
                  "1",
                  "26",
                  "313",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 314,
                "observed": "46",
                "fitted": "1417070637866059120212/9639772384772690381",
                "residual": "-973641108166515362686/9639772384772690381",
                "features": [
                  "1",
                  "123",
                  "314",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 315,
                "observed": "25",
                "fitted": "3973362803112936307813/96397723847726903810",
                "residual": "-1563419706919763712563/96397723847726903810",
                "features": [
                  "1",
                  "46",
                  "315",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 316,
                "observed": "243",
                "fitted": "8441219253562020471934/48198861923863451905",
                "residual": "3271104193936798340981/48198861923863451905",
                "features": [
                  "1",
                  "25",
                  "316",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 317,
                "observed": "187",
                "fitted": "1147823983432448563387/48198861923863451905",
                "residual": "7865363196330016942848/48198861923863451905",
                "features": [
                  "1",
                  "243",
                  "317",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 320,
                "observed": "69",
                "fitted": "322283175420856125377/3707604763374111685",
                "residual": "-66458446748042419112/3707604763374111685",
                "features": [
                  "1",
                  "55",
                  "320",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 321,
                "observed": "21",
                "fitted": "7026673939495718339137/48198861923863451905",
                "residual": "-6014497839094585849132/48198861923863451905",
                "features": [
                  "1",
                  "69",
                  "321",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 322,
                "observed": "39",
                "fitted": "758349127864363176629/19279544769545380762",
                "residual": "-6446881852093326911/19279544769545380762",
                "features": [
                  "1",
                  "21",
                  "322",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 323,
                "observed": "26",
                "fitted": "8307202259584448705599/48198861923863451905",
                "residual": "-7054031849563998956069/48198861923863451905",
                "features": [
                  "1",
                  "39",
                  "323",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 324,
                "observed": "13",
                "fitted": "1269733737940637539981/48198861923863451905",
                "residual": "-643148532930412665216/48198861923863451905",
                "features": [
                  "1",
                  "26",
                  "324",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 327,
                "observed": "76",
                "fitted": "62497103607787308088/741520952674822337",
                "residual": "-6141511204500810476/741520952674822337",
                "features": [
                  "1",
                  "63",
                  "327",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              },
              {
                "index": 328,
                "observed": "16",
                "fitted": "1380082460306573319063/9639772384772690381",
                "residual": "-1225846102150210272967/9639772384772690381",
                "features": [
                  "1",
                  "76",
                  "328",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1"
                ]
              },
              {
                "index": 329,
                "observed": "17",
                "fitted": "3565812155446581044117/96397723847726903810",
                "residual": "-1927050850035223679347/96397723847726903810",
                "features": [
                  "1",
                  "16",
                  "329",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 330,
                "observed": "117",
                "fitted": "8213069953682579912188/48198861923863451905",
                "residual": "-2573803108590556039303/48198861923863451905",
                "features": [
                  "1",
                  "17",
                  "330",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 331,
                "observed": "90",
                "fitted": "1050407827801145526003/48198861923863451905",
                "residual": "3287489745346565145447/48198861923863451905",
                "features": [
                  "1",
                  "117",
                  "331",
                  "0",
                  "1",
                  "0",
                  "0",
                  "0",
                  "0"
                ]
              },
              {
                "index": 334,
                "observed": "149",
                "fitted": "3871791432421357381076/48198861923863451905",
                "residual": "3309838994234296952769/48198861923863451905",
                "features": [
                  "1",
                  "128",
                  "334",
                  "0",
                  "0",
                  "0",
                  "0",
                  "1",
                  "0"
                ]
              }
            ]
          }
        },
        "plotPoints": [
          {
            "label": "Actual recorded values",
            "x": [
              311,
              312,
              313,
              314,
              315,
              316,
              317,
              318,
              319,
              320,
              321,
              322,
              323,
              324,
              325,
              326,
              327,
              328,
              329,
              330,
              331,
              332,
              333,
              334,
              335,
              336,
              337,
              338,
              339,
              340,
              341,
              342,
              343,
              344,
              345,
              346,
              347,
              348,
              349,
              350,
              351,
              352,
              353,
              354,
              355,
              356,
              357,
              358,
              359,
              360,
              361,
              362,
              363,
              364,
              365,
              366,
              367,
              368,
              369,
              370,
              371,
              372,
              373
            ],
            "y": [
              null,
              26.0,
              123.0,
              46.0,
              25.0,
              243.0,
              187.0,
              null,
              55.0,
              69.0,
              21.0,
              39.0,
              26.0,
              13.0,
              null,
              63.0,
              76.0,
              16.0,
              17.0,
              117.0,
              90.0,
              null,
              128.0,
              149.0,
              39.0,
              80.0,
              1265.0,
              85.0,
              null,
              86.0,
              95.0,
              97.0,
              113.0,
              71.0,
              134.0,
              null,
              65.0,
              380.0,
              457.0,
              157.0,
              102.0,
              125.0,
              null,
              101.0,
              36.0,
              253.0,
              248.0,
              131.0,
              222.0,
              null,
              8.0,
              133.0,
              116.0,
              311.0,
              41.0,
              117.0,
              null,
              8.0,
              298.0,
              39.0,
              200.0,
              108.0,
              null
            ]
          },
          {
            "label": "Declared model forecast",
            "x": [
              335,
              336,
              337,
              338,
              339,
              340,
              341,
              342,
              343,
              344,
              345,
              346,
              347,
              348,
              349,
              350,
              351,
              352,
              353,
              354,
              355,
              356,
              357,
              358,
              359,
              360,
              361,
              362,
              363,
              364,
              365,
              366,
              367,
              368,
              369,
              370,
              371,
              372,
              373
            ],
            "y": [
              139.0287751195536,
              31.703969146514762,
              167.60298281347522,
              18.171343913621747,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null
            ]
          }
        ],
        "plotFile": "metr14-plots/realdata-company-python.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    },
    "r": {
      "country": {
        "api": "realdata",
        "variant": "country",
        "language": "r",
        "codeFile": "metr14-code/realdata-country.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"realdata-country-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"realdata\",\"country\",dest)\n",
        "codeSHA": "42459bdb5971d3d03d6fba0f25e289e9f077e3d8d75985be94792291f0b955b7",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"realdata\",\"variant\":\"country\",\"summary\":{\"origin\":3.5e+01,\"trainingObserved\":3.5e+01,\"forecastDefined\":1e+01,\"scorePairs\":1e+01,\"MAE\":3.3062221571294322e+02,\"MSE\":2.1963521486211472e+05},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "origin": 35.0,
          "trainingObserved": 35.0,
          "forecastDefined": 10.0,
          "scorePairs": 10.0,
          "MAE": 330.6222157129432,
          "MSE": 219635.21486211472
        },
        "fullResult": {
          "profile": [
            {
              "id": "country-ar1-trend",
              "kind": "country",
              "model": "AR",
              "origin": 35,
              "horizon": 10,
              "arOrder": 1,
              "trend": true,
              "season": null,
              "d": null,
              "baselinePeriod": null
            }
          ],
          "originalCalendar": [
            {
              "index": 0,
              "timeLabel": "1980",
              "y": 4139.9606854608
            },
            {
              "index": 1,
              "timeLabel": "1981",
              "y": 4377.64026742067
            },
            {
              "index": 2,
              "timeLabel": "1982",
              "y": 4675.53053701243
            },
            {
              "index": 3,
              "timeLabel": "1983",
              "y": 5227.53893142287
            },
            {
              "index": 4,
              "timeLabel": "1984",
              "y": 5712.63984757483
            },
            {
              "index": 5,
              "timeLabel": "1985",
              "y": 6105.74268983951
            },
            {
              "index": 6,
              "timeLabel": "1986",
              "y": 6740.69941617276
            },
            {
              "index": 7,
              "timeLabel": "1987",
              "y": 7535.12660432782
            },
            {
              "index": 8,
              "timeLabel": "1988",
              "y": 8367.04656522944
            },
            {
              "index": 9,
              "timeLabel": "1989",
              "y": 8878.29655251462
            },
            {
              "index": 10,
              "timeLabel": "1990",
              "y": 9672.57845182894
            },
            {
              "index": 11,
              "timeLabel": "1991",
              "y": 10618.8431439122
            },
            {
              "index": 12,
              "timeLabel": "1992",
              "y": 11176.560685871
            },
            {
              "index": 13,
              "timeLabel": "1993",
              "y": 11837.4692053797
            },
            {
              "index": 14,
              "timeLabel": "1994",
              "y": 12817.2447824958
            },
            {
              "index": 15,
              "timeLabel": "1995",
              "y": 13924.3044000347
            },
            {
              "index": 16,
              "timeLabel": "1996",
              "y": 14894.3278834104
            },
            {
              "index": 17,
              "timeLabel": "1997",
              "y": 15682.2717905189
            },
            {
              "index": 18,
              "timeLabel": "1998",
              "y": 14800.5091573641
            },
            {
              "index": 19,
              "timeLabel": "1999",
              "y": 16402.9168341094
            },
            {
              "index": 20,
              "timeLabel": "2000",
              "y": 17763.1353417297
            },
            {
              "index": 21,
              "timeLabel": "2001",
              "y": 18460.4288193829
            },
            {
              "index": 22,
              "timeLabel": "2002",
              "y": 19775.3800655139
            },
            {
              "index": 23,
              "timeLabel": "2003",
              "y": 20278.0406421178
            },
            {
              "index": 24,
              "timeLabel": "2004",
              "y": 21244.8136800528
            },
            {
              "index": 25,
              "timeLabel": "2005",
              "y": 22123.7613066851
            },
            {
              "index": 26,
              "timeLabel": "2006",
              "y": 23162.1860111297
            },
            {
              "index": 27,
              "timeLabel": "2007",
              "y": 24391.7651013448
            },
            {
              "index": 28,
              "timeLabel": "2008",
              "y": 24934.5396367691
            },
            {
              "index": 29,
              "timeLabel": "2009",
              "y": 25009.9148311999
            },
            {
              "index": 30,
              "timeLabel": "2010",
              "y": 26623.0487122927
            },
            {
              "index": 31,
              "timeLabel": "2011",
              "y": 27393.455357272
            },
            {
              "index": 32,
              "timeLabel": "2012",
              "y": 27944.0564190045
            },
            {
              "index": 33,
              "timeLabel": "2013",
              "y": 28732.711152033
            },
            {
              "index": 34,
              "timeLabel": "2014",
              "y": 29470.6732991655
            },
            {
              "index": 35,
              "timeLabel": "2015",
              "y": 30171.7906545222
            },
            {
              "index": 36,
              "timeLabel": "2016",
              "y": 31005.4072876388
            },
            {
              "index": 37,
              "timeLabel": "2017",
              "y": 31979.9027302467
            },
            {
              "index": 38,
              "timeLabel": "2018",
              "y": 32852.8887488942
            },
            {
              "index": 39,
              "timeLabel": "2019",
              "y": 33496.3113815643
            },
            {
              "index": 40,
              "timeLabel": "2020",
              "y": 33215.9298928108
            },
            {
              "index": 41,
              "timeLabel": "2021",
              "y": 34792.9397214598
            },
            {
              "index": 42,
              "timeLabel": "2022",
              "y": 35809.0138105144
            },
            {
              "index": 43,
              "timeLabel": "2023",
              "y": 36347.7036392553
            },
            {
              "index": 44,
              "timeLabel": "2024",
              "y": 37048.4264001496
            }
          ],
          "result": {
            "metrics": {
              "origin": 35.0,
              "trainingCalendar": 35.0,
              "trainingObserved": 35.0,
              "horizon": 10.0,
              "forecastDefined": 10.0,
              "scorePairs": 10.0,
              "MAE": 330.6222157129432,
              "MSE": 219635.21486211472,
              "fitRows": 34.0,
              "rank": 3.0,
              "parameters": 3.0,
              "df": 31.0,
              "RSS": 4736840.951796707,
              "residualVariance": 152801.32102570022,
              "coefficient:intercept": 1092.883765644478,
              "coefficient:ARlag1": 0.6516848776732997,
              "coefficient:time-from-trendOrigin": 285.36587905176054
            },
            "pred": [
              30286.281656372546,
              31103.167167920103,
              31920.884981637824,
              32739.145194093497,
              33557.75887960436,
              34376.60291815996,
              35195.597074311336,
              36014.689059829754,
              36833.84479926726,
              37653.042086169735
            ],
            "actual": [
              30171.7906545222,
              31005.4072876388,
              31979.9027302467,
              32852.8887488942,
              33496.3113815643,
              33215.9298928108,
              34792.9397214598,
              35809.0138105144,
              36347.7036392553,
              37048.4264001496
            ],
            "error": [
              -114.49100185034695,
              -97.75988028130087,
              59.01774860887599,
              113.74355480070153,
              -61.44749804005551,
              -1160.6730253491623,
              -402.6573528515364,
              -205.67524931535445,
              -486.1411600119609,
              -604.6156860201372
            ],
            "fit": {
              "part": [
                1092.883765644478,
                0.6516848776732997,
                285.36587905176054
              ],
              "basis": [
                [],
                [],
                []
              ],
              "rank": 3,
              "df": 31,
              "rss": 4736840.951796707,
              "fitted": [
                4076.19941757303,
                4516.45748591975,
                4995.953948870482,
                5641.055350908246,
                6242.554161161702,
                6784.099217887746,
                7483.25679346783,
                8286.338857452763,
                9113.854394458675,
                9732.394158934852,
                10535.381540379381,
                11437.413809537984,
                12086.23577669742,
                12802.30574343845,
                13726.1765496104,
                14732.996440095048,
                15650.511954250731,
                16449.368962019915,
                16160.103467347304,
                17489.734197201586,
                18661.533908000834,
                19401.31540173941,
                20543.615122772404,
                21156.55729819947,
                22071.954546215744,
                22930.117301810613,
                23892.208857351285,
                24978.872835399525,
                25617.956671173448,
                25952.443424587447,
                27289.064259609826,
                28076.492498853615,
                28720.67676346731,
                29519.997005739217
              ],
              "residual": [
                301.44084984764004,
                159.07305109267963,
                231.58498255238737,
                71.58449666658453,
                -136.81147132219212,
                -43.3998017149861,
                51.86981085999014,
                80.70770777667713,
                -235.55784194405533,
                -59.815707105912225,
                83.46160353281812,
                -260.8531236669842,
                -248.76657131771935,
                14.939039057349873,
                198.12785042430005,
                161.33144331535186,
                31.759836268169238,
                -1648.8598046558145,
                242.81336676209685,
                273.40114452811395,
                -201.10508861793278,
                374.0646637744867,
                -265.57448065460267,
                88.25638185333082,
                51.80676046935696,
                232.06870931908634,
                499.55624399351655,
                -44.33319863042561,
                -608.0418399735463,
                670.6052877052534,
                104.3910976621737,
                -132.43607984911432,
                12.034388565691188,
                -49.323706573715754
              ],
              "X": [
                [
                  1.0,
                  4139.9606854608,
                  1.0
                ],
                [
                  1.0,
                  4377.64026742067,
                  2.0
                ],
                [
                  1.0,
                  4675.53053701243,
                  3.0
                ],
                [
                  1.0,
                  5227.53893142287,
                  4.0
                ],
                [
                  1.0,
                  5712.63984757483,
                  5.0
                ],
                [
                  1.0,
                  6105.74268983951,
                  6.0
                ],
                [
                  1.0,
                  6740.69941617276,
                  7.0
                ],
                [
                  1.0,
                  7535.12660432782,
                  8.0
                ],
                [
                  1.0,
                  8367.04656522944,
                  9.0
                ],
                [
                  1.0,
                  8878.29655251462,
                  10.0
                ],
                [
                  1.0,
                  9672.57845182894,
                  11.0
                ],
                [
                  1.0,
                  10618.8431439122,
                  12.0
                ],
                [
                  1.0,
                  11176.560685871,
                  13.0
                ],
                [
                  1.0,
                  11837.4692053797,
                  14.0
                ],
                [
                  1.0,
                  12817.2447824958,
                  15.0
                ],
                [
                  1.0,
                  13924.3044000347,
                  16.0
                ],
                [
                  1.0,
                  14894.3278834104,
                  17.0
                ],
                [
                  1.0,
                  15682.2717905189,
                  18.0
                ],
                [
                  1.0,
                  14800.5091573641,
                  19.0
                ],
                [
                  1.0,
                  16402.9168341094,
                  20.0
                ],
                [
                  1.0,
                  17763.1353417297,
                  21.0
                ],
                [
                  1.0,
                  18460.4288193829,
                  22.0
                ],
                [
                  1.0,
                  19775.3800655139,
                  23.0
                ],
                [
                  1.0,
                  20278.0406421178,
                  24.0
                ],
                [
                  1.0,
                  21244.8136800528,
                  25.0
                ],
                [
                  1.0,
                  22123.7613066851,
                  26.0
                ],
                [
                  1.0,
                  23162.1860111297,
                  27.0
                ],
                [
                  1.0,
                  24391.7651013448,
                  28.0
                ],
                [
                  1.0,
                  24934.5396367691,
                  29.0
                ],
                [
                  1.0,
                  25009.9148311999,
                  30.0
                ],
                [
                  1.0,
                  26623.0487122927,
                  31.0
                ],
                [
                  1.0,
                  27393.455357272,
                  32.0
                ],
                [
                  1.0,
                  27944.0564190045,
                  33.0
                ],
                [
                  1.0,
                  28732.711152033,
                  34.0
                ]
              ],
              "Y": [
                4377.64026742067,
                4675.53053701243,
                5227.53893142287,
                5712.63984757483,
                6105.74268983951,
                6740.69941617276,
                7535.12660432782,
                8367.04656522944,
                8878.29655251462,
                9672.57845182894,
                10618.8431439122,
                11176.560685871,
                11837.4692053797,
                12817.2447824958,
                13924.3044000347,
                14894.3278834104,
                15682.2717905189,
                14800.5091573641,
                16402.9168341094,
                17763.1353417297,
                18460.4288193829,
                19775.3800655139,
                20278.0406421178,
                21244.8136800528,
                22123.7613066851,
                23162.1860111297,
                24391.7651013448,
                24934.5396367691,
                25009.9148311999,
                26623.0487122927,
                27393.455357272,
                27944.0564190045,
                28732.711152033,
                29470.6732991655
              ],
              "used": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                9,
                10,
                11,
                12,
                13,
                14,
                15,
                16,
                17,
                18,
                19,
                20,
                21,
                22,
                23,
                24,
                25,
                26,
                27,
                28,
                29,
                30,
                31,
                32,
                33,
                34
              ],
              "train": [
                {
                  "index": 0,
                  "timeLabel": "1980",
                  "y": 4139.9606854608
                },
                {
                  "index": 1,
                  "timeLabel": "1981",
                  "y": 4377.64026742067
                },
                {
                  "index": 2,
                  "timeLabel": "1982",
                  "y": 4675.53053701243
                },
                {
                  "index": 3,
                  "timeLabel": "1983",
                  "y": 5227.53893142287
                },
                {
                  "index": 4,
                  "timeLabel": "1984",
                  "y": 5712.63984757483
                },
                {
                  "index": 5,
                  "timeLabel": "1985",
                  "y": 6105.74268983951
                },
                {
                  "index": 6,
                  "timeLabel": "1986",
                  "y": 6740.69941617276
                },
                {
                  "index": 7,
                  "timeLabel": "1987",
                  "y": 7535.12660432782
                },
                {
                  "index": 8,
                  "timeLabel": "1988",
                  "y": 8367.04656522944
                },
                {
                  "index": 9,
                  "timeLabel": "1989",
                  "y": 8878.29655251462
                },
                {
                  "index": 10,
                  "timeLabel": "1990",
                  "y": 9672.57845182894
                },
                {
                  "index": 11,
                  "timeLabel": "1991",
                  "y": 10618.8431439122
                },
                {
                  "index": 12,
                  "timeLabel": "1992",
                  "y": 11176.560685871
                },
                {
                  "index": 13,
                  "timeLabel": "1993",
                  "y": 11837.4692053797
                },
                {
                  "index": 14,
                  "timeLabel": "1994",
                  "y": 12817.2447824958
                },
                {
                  "index": 15,
                  "timeLabel": "1995",
                  "y": 13924.3044000347
                },
                {
                  "index": 16,
                  "timeLabel": "1996",
                  "y": 14894.3278834104
                },
                {
                  "index": 17,
                  "timeLabel": "1997",
                  "y": 15682.2717905189
                },
                {
                  "index": 18,
                  "timeLabel": "1998",
                  "y": 14800.5091573641
                },
                {
                  "index": 19,
                  "timeLabel": "1999",
                  "y": 16402.9168341094
                },
                {
                  "index": 20,
                  "timeLabel": "2000",
                  "y": 17763.1353417297
                },
                {
                  "index": 21,
                  "timeLabel": "2001",
                  "y": 18460.4288193829
                },
                {
                  "index": 22,
                  "timeLabel": "2002",
                  "y": 19775.3800655139
                },
                {
                  "index": 23,
                  "timeLabel": "2003",
                  "y": 20278.0406421178
                },
                {
                  "index": 24,
                  "timeLabel": "2004",
                  "y": 21244.8136800528
                },
                {
                  "index": 25,
                  "timeLabel": "2005",
                  "y": 22123.7613066851
                },
                {
                  "index": 26,
                  "timeLabel": "2006",
                  "y": 23162.1860111297
                },
                {
                  "index": 27,
                  "timeLabel": "2007",
                  "y": 24391.7651013448
                },
                {
                  "index": 28,
                  "timeLabel": "2008",
                  "y": 24934.5396367691
                },
                {
                  "index": 29,
                  "timeLabel": "2009",
                  "y": 25009.9148311999
                },
                {
                  "index": 30,
                  "timeLabel": "2010",
                  "y": 26623.0487122927
                },
                {
                  "index": 31,
                  "timeLabel": "2011",
                  "y": 27393.455357272
                },
                {
                  "index": 32,
                  "timeLabel": "2012",
                  "y": 27944.0564190045
                },
                {
                  "index": 33,
                  "timeLabel": "2013",
                  "y": 28732.711152033
                },
                {
                  "index": 34,
                  "timeLabel": "2014",
                  "y": 29470.6732991655
                }
              ],
              "z": [
                4139.9606854608,
                4377.64026742067,
                4675.53053701243,
                5227.53893142287,
                5712.63984757483,
                6105.74268983951,
                6740.69941617276,
                7535.12660432782,
                8367.04656522944,
                8878.29655251462,
                9672.57845182894,
                10618.8431439122,
                11176.560685871,
                11837.4692053797,
                12817.2447824958,
                13924.3044000347,
                14894.3278834104,
                15682.2717905189,
                14800.5091573641,
                16402.9168341094,
                17763.1353417297,
                18460.4288193829,
                19775.3800655139,
                20278.0406421178,
                21244.8136800528,
                22123.7613066851,
                23162.1860111297,
                24391.7651013448,
                24934.5396367691,
                25009.9148311999,
                26623.0487122927,
                27393.455357272,
                27944.0564190045,
                28732.711152033,
                29470.6732991655
              ],
              "names": [
                "intercept",
                "ARlag1",
                "time-from-trendOrigin"
              ],
              "delta": 1.0
            }
          }
        },
        "plotPoints": [
          {
            "label": "Actual recorded values",
            "x": [
              2010.0,
              2011.0,
              2012.0,
              2013.0,
              2014.0,
              2015.0,
              2016.0,
              2017.0,
              2018.0,
              2019.0,
              2020.0,
              2021.0,
              2022.0,
              2023.0,
              2024.0
            ],
            "y": [
              26623.0487122927,
              27393.455357272,
              27944.0564190045,
              28732.711152033,
              29470.6732991655,
              30171.7906545222,
              31005.4072876388,
              31979.9027302467,
              32852.8887488942,
              33496.3113815643,
              33215.9298928108,
              34792.9397214598,
              35809.0138105144,
              36347.7036392553,
              37048.4264001496
            ]
          },
          {
            "label": "Declared model forecast",
            "x": [
              2015.0,
              2016.0,
              2017.0,
              2018.0,
              2019.0,
              2020.0,
              2021.0,
              2022.0,
              2023.0,
              2024.0
            ],
            "y": [
              30286.281656372546,
              31103.167167920103,
              31920.884981637824,
              32739.145194093497,
              33557.75887960436,
              34376.60291815996,
              35195.597074311336,
              36014.689059829754,
              36833.84479926726,
              37653.042086169735
            ]
          }
        ],
        "plotFile": "metr14-plots/realdata-country-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "person": {
        "api": "realdata",
        "variant": "person",
        "language": "r",
        "codeFile": "metr14-code/realdata-person.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"realdata-person-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"realdata\",\"person\",dest)\n",
        "codeSHA": "0f26c9d532ecb41e2e11365e4054e31ee9d2832b13b69a65caf207b40b71b368",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"realdata\",\"variant\":\"person\",\"summary\":{\"origin\":6.72e+02,\"trainingObserved\":6.7e+02,\"forecastDefined\":1.68e+02,\"scorePairs\":1.67e+02,\"MAE\":1.1951193612774451e+00,\"MSE\":2.8571128460146378e+00},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "origin": 672.0,
          "trainingObserved": 670.0,
          "forecastDefined": 168.0,
          "scorePairs": 167.0,
          "MAE": 1.1951193612774451,
          "MSE": 2.8571128460146378
        },
        "fullResult": {
          "profile": [
            {
              "id": "person-seasonal24",
              "kind": "person",
              "model": "seasonalNaive",
              "origin": 672,
              "horizon": 168,
              "arOrder": null,
              "trend": null,
              "season": null,
              "d": null,
              "baselinePeriod": 24
            }
          ],
          "originalCalendar": [
            {
              "index": 0,
              "timeLabel": "2006-12-17T00:00:00",
              "y": 1.8824666666666667
            },
            {
              "index": 1,
              "timeLabel": "2006-12-17T01:00:00",
              "y": 3.3494
            },
            {
              "index": 2,
              "timeLabel": "2006-12-17T02:00:00",
              "y": 1.5872666666666666
            },
            {
              "index": 3,
              "timeLabel": "2006-12-17T03:00:00",
              "y": 1.6622
            },
            {
              "index": 4,
              "timeLabel": "2006-12-17T04:00:00",
              "y": 2.2157666666666667
            },
            {
              "index": 5,
              "timeLabel": "2006-12-17T05:00:00",
              "y": 1.9967333333333332
            },
            {
              "index": 6,
              "timeLabel": "2006-12-17T06:00:00",
              "y": 1.3033000000000001
            },
            {
              "index": 7,
              "timeLabel": "2006-12-17T07:00:00",
              "y": 1.6200333333333332
            },
            {
              "index": 8,
              "timeLabel": "2006-12-17T08:00:00",
              "y": 1.8905666666666667
            },
            {
              "index": 9,
              "timeLabel": "2006-12-17T09:00:00",
              "y": 2.5490666666666666
            },
            {
              "index": 10,
              "timeLabel": "2006-12-17T10:00:00",
              "y": 3.6289
            },
            {
              "index": 11,
              "timeLabel": "2006-12-17T11:00:00",
              "y": 2.471
            },
            {
              "index": 12,
              "timeLabel": "2006-12-17T12:00:00",
              "y": 1.9158666666666666
            },
            {
              "index": 13,
              "timeLabel": "2006-12-17T13:00:00",
              "y": 1.6607666666666667
            },
            {
              "index": 14,
              "timeLabel": "2006-12-17T14:00:00",
              "y": 2.092633333333333
            },
            {
              "index": 15,
              "timeLabel": "2006-12-17T15:00:00",
              "y": 2.9854
            },
            {
              "index": 16,
              "timeLabel": "2006-12-17T16:00:00",
              "y": 3.326033333333333
            },
            {
              "index": 17,
              "timeLabel": "2006-12-17T17:00:00",
              "y": 3.4067666666666665
            },
            {
              "index": 18,
              "timeLabel": "2006-12-17T18:00:00",
              "y": 3.6971
            },
            {
              "index": 19,
              "timeLabel": "2006-12-17T19:00:00",
              "y": 2.9084
            },
            {
              "index": 20,
              "timeLabel": "2006-12-17T20:00:00",
              "y": 3.3615
            },
            {
              "index": 21,
              "timeLabel": "2006-12-17T21:00:00",
              "y": 3.040766666666667
            },
            {
              "index": 22,
              "timeLabel": "2006-12-17T22:00:00",
              "y": 1.518
            },
            {
              "index": 23,
              "timeLabel": "2006-12-17T23:00:00",
              "y": 0.4377333333333333
            },
            {
              "index": 24,
              "timeLabel": "2006-12-18T00:00:00",
              "y": 0.27636666666666665
            },
            {
              "index": 25,
              "timeLabel": "2006-12-18T01:00:00",
              "y": 0.3133
            },
            {
              "index": 26,
              "timeLabel": "2006-12-18T02:00:00",
              "y": 0.28446666666666665
            },
            {
              "index": 27,
              "timeLabel": "2006-12-18T03:00:00",
              "y": 0.30993333333333334
            },
            {
              "index": 28,
              "timeLabel": "2006-12-18T04:00:00",
              "y": 1.0263333333333333
            },
            {
              "index": 29,
              "timeLabel": "2006-12-18T05:00:00",
              "y": 0.2935
            },
            {
              "index": 30,
              "timeLabel": "2006-12-18T06:00:00",
              "y": 0.61
            },
            {
              "index": 31,
              "timeLabel": "2006-12-18T07:00:00",
              "y": 2.4504333333333332
            },
            {
              "index": 32,
              "timeLabel": "2006-12-18T08:00:00",
              "y": 2.082133333333333
            },
            {
              "index": 33,
              "timeLabel": "2006-12-18T09:00:00",
              "y": 1.6293333333333333
            },
            {
              "index": 34,
              "timeLabel": "2006-12-18T10:00:00",
              "y": 1.3096333333333334
            },
            {
              "index": 35,
              "timeLabel": "2006-12-18T11:00:00",
              "y": 1.5619333333333334
            },
            {
              "index": 36,
              "timeLabel": "2006-12-18T12:00:00",
              "y": 1.7560666666666667
            },
            {
              "index": 37,
              "timeLabel": "2006-12-18T13:00:00",
              "y": 1.6820666666666666
            },
            {
              "index": 38,
              "timeLabel": "2006-12-18T14:00:00",
              "y": 1.7330333333333334
            },
            {
              "index": 39,
              "timeLabel": "2006-12-18T15:00:00",
              "y": 1.7843
            },
            {
              "index": 40,
              "timeLabel": "2006-12-18T16:00:00",
              "y": 1.9493
            },
            {
              "index": 41,
              "timeLabel": "2006-12-18T17:00:00",
              "y": 2.1549
            },
            {
              "index": 42,
              "timeLabel": "2006-12-18T18:00:00",
              "y": 2.4025333333333334
            },
            {
              "index": 43,
              "timeLabel": "2006-12-18T19:00:00",
              "y": 2.6145
            },
            {
              "index": 44,
              "timeLabel": "2006-12-18T20:00:00",
              "y": 3.0505666666666666
            },
            {
              "index": 45,
              "timeLabel": "2006-12-18T21:00:00",
              "y": 2.1697333333333333
            },
            {
              "index": 46,
              "timeLabel": "2006-12-18T22:00:00",
              "y": 1.7388
            },
            {
              "index": 47,
              "timeLabel": "2006-12-18T23:00:00",
              "y": 1.5472666666666666
            },
            {
              "index": 48,
              "timeLabel": "2006-12-19T00:00:00",
              "y": 0.8371333333333333
            },
            {
              "index": 49,
              "timeLabel": "2006-12-19T01:00:00",
              "y": 0.3530333333333333
            },
            {
              "index": 50,
              "timeLabel": "2006-12-19T02:00:00",
              "y": 0.3272333333333333
            },
            {
              "index": 51,
              "timeLabel": "2006-12-19T03:00:00",
              "y": 0.3083
            },
            {
              "index": 52,
              "timeLabel": "2006-12-19T04:00:00",
              "y": 0.3278333333333333
            },
            {
              "index": 53,
              "timeLabel": "2006-12-19T05:00:00",
              "y": 0.30666666666666664
            },
            {
              "index": 54,
              "timeLabel": "2006-12-19T06:00:00",
              "y": 0.7963333333333333
            },
            {
              "index": 55,
              "timeLabel": "2006-12-19T07:00:00",
              "y": 1.7856333333333334
            },
            {
              "index": 56,
              "timeLabel": "2006-12-19T08:00:00",
              "y": 3.879033333333333
            },
            {
              "index": 57,
              "timeLabel": "2006-12-19T09:00:00",
              "y": 1.6177666666666666
            },
            {
              "index": 58,
              "timeLabel": "2006-12-19T10:00:00",
              "y": 0.4371333333333333
            },
            {
              "index": 59,
              "timeLabel": "2006-12-19T11:00:00",
              "y": 2.321633333333333
            },
            {
              "index": 60,
              "timeLabel": "2006-12-19T12:00:00",
              "y": 0.43066666666666664
            },
            {
              "index": 61,
              "timeLabel": "2006-12-19T13:00:00",
              "y": 0.30046666666666666
            },
            {
              "index": 62,
              "timeLabel": "2006-12-19T14:00:00",
              "y": 0.3021333333333333
            },
            {
              "index": 63,
              "timeLabel": "2006-12-19T15:00:00",
              "y": 0.42136666666666667
            },
            {
              "index": 64,
              "timeLabel": "2006-12-19T16:00:00",
              "y": 1.3721333333333334
            },
            {
              "index": 65,
              "timeLabel": "2006-12-19T17:00:00",
              "y": 2.1115
            },
            {
              "index": 66,
              "timeLabel": "2006-12-19T18:00:00",
              "y": 2.2047
            },
            {
              "index": 67,
              "timeLabel": "2006-12-19T19:00:00",
              "y": 1.8421
            },
            {
              "index": 68,
              "timeLabel": "2006-12-19T20:00:00",
              "y": 2.940533333333333
            },
            {
              "index": 69,
              "timeLabel": "2006-12-19T21:00:00",
              "y": 1.4428666666666667
            },
            {
              "index": 70,
              "timeLabel": "2006-12-19T22:00:00",
              "y": 0.72
            },
            {
              "index": 71,
              "timeLabel": "2006-12-19T23:00:00",
              "y": 0.3837
            },
            {
              "index": 72,
              "timeLabel": "2006-12-20T00:00:00",
              "y": 0.4598333333333333
            },
            {
              "index": 73,
              "timeLabel": "2006-12-20T01:00:00",
              "y": 0.25866666666666666
            },
            {
              "index": 74,
              "timeLabel": "2006-12-20T02:00:00",
              "y": 0.7843666666666667
            },
            {
              "index": 75,
              "timeLabel": "2006-12-20T03:00:00",
              "y": 0.3100333333333333
            },
            {
              "index": 76,
              "timeLabel": "2006-12-20T04:00:00",
              "y": 0.289
            },
            {
              "index": 77,
              "timeLabel": "2006-12-20T05:00:00",
              "y": 0.2627
            },
            {
              "index": 78,
              "timeLabel": "2006-12-20T06:00:00",
              "y": 0.2836
            },
            {
              "index": 79,
              "timeLabel": "2006-12-20T07:00:00",
              "y": 1.5266333333333333
            },
            {
              "index": 80,
              "timeLabel": "2006-12-20T08:00:00",
              "y": 2.9176
            },
            {
              "index": 81,
              "timeLabel": "2006-12-20T09:00:00",
              "y": 1.3855333333333333
            },
            {
              "index": 82,
              "timeLabel": "2006-12-20T10:00:00",
              "y": 1.5103
            },
            {
              "index": 83,
              "timeLabel": "2006-12-20T11:00:00",
              "y": 2.8924
            },
            {
              "index": 84,
              "timeLabel": "2006-12-20T12:00:00",
              "y": 1.4210333333333334
            },
            {
              "index": 85,
              "timeLabel": "2006-12-20T13:00:00",
              "y": 1.4284
            },
            {
              "index": 86,
              "timeLabel": "2006-12-20T14:00:00",
              "y": 1.2949
            },
            {
              "index": 87,
              "timeLabel": "2006-12-20T15:00:00",
              "y": 0.28113333333333335
            },
            {
              "index": 88,
              "timeLabel": "2006-12-20T16:00:00",
              "y": 0.4684333333333333
            },
            {
              "index": 89,
              "timeLabel": "2006-12-20T17:00:00",
              "y": 0.5735
            },
            {
              "index": 90,
              "timeLabel": "2006-12-20T18:00:00",
              "y": 2.8368333333333333
            },
            {
              "index": 91,
              "timeLabel": "2006-12-20T19:00:00",
              "y": 3.2486333333333333
            },
            {
              "index": 92,
              "timeLabel": "2006-12-20T20:00:00",
              "y": 3.575466666666667
            },
            {
              "index": 93,
              "timeLabel": "2006-12-20T21:00:00",
              "y": 3.6460666666666666
            },
            {
              "index": 94,
              "timeLabel": "2006-12-20T22:00:00",
              "y": 3.0589666666666666
            },
            {
              "index": 95,
              "timeLabel": "2006-12-20T23:00:00",
              "y": 2.3817666666666666
            },
            {
              "index": 96,
              "timeLabel": "2006-12-21T00:00:00",
              "y": 1.5358666666666667
            },
            {
              "index": 97,
              "timeLabel": "2006-12-21T01:00:00",
              "y": 1.3979666666666666
            },
            {
              "index": 98,
              "timeLabel": "2006-12-21T02:00:00",
              "y": 1.2749
            },
            {
              "index": 99,
              "timeLabel": "2006-12-21T03:00:00",
              "y": 0.3026
            },
            {
              "index": 100,
              "timeLabel": "2006-12-21T04:00:00",
              "y": 0.24673333333333333
            },
            {
              "index": 101,
              "timeLabel": "2006-12-21T05:00:00",
              "y": 0.2907
            },
            {
              "index": 102,
              "timeLabel": "2006-12-21T06:00:00",
              "y": 0.29566666666666663
            },
            {
              "index": 103,
              "timeLabel": "2006-12-21T07:00:00",
              "y": 1.2804666666666666
            },
            {
              "index": 104,
              "timeLabel": "2006-12-21T08:00:00",
              "y": 1.5630333333333333
            },
            {
              "index": 105,
              "timeLabel": "2006-12-21T09:00:00",
              "y": 2.5758
            },
            {
              "index": 106,
              "timeLabel": "2006-12-21T10:00:00",
              "y": 1.7677
            },
            {
              "index": 107,
              "timeLabel": "2006-12-21T11:00:00",
              "y": null
            },
            {
              "index": 108,
              "timeLabel": "2006-12-21T12:00:00",
              "y": 0.8191333333333334
            },
            {
              "index": 109,
              "timeLabel": "2006-12-21T13:00:00",
              "y": 1.6882333333333333
            },
            {
              "index": 110,
              "timeLabel": "2006-12-21T14:00:00",
              "y": 1.0239
            },
            {
              "index": 111,
              "timeLabel": "2006-12-21T15:00:00",
              "y": 0.3074
            },
            {
              "index": 112,
              "timeLabel": "2006-12-21T16:00:00",
              "y": 1.3600666666666668
            },
            {
              "index": 113,
              "timeLabel": "2006-12-21T17:00:00",
              "y": 1.7526333333333333
            },
            {
              "index": 114,
              "timeLabel": "2006-12-21T18:00:00",
              "y": 2.4433
            },
            {
              "index": 115,
              "timeLabel": "2006-12-21T19:00:00",
              "y": 2.1971333333333334
            },
            {
              "index": 116,
              "timeLabel": "2006-12-21T20:00:00",
              "y": 2.4373666666666667
            },
            {
              "index": 117,
              "timeLabel": "2006-12-21T21:00:00",
              "y": 0.9822666666666666
            },
            {
              "index": 118,
              "timeLabel": "2006-12-21T22:00:00",
              "y": 0.28026666666666666
            },
            {
              "index": 119,
              "timeLabel": "2006-12-21T23:00:00",
              "y": 0.2704333333333333
            },
            {
              "index": 120,
              "timeLabel": "2006-12-22T00:00:00",
              "y": 0.2669333333333333
            },
            {
              "index": 121,
              "timeLabel": "2006-12-22T01:00:00",
              "y": 0.27199999999999996
            },
            {
              "index": 122,
              "timeLabel": "2006-12-22T02:00:00",
              "y": 0.26763333333333333
            },
            {
              "index": 123,
              "timeLabel": "2006-12-22T03:00:00",
              "y": 0.27386666666666665
            },
            {
              "index": 124,
              "timeLabel": "2006-12-22T04:00:00",
              "y": 0.26426666666666665
            },
            {
              "index": 125,
              "timeLabel": "2006-12-22T05:00:00",
              "y": 0.8068333333333333
            },
            {
              "index": 126,
              "timeLabel": "2006-12-22T06:00:00",
              "y": 0.47963333333333336
            },
            {
              "index": 127,
              "timeLabel": "2006-12-22T07:00:00",
              "y": 1.7232
            },
            {
              "index": 128,
              "timeLabel": "2006-12-22T08:00:00",
              "y": 2.7444
            },
            {
              "index": 129,
              "timeLabel": "2006-12-22T09:00:00",
              "y": 1.8963
            },
            {
              "index": 130,
              "timeLabel": "2006-12-22T10:00:00",
              "y": 1.3449666666666666
            },
            {
              "index": 131,
              "timeLabel": "2006-12-22T11:00:00",
              "y": 1.2525666666666666
            },
            {
              "index": 132,
              "timeLabel": "2006-12-22T12:00:00",
              "y": 1.2284666666666666
            },
            {
              "index": 133,
              "timeLabel": "2006-12-22T13:00:00",
              "y": 0.6718999999999999
            },
            {
              "index": 134,
              "timeLabel": "2006-12-22T14:00:00",
              "y": 0.8155666666666667
            },
            {
              "index": 135,
              "timeLabel": "2006-12-22T15:00:00",
              "y": 1.4516333333333333
            },
            {
              "index": 136,
              "timeLabel": "2006-12-22T16:00:00",
              "y": 1.5712
            },
            {
              "index": 137,
              "timeLabel": "2006-12-22T17:00:00",
              "y": 1.4968
            },
            {
              "index": 138,
              "timeLabel": "2006-12-22T18:00:00",
              "y": 2.6869666666666667
            },
            {
              "index": 139,
              "timeLabel": "2006-12-22T19:00:00",
              "y": 3.9381666666666666
            },
            {
              "index": 140,
              "timeLabel": "2006-12-22T20:00:00",
              "y": 3.5360666666666667
            },
            {
              "index": 141,
              "timeLabel": "2006-12-22T21:00:00",
              "y": 4.548666666666667
            },
            {
              "index": 142,
              "timeLabel": "2006-12-22T22:00:00",
              "y": 3.0650666666666666
            },
            {
              "index": 143,
              "timeLabel": "2006-12-22T23:00:00",
              "y": 2.4192
            },
            {
              "index": 144,
              "timeLabel": "2006-12-23T00:00:00",
              "y": 1.6982333333333333
            },
            {
              "index": 145,
              "timeLabel": "2006-12-23T01:00:00",
              "y": 1.7227999999999999
            },
            {
              "index": 146,
              "timeLabel": "2006-12-23T02:00:00",
              "y": 1.7007666666666668
            },
            {
              "index": 147,
              "timeLabel": "2006-12-23T03:00:00",
              "y": 1.7715333333333334
            },
            {
              "index": 148,
              "timeLabel": "2006-12-23T04:00:00",
              "y": 1.8916
            },
            {
              "index": 149,
              "timeLabel": "2006-12-23T05:00:00",
              "y": 2.2291
            },
            {
              "index": 150,
              "timeLabel": "2006-12-23T06:00:00",
              "y": 1.6493666666666666
            },
            {
              "index": 151,
              "timeLabel": "2006-12-23T07:00:00",
              "y": 4.023366666666667
            },
            {
              "index": 152,
              "timeLabel": "2006-12-23T08:00:00",
              "y": 4.190833333333333
            },
            {
              "index": 153,
              "timeLabel": "2006-12-23T09:00:00",
              "y": 3.2464
            },
            {
              "index": 154,
              "timeLabel": "2006-12-23T10:00:00",
              "y": 2.972166666666667
            },
            {
              "index": 155,
              "timeLabel": "2006-12-23T11:00:00",
              "y": 3.159
            },
            {
              "index": 156,
              "timeLabel": "2006-12-23T12:00:00",
              "y": 2.9288
            },
            {
              "index": 157,
              "timeLabel": "2006-12-23T13:00:00",
              "y": 3.4063
            },
            {
              "index": 158,
              "timeLabel": "2006-12-23T14:00:00",
              "y": 3.7579666666666665
            },
            {
              "index": 159,
              "timeLabel": "2006-12-23T15:00:00",
              "y": 4.0491
            },
            {
              "index": 160,
              "timeLabel": "2006-12-23T16:00:00",
              "y": 4.3491
            },
            {
              "index": 161,
              "timeLabel": "2006-12-23T17:00:00",
              "y": 5.452533333333333
            },
            {
              "index": 162,
              "timeLabel": "2006-12-23T18:00:00",
              "y": 3.8794
            },
            {
              "index": 163,
              "timeLabel": "2006-12-23T19:00:00",
              "y": 4.1178333333333335
            },
            {
              "index": 164,
              "timeLabel": "2006-12-23T20:00:00",
              "y": 4.1814
            },
            {
              "index": 165,
              "timeLabel": "2006-12-23T21:00:00",
              "y": 3.2884333333333333
            },
            {
              "index": 166,
              "timeLabel": "2006-12-23T22:00:00",
              "y": 4.327933333333333
            },
            {
              "index": 167,
              "timeLabel": "2006-12-23T23:00:00",
              "y": 5.5624666666666664
            },
            {
              "index": 168,
              "timeLabel": "2006-12-24T00:00:00",
              "y": 4.028
            },
            {
              "index": 169,
              "timeLabel": "2006-12-24T01:00:00",
              "y": 3.2757
            },
            {
              "index": 170,
              "timeLabel": "2006-12-24T02:00:00",
              "y": 2.3030333333333335
            },
            {
              "index": 171,
              "timeLabel": "2006-12-24T03:00:00",
              "y": 1.6067666666666667
            },
            {
              "index": 172,
              "timeLabel": "2006-12-24T04:00:00",
              "y": 1.5761
            },
            {
              "index": 173,
              "timeLabel": "2006-12-24T05:00:00",
              "y": 1.6319
            },
            {
              "index": 174,
              "timeLabel": "2006-12-24T06:00:00",
              "y": 1.8952
            },
            {
              "index": 175,
              "timeLabel": "2006-12-24T07:00:00",
              "y": 1.4764
            },
            {
              "index": 176,
              "timeLabel": "2006-12-24T08:00:00",
              "y": 1.4277666666666666
            },
            {
              "index": 177,
              "timeLabel": "2006-12-24T09:00:00",
              "y": 2.7256666666666667
            },
            {
              "index": 178,
              "timeLabel": "2006-12-24T10:00:00",
              "y": 2.675333333333333
            },
            {
              "index": 179,
              "timeLabel": "2006-12-24T11:00:00",
              "y": 2.0929333333333333
            },
            {
              "index": 180,
              "timeLabel": "2006-12-24T12:00:00",
              "y": 1.5
            },
            {
              "index": 181,
              "timeLabel": "2006-12-24T13:00:00",
              "y": 3.2399333333333336
            },
            {
              "index": 182,
              "timeLabel": "2006-12-24T14:00:00",
              "y": 1.3715333333333333
            },
            {
              "index": 183,
              "timeLabel": "2006-12-24T15:00:00",
              "y": 3.0968333333333335
            },
            {
              "index": 184,
              "timeLabel": "2006-12-24T16:00:00",
              "y": 2.0071333333333334
            },
            {
              "index": 185,
              "timeLabel": "2006-12-24T17:00:00",
              "y": 1.6864999999999999
            },
            {
              "index": 186,
              "timeLabel": "2006-12-24T18:00:00",
              "y": 0.5052
            },
            {
              "index": 187,
              "timeLabel": "2006-12-24T19:00:00",
              "y": 0.45403333333333334
            },
            {
              "index": 188,
              "timeLabel": "2006-12-24T20:00:00",
              "y": 0.4741
            },
            {
              "index": 189,
              "timeLabel": "2006-12-24T21:00:00",
              "y": 0.4840333333333333
            },
            {
              "index": 190,
              "timeLabel": "2006-12-24T22:00:00",
              "y": 0.4797666666666667
            },
            {
              "index": 191,
              "timeLabel": "2006-12-24T23:00:00",
              "y": 0.48633333333333334
            },
            {
              "index": 192,
              "timeLabel": "2006-12-25T00:00:00",
              "y": 0.9995666666666667
            },
            {
              "index": 193,
              "timeLabel": "2006-12-25T01:00:00",
              "y": 1.2067666666666665
            },
            {
              "index": 194,
              "timeLabel": "2006-12-25T02:00:00",
              "y": 0.438
            },
            {
              "index": 195,
              "timeLabel": "2006-12-25T03:00:00",
              "y": 0.5899666666666666
            },
            {
              "index": 196,
              "timeLabel": "2006-12-25T04:00:00",
              "y": 0.5786666666666667
            },
            {
              "index": 197,
              "timeLabel": "2006-12-25T05:00:00",
              "y": 0.6201
            },
            {
              "index": 198,
              "timeLabel": "2006-12-25T06:00:00",
              "y": 0.26406666666666667
            },
            {
              "index": 199,
              "timeLabel": "2006-12-25T07:00:00",
              "y": 0.6768
            },
            {
              "index": 200,
              "timeLabel": "2006-12-25T08:00:00",
              "y": 2.6111
            },
            {
              "index": 201,
              "timeLabel": "2006-12-25T09:00:00",
              "y": 1.4934666666666667
            },
            {
              "index": 202,
              "timeLabel": "2006-12-25T10:00:00",
              "y": 1.9156666666666666
            },
            {
              "index": 203,
              "timeLabel": "2006-12-25T11:00:00",
              "y": 3.0446
            },
            {
              "index": 204,
              "timeLabel": "2006-12-25T12:00:00",
              "y": 2.9126
            },
            {
              "index": 205,
              "timeLabel": "2006-12-25T13:00:00",
              "y": 2.2249333333333334
            },
            {
              "index": 206,
              "timeLabel": "2006-12-25T14:00:00",
              "y": 1.7837333333333334
            },
            {
              "index": 207,
              "timeLabel": "2006-12-25T15:00:00",
              "y": 1.7403333333333333
            },
            {
              "index": 208,
              "timeLabel": "2006-12-25T16:00:00",
              "y": 3.8728333333333333
            },
            {
              "index": 209,
              "timeLabel": "2006-12-25T17:00:00",
              "y": 2.0718
            },
            {
              "index": 210,
              "timeLabel": "2006-12-25T18:00:00",
              "y": 2.4230666666666667
            },
            {
              "index": 211,
              "timeLabel": "2006-12-25T19:00:00",
              "y": 1.6295
            },
            {
              "index": 212,
              "timeLabel": "2006-12-25T20:00:00",
              "y": 1.9771333333333334
            },
            {
              "index": 213,
              "timeLabel": "2006-12-25T21:00:00",
              "y": 3.836866666666667
            },
            {
              "index": 214,
              "timeLabel": "2006-12-25T22:00:00",
              "y": 4.2148666666666665
            },
            {
              "index": 215,
              "timeLabel": "2006-12-25T23:00:00",
              "y": 2.592233333333333
            },
            {
              "index": 216,
              "timeLabel": "2006-12-26T00:00:00",
              "y": 2.4242666666666666
            },
            {
              "index": 217,
              "timeLabel": "2006-12-26T01:00:00",
              "y": 2.402633333333333
            },
            {
              "index": 218,
              "timeLabel": "2006-12-26T02:00:00",
              "y": 2.4109333333333334
            },
            {
              "index": 219,
              "timeLabel": "2006-12-26T03:00:00",
              "y": 2.4490666666666665
            },
            {
              "index": 220,
              "timeLabel": "2006-12-26T04:00:00",
              "y": 2.9925
            },
            {
              "index": 221,
              "timeLabel": "2006-12-26T05:00:00",
              "y": 2.3877333333333333
            },
            {
              "index": 222,
              "timeLabel": "2006-12-26T06:00:00",
              "y": 2.3882
            },
            {
              "index": 223,
              "timeLabel": "2006-12-26T07:00:00",
              "y": 3.136066666666667
            },
            {
              "index": 224,
              "timeLabel": "2006-12-26T08:00:00",
              "y": 2.3659333333333334
            },
            {
              "index": 225,
              "timeLabel": "2006-12-26T09:00:00",
              "y": 3.5450666666666666
            },
            {
              "index": 226,
              "timeLabel": "2006-12-26T10:00:00",
              "y": 4.0419
            },
            {
              "index": 227,
              "timeLabel": "2006-12-26T11:00:00",
              "y": 2.3735333333333335
            },
            {
              "index": 228,
              "timeLabel": "2006-12-26T12:00:00",
              "y": 2.4647
            },
            {
              "index": 229,
              "timeLabel": "2006-12-26T13:00:00",
              "y": 2.8868
            },
            {
              "index": 230,
              "timeLabel": "2006-12-26T14:00:00",
              "y": 3.8266
            },
            {
              "index": 231,
              "timeLabel": "2006-12-26T15:00:00",
              "y": 2.6296
            },
            {
              "index": 232,
              "timeLabel": "2006-12-26T16:00:00",
              "y": 3.4507333333333334
            },
            {
              "index": 233,
              "timeLabel": "2006-12-26T17:00:00",
              "y": 3.3423333333333334
            },
            {
              "index": 234,
              "timeLabel": "2006-12-26T18:00:00",
              "y": 3.2467
            },
            {
              "index": 235,
              "timeLabel": "2006-12-26T19:00:00",
              "y": 3.0340000000000003
            },
            {
              "index": 236,
              "timeLabel": "2006-12-26T20:00:00",
              "y": 3.479
            },
            {
              "index": 237,
              "timeLabel": "2006-12-26T21:00:00",
              "y": 2.6584
            },
            {
              "index": 238,
              "timeLabel": "2006-12-26T22:00:00",
              "y": 0.8636
            },
            {
              "index": 239,
              "timeLabel": "2006-12-26T23:00:00",
              "y": 0.7682
            },
            {
              "index": 240,
              "timeLabel": "2006-12-27T00:00:00",
              "y": 0.48296666666666666
            },
            {
              "index": 241,
              "timeLabel": "2006-12-27T01:00:00",
              "y": 0.49346666666666666
            },
            {
              "index": 242,
              "timeLabel": "2006-12-27T02:00:00",
              "y": 0.4795
            },
            {
              "index": 243,
              "timeLabel": "2006-12-27T03:00:00",
              "y": 0.4441333333333333
            },
            {
              "index": 244,
              "timeLabel": "2006-12-27T04:00:00",
              "y": 0.47403333333333336
            },
            {
              "index": 245,
              "timeLabel": "2006-12-27T05:00:00",
              "y": 1.0365333333333333
            },
            {
              "index": 246,
              "timeLabel": "2006-12-27T06:00:00",
              "y": 0.4744
            },
            {
              "index": 247,
              "timeLabel": "2006-12-27T07:00:00",
              "y": 2.0498666666666665
            },
            {
              "index": 248,
              "timeLabel": "2006-12-27T08:00:00",
              "y": 2.1647333333333334
            },
            {
              "index": 249,
              "timeLabel": "2006-12-27T09:00:00",
              "y": 2.3289666666666666
            },
            {
              "index": 250,
              "timeLabel": "2006-12-27T10:00:00",
              "y": 2.3169666666666666
            },
            {
              "index": 251,
              "timeLabel": "2006-12-27T11:00:00",
              "y": 1.3156
            },
            {
              "index": 252,
              "timeLabel": "2006-12-27T12:00:00",
              "y": 1.0784
            },
            {
              "index": 253,
              "timeLabel": "2006-12-27T13:00:00",
              "y": 0.26416666666666666
            },
            {
              "index": 254,
              "timeLabel": "2006-12-27T14:00:00",
              "y": 0.2638333333333333
            },
            {
              "index": 255,
              "timeLabel": "2006-12-27T15:00:00",
              "y": 0.3332
            },
            {
              "index": 256,
              "timeLabel": "2006-12-27T16:00:00",
              "y": 0.2968
            },
            {
              "index": 257,
              "timeLabel": "2006-12-27T17:00:00",
              "y": 0.5012666666666666
            },
            {
              "index": 258,
              "timeLabel": "2006-12-27T18:00:00",
              "y": 1.8244
            },
            {
              "index": 259,
              "timeLabel": "2006-12-27T19:00:00",
              "y": 1.7362666666666666
            },
            {
              "index": 260,
              "timeLabel": "2006-12-27T20:00:00",
              "y": 2.3531
            },
            {
              "index": 261,
              "timeLabel": "2006-12-27T21:00:00",
              "y": 1.3297333333333334
            },
            {
              "index": 262,
              "timeLabel": "2006-12-27T22:00:00",
              "y": 1.0835000000000001
            },
            {
              "index": 263,
              "timeLabel": "2006-12-27T23:00:00",
              "y": 0.3535
            },
            {
              "index": 264,
              "timeLabel": "2006-12-28T00:00:00",
              "y": 1.0185333333333333
            },
            {
              "index": 265,
              "timeLabel": "2006-12-28T01:00:00",
              "y": 0.27773333333333333
            },
            {
              "index": 266,
              "timeLabel": "2006-12-28T02:00:00",
              "y": 0.31616666666666665
            },
            {
              "index": 267,
              "timeLabel": "2006-12-28T03:00:00",
              "y": 0.2988
            },
            {
              "index": 268,
              "timeLabel": "2006-12-28T04:00:00",
              "y": 0.3101
            },
            {
              "index": 269,
              "timeLabel": "2006-12-28T05:00:00",
              "y": 0.2894
            },
            {
              "index": 270,
              "timeLabel": "2006-12-28T06:00:00",
              "y": 0.29256666666666664
            },
            {
              "index": 271,
              "timeLabel": "2006-12-28T07:00:00",
              "y": 1.0433333333333334
            },
            {
              "index": 272,
              "timeLabel": "2006-12-28T08:00:00",
              "y": 2.5357333333333334
            },
            {
              "index": 273,
              "timeLabel": "2006-12-28T09:00:00",
              "y": 1.3215333333333334
            },
            {
              "index": 274,
              "timeLabel": "2006-12-28T10:00:00",
              "y": 0.32606666666666667
            },
            {
              "index": 275,
              "timeLabel": "2006-12-28T11:00:00",
              "y": 0.27993333333333337
            },
            {
              "index": 276,
              "timeLabel": "2006-12-28T12:00:00",
              "y": 0.271
            },
            {
              "index": 277,
              "timeLabel": "2006-12-28T13:00:00",
              "y": 0.6986333333333333
            },
            {
              "index": 278,
              "timeLabel": "2006-12-28T14:00:00",
              "y": 1.8085666666666667
            },
            {
              "index": 279,
              "timeLabel": "2006-12-28T15:00:00",
              "y": 1.5743333333333334
            },
            {
              "index": 280,
              "timeLabel": "2006-12-28T16:00:00",
              "y": 1.5589666666666666
            },
            {
              "index": 281,
              "timeLabel": "2006-12-28T17:00:00",
              "y": 2.432533333333333
            },
            {
              "index": 282,
              "timeLabel": "2006-12-28T18:00:00",
              "y": 2.5439
            },
            {
              "index": 283,
              "timeLabel": "2006-12-28T19:00:00",
              "y": 2.8485
            },
            {
              "index": 284,
              "timeLabel": "2006-12-28T20:00:00",
              "y": 2.1167666666666665
            },
            {
              "index": 285,
              "timeLabel": "2006-12-28T21:00:00",
              "y": 5.035333333333333
            },
            {
              "index": 286,
              "timeLabel": "2006-12-28T22:00:00",
              "y": 3.2142
            },
            {
              "index": 287,
              "timeLabel": "2006-12-28T23:00:00",
              "y": 2.1313333333333335
            },
            {
              "index": 288,
              "timeLabel": "2006-12-29T00:00:00",
              "y": 1.4093333333333333
            },
            {
              "index": 289,
              "timeLabel": "2006-12-29T01:00:00",
              "y": 1.9941666666666666
            },
            {
              "index": 290,
              "timeLabel": "2006-12-29T02:00:00",
              "y": 2.1516333333333333
            },
            {
              "index": 291,
              "timeLabel": "2006-12-29T03:00:00",
              "y": 2.4526666666666666
            },
            {
              "index": 292,
              "timeLabel": "2006-12-29T04:00:00",
              "y": 2.4714333333333336
            },
            {
              "index": 293,
              "timeLabel": "2006-12-29T05:00:00",
              "y": 2.3861
            },
            {
              "index": 294,
              "timeLabel": "2006-12-29T06:00:00",
              "y": 2.4389
            },
            {
              "index": 295,
              "timeLabel": "2006-12-29T07:00:00",
              "y": 3.838766666666667
            },
            {
              "index": 296,
              "timeLabel": "2006-12-29T08:00:00",
              "y": 3.6947666666666668
            },
            {
              "index": 297,
              "timeLabel": "2006-12-29T09:00:00",
              "y": 3.4349
            },
            {
              "index": 298,
              "timeLabel": "2006-12-29T10:00:00",
              "y": 2.4225333333333334
            },
            {
              "index": 299,
              "timeLabel": "2006-12-29T11:00:00",
              "y": 1.3891666666666667
            },
            {
              "index": 300,
              "timeLabel": "2006-12-29T12:00:00",
              "y": 1.5557333333333334
            },
            {
              "index": 301,
              "timeLabel": "2006-12-29T13:00:00",
              "y": 1.7093333333333334
            },
            {
              "index": 302,
              "timeLabel": "2006-12-29T14:00:00",
              "y": 1.4184999999999999
            },
            {
              "index": 303,
              "timeLabel": "2006-12-29T15:00:00",
              "y": 0.6281
            },
            {
              "index": 304,
              "timeLabel": "2006-12-29T16:00:00",
              "y": 0.31786666666666663
            },
            {
              "index": 305,
              "timeLabel": "2006-12-29T17:00:00",
              "y": 0.8924
            },
            {
              "index": 306,
              "timeLabel": "2006-12-29T18:00:00",
              "y": 1.8926333333333334
            },
            {
              "index": 307,
              "timeLabel": "2006-12-29T19:00:00",
              "y": 1.7913333333333332
            },
            {
              "index": 308,
              "timeLabel": "2006-12-29T20:00:00",
              "y": 3.4718333333333335
            },
            {
              "index": 309,
              "timeLabel": "2006-12-29T21:00:00",
              "y": 4.313733333333333
            },
            {
              "index": 310,
              "timeLabel": "2006-12-29T22:00:00",
              "y": 3.6660333333333335
            },
            {
              "index": 311,
              "timeLabel": "2006-12-29T23:00:00",
              "y": 1.1646666666666667
            },
            {
              "index": 312,
              "timeLabel": "2006-12-30T00:00:00",
              "y": 0.2947
            },
            {
              "index": 313,
              "timeLabel": "2006-12-30T01:00:00",
              "y": 0.3153
            },
            {
              "index": 314,
              "timeLabel": "2006-12-30T02:00:00",
              "y": 0.2794333333333333
            },
            {
              "index": 315,
              "timeLabel": "2006-12-30T03:00:00",
              "y": 0.3057666666666667
            },
            {
              "index": 316,
              "timeLabel": "2006-12-30T04:00:00",
              "y": 0.30093333333333333
            },
            {
              "index": 317,
              "timeLabel": "2006-12-30T05:00:00",
              "y": 0.2778333333333333
            },
            {
              "index": 318,
              "timeLabel": "2006-12-30T06:00:00",
              "y": 0.9067666666666666
            },
            {
              "index": 319,
              "timeLabel": "2006-12-30T07:00:00",
              "y": 0.25656666666666667
            },
            {
              "index": 320,
              "timeLabel": "2006-12-30T08:00:00",
              "y": 1.5167333333333333
            },
            {
              "index": 321,
              "timeLabel": "2006-12-30T09:00:00",
              "y": 3.2357666666666667
            },
            {
              "index": 322,
              "timeLabel": "2006-12-30T10:00:00",
              "y": null
            },
            {
              "index": 323,
              "timeLabel": "2006-12-30T11:00:00",
              "y": 3.885866666666667
            },
            {
              "index": 324,
              "timeLabel": "2006-12-30T12:00:00",
              "y": 3.1451000000000002
            },
            {
              "index": 325,
              "timeLabel": "2006-12-30T13:00:00",
              "y": 2.2929666666666666
            },
            {
              "index": 326,
              "timeLabel": "2006-12-30T14:00:00",
              "y": 1.7899333333333334
            },
            {
              "index": 327,
              "timeLabel": "2006-12-30T15:00:00",
              "y": 2.449533333333333
            },
            {
              "index": 328,
              "timeLabel": "2006-12-30T16:00:00",
              "y": 3.955566666666667
            },
            {
              "index": 329,
              "timeLabel": "2006-12-30T17:00:00",
              "y": 2.581166666666667
            },
            {
              "index": 330,
              "timeLabel": "2006-12-30T18:00:00",
              "y": 3.8627
            },
            {
              "index": 331,
              "timeLabel": "2006-12-30T19:00:00",
              "y": 3.753033333333333
            },
            {
              "index": 332,
              "timeLabel": "2006-12-30T20:00:00",
              "y": 3.0760666666666667
            },
            {
              "index": 333,
              "timeLabel": "2006-12-30T21:00:00",
              "y": 2.038
            },
            {
              "index": 334,
              "timeLabel": "2006-12-30T22:00:00",
              "y": 0.7491333333333333
            },
            {
              "index": 335,
              "timeLabel": "2006-12-30T23:00:00",
              "y": 0.7101999999999999
            },
            {
              "index": 336,
              "timeLabel": "2006-12-31T00:00:00",
              "y": 0.6762333333333334
            },
            {
              "index": 337,
              "timeLabel": "2006-12-31T01:00:00",
              "y": 0.7161666666666666
            },
            {
              "index": 338,
              "timeLabel": "2006-12-31T02:00:00",
              "y": 0.7219333333333333
            },
            {
              "index": 339,
              "timeLabel": "2006-12-31T03:00:00",
              "y": 0.7785666666666666
            },
            {
              "index": 340,
              "timeLabel": "2006-12-31T04:00:00",
              "y": 1.2777666666666667
            },
            {
              "index": 341,
              "timeLabel": "2006-12-31T05:00:00",
              "y": 1.0507666666666666
            },
            {
              "index": 342,
              "timeLabel": "2006-12-31T06:00:00",
              "y": 2.5013666666666667
            },
            {
              "index": 343,
              "timeLabel": "2006-12-31T07:00:00",
              "y": 3.3645
            },
            {
              "index": 344,
              "timeLabel": "2006-12-31T08:00:00",
              "y": 4.0845666666666665
            },
            {
              "index": 345,
              "timeLabel": "2006-12-31T09:00:00",
              "y": 2.7232
            },
            {
              "index": 346,
              "timeLabel": "2006-12-31T10:00:00",
              "y": 2.9149333333333334
            },
            {
              "index": 347,
              "timeLabel": "2006-12-31T11:00:00",
              "y": 3.3595
            },
            {
              "index": 348,
              "timeLabel": "2006-12-31T12:00:00",
              "y": 3.8529666666666667
            },
            {
              "index": 349,
              "timeLabel": "2006-12-31T13:00:00",
              "y": 3.6025666666666667
            },
            {
              "index": 350,
              "timeLabel": "2006-12-31T14:00:00",
              "y": 3.0813
            },
            {
              "index": 351,
              "timeLabel": "2006-12-31T15:00:00",
              "y": 2.4882666666666666
            },
            {
              "index": 352,
              "timeLabel": "2006-12-31T16:00:00",
              "y": 2.838
            },
            {
              "index": 353,
              "timeLabel": "2006-12-31T17:00:00",
              "y": 2.7502666666666666
            },
            {
              "index": 354,
              "timeLabel": "2006-12-31T18:00:00",
              "y": 2.4104666666666668
            },
            {
              "index": 355,
              "timeLabel": "2006-12-31T19:00:00",
              "y": 2.434266666666667
            },
            {
              "index": 356,
              "timeLabel": "2006-12-31T20:00:00",
              "y": 2.424933333333333
            },
            {
              "index": 357,
              "timeLabel": "2006-12-31T21:00:00",
              "y": 2.4436333333333335
            },
            {
              "index": 358,
              "timeLabel": "2006-12-31T22:00:00",
              "y": 2.636
            },
            {
              "index": 359,
              "timeLabel": "2006-12-31T23:00:00",
              "y": 3.104433333333333
            },
            {
              "index": 360,
              "timeLabel": "2007-01-01T00:00:00",
              "y": 2.5506333333333333
            },
            {
              "index": 361,
              "timeLabel": "2007-01-01T01:00:00",
              "y": 2.5234
            },
            {
              "index": 362,
              "timeLabel": "2007-01-01T02:00:00",
              "y": 2.582333333333333
            },
            {
              "index": 363,
              "timeLabel": "2007-01-01T03:00:00",
              "y": 2.5416666666666665
            },
            {
              "index": 364,
              "timeLabel": "2007-01-01T04:00:00",
              "y": 2.4757333333333333
            },
            {
              "index": 365,
              "timeLabel": "2007-01-01T05:00:00",
              "y": 2.4762333333333335
            },
            {
              "index": 366,
              "timeLabel": "2007-01-01T06:00:00",
              "y": 2.4558
            },
            {
              "index": 367,
              "timeLabel": "2007-01-01T07:00:00",
              "y": 2.4472
            },
            {
              "index": 368,
              "timeLabel": "2007-01-01T08:00:00",
              "y": 2.4417333333333335
            },
            {
              "index": 369,
              "timeLabel": "2007-01-01T09:00:00",
              "y": 3.1461333333333332
            },
            {
              "index": 370,
              "timeLabel": "2007-01-01T10:00:00",
              "y": 2.6617333333333333
            },
            {
              "index": 371,
              "timeLabel": "2007-01-01T11:00:00",
              "y": 2.576
            },
            {
              "index": 372,
              "timeLabel": "2007-01-01T12:00:00",
              "y": 2.615866666666667
            },
            {
              "index": 373,
              "timeLabel": "2007-01-01T13:00:00",
              "y": 2.1624
            },
            {
              "index": 374,
              "timeLabel": "2007-01-01T14:00:00",
              "y": 1.2944
            },
            {
              "index": 375,
              "timeLabel": "2007-01-01T15:00:00",
              "y": 1.9091666666666667
            },
            {
              "index": 376,
              "timeLabel": "2007-01-01T16:00:00",
              "y": 1.3901000000000001
            },
            {
              "index": 377,
              "timeLabel": "2007-01-01T17:00:00",
              "y": 1.6320666666666668
            },
            {
              "index": 378,
              "timeLabel": "2007-01-01T18:00:00",
              "y": 1.4619
            },
            {
              "index": 379,
              "timeLabel": "2007-01-01T19:00:00",
              "y": 0.7323
            },
            {
              "index": 380,
              "timeLabel": "2007-01-01T20:00:00",
              "y": 0.4123
            },
            {
              "index": 381,
              "timeLabel": "2007-01-01T21:00:00",
              "y": 0.43393333333333334
            },
            {
              "index": 382,
              "timeLabel": "2007-01-01T22:00:00",
              "y": 0.4437333333333333
            },
            {
              "index": 383,
              "timeLabel": "2007-01-01T23:00:00",
              "y": 0.4499666666666667
            },
            {
              "index": 384,
              "timeLabel": "2007-01-02T00:00:00",
              "y": 0.44643333333333335
            },
            {
              "index": 385,
              "timeLabel": "2007-01-02T01:00:00",
              "y": 0.43673333333333336
            },
            {
              "index": 386,
              "timeLabel": "2007-01-02T02:00:00",
              "y": 0.43156666666666665
            },
            {
              "index": 387,
              "timeLabel": "2007-01-02T03:00:00",
              "y": 0.46416666666666667
            },
            {
              "index": 388,
              "timeLabel": "2007-01-02T04:00:00",
              "y": 1.0399666666666667
            },
            {
              "index": 389,
              "timeLabel": "2007-01-02T05:00:00",
              "y": 0.7106
            },
            {
              "index": 390,
              "timeLabel": "2007-01-02T06:00:00",
              "y": 0.4469666666666667
            },
            {
              "index": 391,
              "timeLabel": "2007-01-02T07:00:00",
              "y": 0.4125666666666667
            },
            {
              "index": 392,
              "timeLabel": "2007-01-02T08:00:00",
              "y": 0.4544
            },
            {
              "index": 393,
              "timeLabel": "2007-01-02T09:00:00",
              "y": 0.41763333333333336
            },
            {
              "index": 394,
              "timeLabel": "2007-01-02T10:00:00",
              "y": 0.4459
            },
            {
              "index": 395,
              "timeLabel": "2007-01-02T11:00:00",
              "y": 0.4327666666666667
            },
            {
              "index": 396,
              "timeLabel": "2007-01-02T12:00:00",
              "y": 0.42596666666666666
            },
            {
              "index": 397,
              "timeLabel": "2007-01-02T13:00:00",
              "y": 0.459
            },
            {
              "index": 398,
              "timeLabel": "2007-01-02T14:00:00",
              "y": 0.43843333333333334
            },
            {
              "index": 399,
              "timeLabel": "2007-01-02T15:00:00",
              "y": 1.4381
            },
            {
              "index": 400,
              "timeLabel": "2007-01-02T16:00:00",
              "y": 1.4590666666666667
            },
            {
              "index": 401,
              "timeLabel": "2007-01-02T17:00:00",
              "y": 2.1362
            },
            {
              "index": 402,
              "timeLabel": "2007-01-02T18:00:00",
              "y": 1.9720666666666666
            },
            {
              "index": 403,
              "timeLabel": "2007-01-02T19:00:00",
              "y": 1.5183
            },
            {
              "index": 404,
              "timeLabel": "2007-01-02T20:00:00",
              "y": 2.5735333333333332
            },
            {
              "index": 405,
              "timeLabel": "2007-01-02T21:00:00",
              "y": 1.3214333333333332
            },
            {
              "index": 406,
              "timeLabel": "2007-01-02T22:00:00",
              "y": 0.5282333333333333
            },
            {
              "index": 407,
              "timeLabel": "2007-01-02T23:00:00",
              "y": 0.7439
            },
            {
              "index": 408,
              "timeLabel": "2007-01-03T00:00:00",
              "y": 1.1254333333333333
            },
            {
              "index": 409,
              "timeLabel": "2007-01-03T01:00:00",
              "y": 0.9007
            },
            {
              "index": 410,
              "timeLabel": "2007-01-03T02:00:00",
              "y": 0.30483333333333335
            },
            {
              "index": 411,
              "timeLabel": "2007-01-03T03:00:00",
              "y": 0.3333
            },
            {
              "index": 412,
              "timeLabel": "2007-01-03T04:00:00",
              "y": 0.29883333333333334
            },
            {
              "index": 413,
              "timeLabel": "2007-01-03T05:00:00",
              "y": 0.9516333333333333
            },
            {
              "index": 414,
              "timeLabel": "2007-01-03T06:00:00",
              "y": 0.3343333333333333
            },
            {
              "index": 415,
              "timeLabel": "2007-01-03T07:00:00",
              "y": 0.3017
            },
            {
              "index": 416,
              "timeLabel": "2007-01-03T08:00:00",
              "y": 0.3196
            },
            {
              "index": 417,
              "timeLabel": "2007-01-03T09:00:00",
              "y": 0.6025
            },
            {
              "index": 418,
              "timeLabel": "2007-01-03T10:00:00",
              "y": 0.8742333333333333
            },
            {
              "index": 419,
              "timeLabel": "2007-01-03T11:00:00",
              "y": 0.9763999999999999
            },
            {
              "index": 420,
              "timeLabel": "2007-01-03T12:00:00",
              "y": 1.3977666666666666
            },
            {
              "index": 421,
              "timeLabel": "2007-01-03T13:00:00",
              "y": 1.4199333333333333
            },
            {
              "index": 422,
              "timeLabel": "2007-01-03T14:00:00",
              "y": 1.0903666666666667
            },
            {
              "index": 423,
              "timeLabel": "2007-01-03T15:00:00",
              "y": 0.302
            },
            {
              "index": 424,
              "timeLabel": "2007-01-03T16:00:00",
              "y": 0.3676666666666667
            },
            {
              "index": 425,
              "timeLabel": "2007-01-03T17:00:00",
              "y": 0.28513333333333335
            },
            {
              "index": 426,
              "timeLabel": "2007-01-03T18:00:00",
              "y": 0.3612
            },
            {
              "index": 427,
              "timeLabel": "2007-01-03T19:00:00",
              "y": 0.289
            },
            {
              "index": 428,
              "timeLabel": "2007-01-03T20:00:00",
              "y": 0.32626666666666665
            },
            {
              "index": 429,
              "timeLabel": "2007-01-03T21:00:00",
              "y": 1.1154333333333333
            },
            {
              "index": 430,
              "timeLabel": "2007-01-03T22:00:00",
              "y": 0.9540333333333333
            },
            {
              "index": 431,
              "timeLabel": "2007-01-03T23:00:00",
              "y": 1.6686
            },
            {
              "index": 432,
              "timeLabel": "2007-01-04T00:00:00",
              "y": 3.3750666666666667
            },
            {
              "index": 433,
              "timeLabel": "2007-01-04T01:00:00",
              "y": 2.896733333333333
            },
            {
              "index": 434,
              "timeLabel": "2007-01-04T02:00:00",
              "y": 2.3873333333333333
            },
            {
              "index": 435,
              "timeLabel": "2007-01-04T03:00:00",
              "y": 2.362033333333333
            },
            {
              "index": 436,
              "timeLabel": "2007-01-04T04:00:00",
              "y": 2.370033333333333
            },
            {
              "index": 437,
              "timeLabel": "2007-01-04T05:00:00",
              "y": 2.3452
            },
            {
              "index": 438,
              "timeLabel": "2007-01-04T06:00:00",
              "y": 2.3587333333333333
            },
            {
              "index": 439,
              "timeLabel": "2007-01-04T07:00:00",
              "y": 2.326233333333333
            },
            {
              "index": 440,
              "timeLabel": "2007-01-04T08:00:00",
              "y": 2.4038
            },
            {
              "index": 441,
              "timeLabel": "2007-01-04T09:00:00",
              "y": 2.6670666666666665
            },
            {
              "index": 442,
              "timeLabel": "2007-01-04T10:00:00",
              "y": 1.8980333333333332
            },
            {
              "index": 443,
              "timeLabel": "2007-01-04T11:00:00",
              "y": 2.0063333333333335
            },
            {
              "index": 444,
              "timeLabel": "2007-01-04T12:00:00",
              "y": 4.066566666666667
            },
            {
              "index": 445,
              "timeLabel": "2007-01-04T13:00:00",
              "y": 3.5450666666666666
            },
            {
              "index": 446,
              "timeLabel": "2007-01-04T14:00:00",
              "y": 2.0132
            },
            {
              "index": 447,
              "timeLabel": "2007-01-04T15:00:00",
              "y": 0.8793
            },
            {
              "index": 448,
              "timeLabel": "2007-01-04T16:00:00",
              "y": 3.2898
            },
            {
              "index": 449,
              "timeLabel": "2007-01-04T17:00:00",
              "y": 2.7413
            },
            {
              "index": 450,
              "timeLabel": "2007-01-04T18:00:00",
              "y": 2.6055
            },
            {
              "index": 451,
              "timeLabel": "2007-01-04T19:00:00",
              "y": 2.8540666666666668
            },
            {
              "index": 452,
              "timeLabel": "2007-01-04T20:00:00",
              "y": 1.4985333333333333
            },
            {
              "index": 453,
              "timeLabel": "2007-01-04T21:00:00",
              "y": 0.4788
            },
            {
              "index": 454,
              "timeLabel": "2007-01-04T22:00:00",
              "y": 0.4196666666666667
            },
            {
              "index": 455,
              "timeLabel": "2007-01-04T23:00:00",
              "y": 0.5351333333333333
            },
            {
              "index": 456,
              "timeLabel": "2007-01-05T00:00:00",
              "y": 1.9680333333333333
            },
            {
              "index": 457,
              "timeLabel": "2007-01-05T01:00:00",
              "y": 2.386833333333333
            },
            {
              "index": 458,
              "timeLabel": "2007-01-05T02:00:00",
              "y": 2.3947333333333334
            },
            {
              "index": 459,
              "timeLabel": "2007-01-05T03:00:00",
              "y": 2.4157
            },
            {
              "index": 460,
              "timeLabel": "2007-01-05T04:00:00",
              "y": 2.3970333333333333
            },
            {
              "index": 461,
              "timeLabel": "2007-01-05T05:00:00",
              "y": 2.407366666666667
            },
            {
              "index": 462,
              "timeLabel": "2007-01-05T06:00:00",
              "y": 2.3678
            },
            {
              "index": 463,
              "timeLabel": "2007-01-05T07:00:00",
              "y": 2.3515333333333333
            },
            {
              "index": 464,
              "timeLabel": "2007-01-05T08:00:00",
              "y": 2.3169333333333335
            },
            {
              "index": 465,
              "timeLabel": "2007-01-05T09:00:00",
              "y": 2.3642
            },
            {
              "index": 466,
              "timeLabel": "2007-01-05T10:00:00",
              "y": 2.6560333333333332
            },
            {
              "index": 467,
              "timeLabel": "2007-01-05T11:00:00",
              "y": 0.35583333333333333
            },
            {
              "index": 468,
              "timeLabel": "2007-01-05T12:00:00",
              "y": 0.3544
            },
            {
              "index": 469,
              "timeLabel": "2007-01-05T13:00:00",
              "y": 0.34176666666666666
            },
            {
              "index": 470,
              "timeLabel": "2007-01-05T14:00:00",
              "y": 0.37733333333333335
            },
            {
              "index": 471,
              "timeLabel": "2007-01-05T15:00:00",
              "y": 0.47783333333333333
            },
            {
              "index": 472,
              "timeLabel": "2007-01-05T16:00:00",
              "y": 0.8365
            },
            {
              "index": 473,
              "timeLabel": "2007-01-05T17:00:00",
              "y": 2.2407333333333335
            },
            {
              "index": 474,
              "timeLabel": "2007-01-05T18:00:00",
              "y": 2.3996
            },
            {
              "index": 475,
              "timeLabel": "2007-01-05T19:00:00",
              "y": 2.0389
            },
            {
              "index": 476,
              "timeLabel": "2007-01-05T20:00:00",
              "y": 2.9757000000000002
            },
            {
              "index": 477,
              "timeLabel": "2007-01-05T21:00:00",
              "y": 2.6744
            },
            {
              "index": 478,
              "timeLabel": "2007-01-05T22:00:00",
              "y": 2.3847
            },
            {
              "index": 479,
              "timeLabel": "2007-01-05T23:00:00",
              "y": 1.7388333333333332
            },
            {
              "index": 480,
              "timeLabel": "2007-01-06T00:00:00",
              "y": 1.4930666666666668
            },
            {
              "index": 481,
              "timeLabel": "2007-01-06T01:00:00",
              "y": 0.43346666666666667
            },
            {
              "index": 482,
              "timeLabel": "2007-01-06T02:00:00",
              "y": 0.3333333333333333
            },
            {
              "index": 483,
              "timeLabel": "2007-01-06T03:00:00",
              "y": 0.3128666666666667
            },
            {
              "index": 484,
              "timeLabel": "2007-01-06T04:00:00",
              "y": 0.30356666666666665
            },
            {
              "index": 485,
              "timeLabel": "2007-01-06T05:00:00",
              "y": 0.33526666666666666
            },
            {
              "index": 486,
              "timeLabel": "2007-01-06T06:00:00",
              "y": 0.29873333333333335
            },
            {
              "index": 487,
              "timeLabel": "2007-01-06T07:00:00",
              "y": 0.337
            },
            {
              "index": 488,
              "timeLabel": "2007-01-06T08:00:00",
              "y": 0.2954
            },
            {
              "index": 489,
              "timeLabel": "2007-01-06T09:00:00",
              "y": 0.6231333333333333
            },
            {
              "index": 490,
              "timeLabel": "2007-01-06T10:00:00",
              "y": 1.5255666666666667
            },
            {
              "index": 491,
              "timeLabel": "2007-01-06T11:00:00",
              "y": 2.5922
            },
            {
              "index": 492,
              "timeLabel": "2007-01-06T12:00:00",
              "y": 4.002933333333333
            },
            {
              "index": 493,
              "timeLabel": "2007-01-06T13:00:00",
              "y": 1.8904333333333334
            },
            {
              "index": 494,
              "timeLabel": "2007-01-06T14:00:00",
              "y": 1.6995666666666667
            },
            {
              "index": 495,
              "timeLabel": "2007-01-06T15:00:00",
              "y": 1.1487
            },
            {
              "index": 496,
              "timeLabel": "2007-01-06T16:00:00",
              "y": 0.8812666666666666
            },
            {
              "index": 497,
              "timeLabel": "2007-01-06T17:00:00",
              "y": 0.8989666666666667
            },
            {
              "index": 498,
              "timeLabel": "2007-01-06T18:00:00",
              "y": 0.8555333333333334
            },
            {
              "index": 499,
              "timeLabel": "2007-01-06T19:00:00",
              "y": 1.8340333333333334
            },
            {
              "index": 500,
              "timeLabel": "2007-01-06T20:00:00",
              "y": 1.0151333333333332
            },
            {
              "index": 501,
              "timeLabel": "2007-01-06T21:00:00",
              "y": 1.0125333333333333
            },
            {
              "index": 502,
              "timeLabel": "2007-01-06T22:00:00",
              "y": 0.5116666666666667
            },
            {
              "index": 503,
              "timeLabel": "2007-01-06T23:00:00",
              "y": 0.5052666666666666
            },
            {
              "index": 504,
              "timeLabel": "2007-01-07T00:00:00",
              "y": 0.9032
            },
            {
              "index": 505,
              "timeLabel": "2007-01-07T01:00:00",
              "y": 0.2964333333333333
            },
            {
              "index": 506,
              "timeLabel": "2007-01-07T02:00:00",
              "y": 0.3524
            },
            {
              "index": 507,
              "timeLabel": "2007-01-07T03:00:00",
              "y": 0.2986666666666667
            },
            {
              "index": 508,
              "timeLabel": "2007-01-07T04:00:00",
              "y": 0.35586666666666666
            },
            {
              "index": 509,
              "timeLabel": "2007-01-07T05:00:00",
              "y": 0.28536666666666666
            },
            {
              "index": 510,
              "timeLabel": "2007-01-07T06:00:00",
              "y": 0.3383
            },
            {
              "index": 511,
              "timeLabel": "2007-01-07T07:00:00",
              "y": 0.31273333333333336
            },
            {
              "index": 512,
              "timeLabel": "2007-01-07T08:00:00",
              "y": 0.3100333333333333
            },
            {
              "index": 513,
              "timeLabel": "2007-01-07T09:00:00",
              "y": 0.3756
            },
            {
              "index": 514,
              "timeLabel": "2007-01-07T10:00:00",
              "y": 1.0414333333333332
            },
            {
              "index": 515,
              "timeLabel": "2007-01-07T11:00:00",
              "y": 1.0684333333333333
            },
            {
              "index": 516,
              "timeLabel": "2007-01-07T12:00:00",
              "y": 0.5515666666666666
            },
            {
              "index": 517,
              "timeLabel": "2007-01-07T13:00:00",
              "y": 3.331933333333333
            },
            {
              "index": 518,
              "timeLabel": "2007-01-07T14:00:00",
              "y": 2.5331
            },
            {
              "index": 519,
              "timeLabel": "2007-01-07T15:00:00",
              "y": 3.770766666666667
            },
            {
              "index": 520,
              "timeLabel": "2007-01-07T16:00:00",
              "y": 2.2807666666666666
            },
            {
              "index": 521,
              "timeLabel": "2007-01-07T17:00:00",
              "y": 2.404733333333333
            },
            {
              "index": 522,
              "timeLabel": "2007-01-07T18:00:00",
              "y": 5.211533333333334
            },
            {
              "index": 523,
              "timeLabel": "2007-01-07T19:00:00",
              "y": 2.9164666666666665
            },
            {
              "index": 524,
              "timeLabel": "2007-01-07T20:00:00",
              "y": 3.5232
            },
            {
              "index": 525,
              "timeLabel": "2007-01-07T21:00:00",
              "y": 4.738366666666667
            },
            {
              "index": 526,
              "timeLabel": "2007-01-07T22:00:00",
              "y": 2.1289
            },
            {
              "index": 527,
              "timeLabel": "2007-01-07T23:00:00",
              "y": 1.4638666666666666
            },
            {
              "index": 528,
              "timeLabel": "2007-01-08T00:00:00",
              "y": 1.3604666666666667
            },
            {
              "index": 529,
              "timeLabel": "2007-01-08T01:00:00",
              "y": 1.3506666666666667
            },
            {
              "index": 530,
              "timeLabel": "2007-01-08T02:00:00",
              "y": 1.3848333333333334
            },
            {
              "index": 531,
              "timeLabel": "2007-01-08T03:00:00",
              "y": 1.3569
            },
            {
              "index": 532,
              "timeLabel": "2007-01-08T04:00:00",
              "y": 1.3759000000000001
            },
            {
              "index": 533,
              "timeLabel": "2007-01-08T05:00:00",
              "y": 1.1045333333333334
            },
            {
              "index": 534,
              "timeLabel": "2007-01-08T06:00:00",
              "y": 0.46813333333333335
            },
            {
              "index": 535,
              "timeLabel": "2007-01-08T07:00:00",
              "y": 1.0126333333333333
            },
            {
              "index": 536,
              "timeLabel": "2007-01-08T08:00:00",
              "y": 2.1395
            },
            {
              "index": 537,
              "timeLabel": "2007-01-08T09:00:00",
              "y": 1.6646333333333334
            },
            {
              "index": 538,
              "timeLabel": "2007-01-08T10:00:00",
              "y": 1.2966333333333333
            },
            {
              "index": 539,
              "timeLabel": "2007-01-08T11:00:00",
              "y": 1.1751
            },
            {
              "index": 540,
              "timeLabel": "2007-01-08T12:00:00",
              "y": 0.32893333333333336
            },
            {
              "index": 541,
              "timeLabel": "2007-01-08T13:00:00",
              "y": 0.6432
            },
            {
              "index": 542,
              "timeLabel": "2007-01-08T14:00:00",
              "y": 1.8509
            },
            {
              "index": 543,
              "timeLabel": "2007-01-08T15:00:00",
              "y": 1.8851
            },
            {
              "index": 544,
              "timeLabel": "2007-01-08T16:00:00",
              "y": 2.1224333333333334
            },
            {
              "index": 545,
              "timeLabel": "2007-01-08T17:00:00",
              "y": 1.8981
            },
            {
              "index": 546,
              "timeLabel": "2007-01-08T18:00:00",
              "y": 2.907966666666667
            },
            {
              "index": 547,
              "timeLabel": "2007-01-08T19:00:00",
              "y": 2.7940666666666667
            },
            {
              "index": 548,
              "timeLabel": "2007-01-08T20:00:00",
              "y": 3.4250333333333334
            },
            {
              "index": 549,
              "timeLabel": "2007-01-08T21:00:00",
              "y": 2.507633333333333
            },
            {
              "index": 550,
              "timeLabel": "2007-01-08T22:00:00",
              "y": 0.9699666666666666
            },
            {
              "index": 551,
              "timeLabel": "2007-01-08T23:00:00",
              "y": 0.3327333333333333
            },
            {
              "index": 552,
              "timeLabel": "2007-01-09T00:00:00",
              "y": 0.2698333333333333
            },
            {
              "index": 553,
              "timeLabel": "2007-01-09T01:00:00",
              "y": 0.31183333333333335
            },
            {
              "index": 554,
              "timeLabel": "2007-01-09T02:00:00",
              "y": 0.2874
            },
            {
              "index": 555,
              "timeLabel": "2007-01-09T03:00:00",
              "y": 0.4696666666666667
            },
            {
              "index": 556,
              "timeLabel": "2007-01-09T04:00:00",
              "y": 0.6612
            },
            {
              "index": 557,
              "timeLabel": "2007-01-09T05:00:00",
              "y": 0.2745
            },
            {
              "index": 558,
              "timeLabel": "2007-01-09T06:00:00",
              "y": 1.1234666666666666
            },
            {
              "index": 559,
              "timeLabel": "2007-01-09T07:00:00",
              "y": 2.3869666666666665
            },
            {
              "index": 560,
              "timeLabel": "2007-01-09T08:00:00",
              "y": 2.1356
            },
            {
              "index": 561,
              "timeLabel": "2007-01-09T09:00:00",
              "y": 1.8683666666666667
            },
            {
              "index": 562,
              "timeLabel": "2007-01-09T10:00:00",
              "y": 1.3492333333333333
            },
            {
              "index": 563,
              "timeLabel": "2007-01-09T11:00:00",
              "y": 0.9347333333333334
            },
            {
              "index": 564,
              "timeLabel": "2007-01-09T12:00:00",
              "y": 0.2769333333333333
            },
            {
              "index": 565,
              "timeLabel": "2007-01-09T13:00:00",
              "y": 0.30156666666666665
            },
            {
              "index": 566,
              "timeLabel": "2007-01-09T14:00:00",
              "y": 0.26666666666666666
            },
            {
              "index": 567,
              "timeLabel": "2007-01-09T15:00:00",
              "y": 0.5648333333333333
            },
            {
              "index": 568,
              "timeLabel": "2007-01-09T16:00:00",
              "y": 1.4713333333333334
            },
            {
              "index": 569,
              "timeLabel": "2007-01-09T17:00:00",
              "y": 2.1062666666666665
            },
            {
              "index": 570,
              "timeLabel": "2007-01-09T18:00:00",
              "y": 2.3730666666666664
            },
            {
              "index": 571,
              "timeLabel": "2007-01-09T19:00:00",
              "y": 2.2874666666666665
            },
            {
              "index": 572,
              "timeLabel": "2007-01-09T20:00:00",
              "y": 3.2106
            },
            {
              "index": 573,
              "timeLabel": "2007-01-09T21:00:00",
              "y": 3.292466666666667
            },
            {
              "index": 574,
              "timeLabel": "2007-01-09T22:00:00",
              "y": 1.2912666666666668
            },
            {
              "index": 575,
              "timeLabel": "2007-01-09T23:00:00",
              "y": 1.6356333333333333
            },
            {
              "index": 576,
              "timeLabel": "2007-01-10T00:00:00",
              "y": 0.5179
            },
            {
              "index": 577,
              "timeLabel": "2007-01-10T01:00:00",
              "y": 0.6539
            },
            {
              "index": 578,
              "timeLabel": "2007-01-10T02:00:00",
              "y": 0.34036666666666665
            },
            {
              "index": 579,
              "timeLabel": "2007-01-10T03:00:00",
              "y": 0.26936666666666664
            },
            {
              "index": 580,
              "timeLabel": "2007-01-10T04:00:00",
              "y": 0.3469
            },
            {
              "index": 581,
              "timeLabel": "2007-01-10T05:00:00",
              "y": 0.2679666666666667
            },
            {
              "index": 582,
              "timeLabel": "2007-01-10T06:00:00",
              "y": 0.8976
            },
            {
              "index": 583,
              "timeLabel": "2007-01-10T07:00:00",
              "y": 2.3629000000000002
            },
            {
              "index": 584,
              "timeLabel": "2007-01-10T08:00:00",
              "y": 2.972933333333333
            },
            {
              "index": 585,
              "timeLabel": "2007-01-10T09:00:00",
              "y": 1.9952333333333334
            },
            {
              "index": 586,
              "timeLabel": "2007-01-10T10:00:00",
              "y": 1.4271
            },
            {
              "index": 587,
              "timeLabel": "2007-01-10T11:00:00",
              "y": 3.9707666666666666
            },
            {
              "index": 588,
              "timeLabel": "2007-01-10T12:00:00",
              "y": 1.4307666666666667
            },
            {
              "index": 589,
              "timeLabel": "2007-01-10T13:00:00",
              "y": 0.5537666666666666
            },
            {
              "index": 590,
              "timeLabel": "2007-01-10T14:00:00",
              "y": 1.6954
            },
            {
              "index": 591,
              "timeLabel": "2007-01-10T15:00:00",
              "y": 1.2912333333333335
            },
            {
              "index": 592,
              "timeLabel": "2007-01-10T16:00:00",
              "y": 0.6835333333333333
            },
            {
              "index": 593,
              "timeLabel": "2007-01-10T17:00:00",
              "y": 1.8244
            },
            {
              "index": 594,
              "timeLabel": "2007-01-10T18:00:00",
              "y": 3.3644
            },
            {
              "index": 595,
              "timeLabel": "2007-01-10T19:00:00",
              "y": 3.1902333333333335
            },
            {
              "index": 596,
              "timeLabel": "2007-01-10T20:00:00",
              "y": 2.9339333333333335
            },
            {
              "index": 597,
              "timeLabel": "2007-01-10T21:00:00",
              "y": 1.6947
            },
            {
              "index": 598,
              "timeLabel": "2007-01-10T22:00:00",
              "y": 0.8519
            },
            {
              "index": 599,
              "timeLabel": "2007-01-10T23:00:00",
              "y": 0.3761333333333333
            },
            {
              "index": 600,
              "timeLabel": "2007-01-11T00:00:00",
              "y": 0.3365
            },
            {
              "index": 601,
              "timeLabel": "2007-01-11T01:00:00",
              "y": 0.2546
            },
            {
              "index": 602,
              "timeLabel": "2007-01-11T02:00:00",
              "y": 0.30866666666666664
            },
            {
              "index": 603,
              "timeLabel": "2007-01-11T03:00:00",
              "y": 0.8921666666666667
            },
            {
              "index": 604,
              "timeLabel": "2007-01-11T04:00:00",
              "y": 0.2705
            },
            {
              "index": 605,
              "timeLabel": "2007-01-11T05:00:00",
              "y": 0.2976
            },
            {
              "index": 606,
              "timeLabel": "2007-01-11T06:00:00",
              "y": 0.7363666666666666
            },
            {
              "index": 607,
              "timeLabel": "2007-01-11T07:00:00",
              "y": 2.702166666666667
            },
            {
              "index": 608,
              "timeLabel": "2007-01-11T08:00:00",
              "y": 2.5052666666666665
            },
            {
              "index": 609,
              "timeLabel": "2007-01-11T09:00:00",
              "y": 1.3702
            },
            {
              "index": 610,
              "timeLabel": "2007-01-11T10:00:00",
              "y": 1.3697333333333332
            },
            {
              "index": 611,
              "timeLabel": "2007-01-11T11:00:00",
              "y": 1.1518333333333333
            },
            {
              "index": 612,
              "timeLabel": "2007-01-11T12:00:00",
              "y": 0.30033333333333334
            },
            {
              "index": 613,
              "timeLabel": "2007-01-11T13:00:00",
              "y": 0.3952
            },
            {
              "index": 614,
              "timeLabel": "2007-01-11T14:00:00",
              "y": 0.3272
            },
            {
              "index": 615,
              "timeLabel": "2007-01-11T15:00:00",
              "y": 0.5416333333333333
            },
            {
              "index": 616,
              "timeLabel": "2007-01-11T16:00:00",
              "y": 2.6132
            },
            {
              "index": 617,
              "timeLabel": "2007-01-11T17:00:00",
              "y": 3.2382333333333335
            },
            {
              "index": 618,
              "timeLabel": "2007-01-11T18:00:00",
              "y": 3.869133333333333
            },
            {
              "index": 619,
              "timeLabel": "2007-01-11T19:00:00",
              "y": 4.7842
            },
            {
              "index": 620,
              "timeLabel": "2007-01-11T20:00:00",
              "y": 3.7062666666666666
            },
            {
              "index": 621,
              "timeLabel": "2007-01-11T21:00:00",
              "y": 2.8803666666666667
            },
            {
              "index": 622,
              "timeLabel": "2007-01-11T22:00:00",
              "y": 1.4481
            },
            {
              "index": 623,
              "timeLabel": "2007-01-11T23:00:00",
              "y": 1.2871
            },
            {
              "index": 624,
              "timeLabel": "2007-01-12T00:00:00",
              "y": 0.5854333333333334
            },
            {
              "index": 625,
              "timeLabel": "2007-01-12T01:00:00",
              "y": 0.3122333333333333
            },
            {
              "index": 626,
              "timeLabel": "2007-01-12T02:00:00",
              "y": 0.3024
            },
            {
              "index": 627,
              "timeLabel": "2007-01-12T03:00:00",
              "y": 0.32156666666666667
            },
            {
              "index": 628,
              "timeLabel": "2007-01-12T04:00:00",
              "y": 0.2930333333333333
            },
            {
              "index": 629,
              "timeLabel": "2007-01-12T05:00:00",
              "y": 0.8123333333333334
            },
            {
              "index": 630,
              "timeLabel": "2007-01-12T06:00:00",
              "y": 1.4514333333333334
            },
            {
              "index": 631,
              "timeLabel": "2007-01-12T07:00:00",
              "y": 2.8325
            },
            {
              "index": 632,
              "timeLabel": "2007-01-12T08:00:00",
              "y": 1.9939333333333333
            },
            {
              "index": 633,
              "timeLabel": "2007-01-12T09:00:00",
              "y": 1.3482
            },
            {
              "index": 634,
              "timeLabel": "2007-01-12T10:00:00",
              "y": 0.9068333333333334
            },
            {
              "index": 635,
              "timeLabel": "2007-01-12T11:00:00",
              "y": 0.2818333333333333
            },
            {
              "index": 636,
              "timeLabel": "2007-01-12T12:00:00",
              "y": 0.2946
            },
            {
              "index": 637,
              "timeLabel": "2007-01-12T13:00:00",
              "y": 0.2538666666666667
            },
            {
              "index": 638,
              "timeLabel": "2007-01-12T14:00:00",
              "y": 0.3349
            },
            {
              "index": 639,
              "timeLabel": "2007-01-12T15:00:00",
              "y": 0.2617333333333333
            },
            {
              "index": 640,
              "timeLabel": "2007-01-12T16:00:00",
              "y": 0.32066666666666666
            },
            {
              "index": 641,
              "timeLabel": "2007-01-12T17:00:00",
              "y": 0.5727
            },
            {
              "index": 642,
              "timeLabel": "2007-01-12T18:00:00",
              "y": 2.549
            },
            {
              "index": 643,
              "timeLabel": "2007-01-12T19:00:00",
              "y": 2.2349
            },
            {
              "index": 644,
              "timeLabel": "2007-01-12T20:00:00",
              "y": 2.2950666666666666
            },
            {
              "index": 645,
              "timeLabel": "2007-01-12T21:00:00",
              "y": 1.5127333333333333
            },
            {
              "index": 646,
              "timeLabel": "2007-01-12T22:00:00",
              "y": 1.4837666666666667
            },
            {
              "index": 647,
              "timeLabel": "2007-01-12T23:00:00",
              "y": 0.7992666666666667
            },
            {
              "index": 648,
              "timeLabel": "2007-01-13T00:00:00",
              "y": 0.8884
            },
            {
              "index": 649,
              "timeLabel": "2007-01-13T01:00:00",
              "y": 0.3167333333333333
            },
            {
              "index": 650,
              "timeLabel": "2007-01-13T02:00:00",
              "y": 0.25643333333333335
            },
            {
              "index": 651,
              "timeLabel": "2007-01-13T03:00:00",
              "y": 0.29786666666666667
            },
            {
              "index": 652,
              "timeLabel": "2007-01-13T04:00:00",
              "y": 0.289
            },
            {
              "index": 653,
              "timeLabel": "2007-01-13T05:00:00",
              "y": 0.2646
            },
            {
              "index": 654,
              "timeLabel": "2007-01-13T06:00:00",
              "y": 0.31516666666666665
            },
            {
              "index": 655,
              "timeLabel": "2007-01-13T07:00:00",
              "y": 1.7926333333333333
            },
            {
              "index": 656,
              "timeLabel": "2007-01-13T08:00:00",
              "y": 2.6555333333333335
            },
            {
              "index": 657,
              "timeLabel": "2007-01-13T09:00:00",
              "y": 1.7159
            },
            {
              "index": 658,
              "timeLabel": "2007-01-13T10:00:00",
              "y": 3.1700333333333335
            },
            {
              "index": 659,
              "timeLabel": "2007-01-13T11:00:00",
              "y": 3.563066666666667
            },
            {
              "index": 660,
              "timeLabel": "2007-01-13T12:00:00",
              "y": 1.9701666666666666
            },
            {
              "index": 661,
              "timeLabel": "2007-01-13T13:00:00",
              "y": 1.6392
            },
            {
              "index": 662,
              "timeLabel": "2007-01-13T14:00:00",
              "y": 1.6297
            },
            {
              "index": 663,
              "timeLabel": "2007-01-13T15:00:00",
              "y": 2.0716666666666668
            },
            {
              "index": 664,
              "timeLabel": "2007-01-13T16:00:00",
              "y": 2.0576333333333334
            },
            {
              "index": 665,
              "timeLabel": "2007-01-13T17:00:00",
              "y": 2.7980666666666667
            },
            {
              "index": 666,
              "timeLabel": "2007-01-13T18:00:00",
              "y": 1.8881000000000001
            },
            {
              "index": 667,
              "timeLabel": "2007-01-13T19:00:00",
              "y": 3.1545
            },
            {
              "index": 668,
              "timeLabel": "2007-01-13T20:00:00",
              "y": 4.5121
            },
            {
              "index": 669,
              "timeLabel": "2007-01-13T21:00:00",
              "y": 4.981466666666667
            },
            {
              "index": 670,
              "timeLabel": "2007-01-13T22:00:00",
              "y": 5.814266666666667
            },
            {
              "index": 671,
              "timeLabel": "2007-01-13T23:00:00",
              "y": 5.0713333333333335
            },
            {
              "index": 672,
              "timeLabel": "2007-01-14T00:00:00",
              "y": 3.3405666666666667
            },
            {
              "index": 673,
              "timeLabel": "2007-01-14T01:00:00",
              "y": 2.916
            },
            {
              "index": 674,
              "timeLabel": "2007-01-14T02:00:00",
              "y": 2.8794333333333335
            },
            {
              "index": 675,
              "timeLabel": "2007-01-14T03:00:00",
              "y": 1.1217333333333332
            },
            {
              "index": 676,
              "timeLabel": "2007-01-14T04:00:00",
              "y": 1.1342333333333334
            },
            {
              "index": 677,
              "timeLabel": "2007-01-14T05:00:00",
              "y": 1.1941
            },
            {
              "index": 678,
              "timeLabel": "2007-01-14T06:00:00",
              "y": 1.5761
            },
            {
              "index": 679,
              "timeLabel": "2007-01-14T07:00:00",
              "y": 1.1410666666666667
            },
            {
              "index": 680,
              "timeLabel": "2007-01-14T08:00:00",
              "y": 1.3151666666666666
            },
            {
              "index": 681,
              "timeLabel": "2007-01-14T09:00:00",
              "y": 2.2260333333333335
            },
            {
              "index": 682,
              "timeLabel": "2007-01-14T10:00:00",
              "y": 1.7363666666666666
            },
            {
              "index": 683,
              "timeLabel": "2007-01-14T11:00:00",
              "y": 1.0085666666666666
            },
            {
              "index": 684,
              "timeLabel": "2007-01-14T12:00:00",
              "y": 0.7125
            },
            {
              "index": 685,
              "timeLabel": "2007-01-14T13:00:00",
              "y": 1.2987
            },
            {
              "index": 686,
              "timeLabel": "2007-01-14T14:00:00",
              "y": 1.8274666666666666
            },
            {
              "index": 687,
              "timeLabel": "2007-01-14T15:00:00",
              "y": 2.0970666666666666
            },
            {
              "index": 688,
              "timeLabel": "2007-01-14T16:00:00",
              "y": 3.4258
            },
            {
              "index": 689,
              "timeLabel": "2007-01-14T17:00:00",
              "y": 4.211133333333334
            },
            {
              "index": 690,
              "timeLabel": "2007-01-14T18:00:00",
              "y": null
            },
            {
              "index": 691,
              "timeLabel": "2007-01-14T19:00:00",
              "y": 3.2915
            },
            {
              "index": 692,
              "timeLabel": "2007-01-14T20:00:00",
              "y": 3.1929
            },
            {
              "index": 693,
              "timeLabel": "2007-01-14T21:00:00",
              "y": 2.1076333333333332
            },
            {
              "index": 694,
              "timeLabel": "2007-01-14T22:00:00",
              "y": 1.4627333333333334
            },
            {
              "index": 695,
              "timeLabel": "2007-01-14T23:00:00",
              "y": 1.3745333333333334
            },
            {
              "index": 696,
              "timeLabel": "2007-01-15T00:00:00",
              "y": 1.3573
            },
            {
              "index": 697,
              "timeLabel": "2007-01-15T01:00:00",
              "y": 1.3417333333333334
            },
            {
              "index": 698,
              "timeLabel": "2007-01-15T02:00:00",
              "y": 0.462
            },
            {
              "index": 699,
              "timeLabel": "2007-01-15T03:00:00",
              "y": 0.28986666666666666
            },
            {
              "index": 700,
              "timeLabel": "2007-01-15T04:00:00",
              "y": 0.29159999999999997
            },
            {
              "index": 701,
              "timeLabel": "2007-01-15T05:00:00",
              "y": 0.244
            },
            {
              "index": 702,
              "timeLabel": "2007-01-15T06:00:00",
              "y": 0.30833333333333335
            },
            {
              "index": 703,
              "timeLabel": "2007-01-15T07:00:00",
              "y": 1.9449
            },
            {
              "index": 704,
              "timeLabel": "2007-01-15T08:00:00",
              "y": 2.5957333333333334
            },
            {
              "index": 705,
              "timeLabel": "2007-01-15T09:00:00",
              "y": 1.595
            },
            {
              "index": 706,
              "timeLabel": "2007-01-15T10:00:00",
              "y": 1.8552666666666666
            },
            {
              "index": 707,
              "timeLabel": "2007-01-15T11:00:00",
              "y": 1.3714333333333333
            },
            {
              "index": 708,
              "timeLabel": "2007-01-15T12:00:00",
              "y": 1.1310333333333333
            },
            {
              "index": 709,
              "timeLabel": "2007-01-15T13:00:00",
              "y": 0.6521
            },
            {
              "index": 710,
              "timeLabel": "2007-01-15T14:00:00",
              "y": 1.4841333333333333
            },
            {
              "index": 711,
              "timeLabel": "2007-01-15T15:00:00",
              "y": 1.6232333333333333
            },
            {
              "index": 712,
              "timeLabel": "2007-01-15T16:00:00",
              "y": 1.5423333333333333
            },
            {
              "index": 713,
              "timeLabel": "2007-01-15T17:00:00",
              "y": 1.7919666666666667
            },
            {
              "index": 714,
              "timeLabel": "2007-01-15T18:00:00",
              "y": 2.2478333333333333
            },
            {
              "index": 715,
              "timeLabel": "2007-01-15T19:00:00",
              "y": 2.9717333333333333
            },
            {
              "index": 716,
              "timeLabel": "2007-01-15T20:00:00",
              "y": 2.742566666666667
            },
            {
              "index": 717,
              "timeLabel": "2007-01-15T21:00:00",
              "y": 1.6235
            },
            {
              "index": 718,
              "timeLabel": "2007-01-15T22:00:00",
              "y": 1.8572333333333333
            },
            {
              "index": 719,
              "timeLabel": "2007-01-15T23:00:00",
              "y": 2.486466666666667
            },
            {
              "index": 720,
              "timeLabel": "2007-01-16T00:00:00",
              "y": 0.3873666666666667
            },
            {
              "index": 721,
              "timeLabel": "2007-01-16T01:00:00",
              "y": 0.2992666666666667
            },
            {
              "index": 722,
              "timeLabel": "2007-01-16T02:00:00",
              "y": 0.3085
            },
            {
              "index": 723,
              "timeLabel": "2007-01-16T03:00:00",
              "y": 0.2936666666666667
            },
            {
              "index": 724,
              "timeLabel": "2007-01-16T04:00:00",
              "y": 0.7837666666666666
            },
            {
              "index": 725,
              "timeLabel": "2007-01-16T05:00:00",
              "y": 0.40863333333333335
            },
            {
              "index": 726,
              "timeLabel": "2007-01-16T06:00:00",
              "y": 0.7007666666666666
            },
            {
              "index": 727,
              "timeLabel": "2007-01-16T07:00:00",
              "y": 2.4842333333333335
            },
            {
              "index": 728,
              "timeLabel": "2007-01-16T08:00:00",
              "y": 1.0849
            },
            {
              "index": 729,
              "timeLabel": "2007-01-16T09:00:00",
              "y": 0.8876
            },
            {
              "index": 730,
              "timeLabel": "2007-01-16T10:00:00",
              "y": 0.4004666666666667
            },
            {
              "index": 731,
              "timeLabel": "2007-01-16T11:00:00",
              "y": 0.6403666666666666
            },
            {
              "index": 732,
              "timeLabel": "2007-01-16T12:00:00",
              "y": 1.9346666666666668
            },
            {
              "index": 733,
              "timeLabel": "2007-01-16T13:00:00",
              "y": 0.9449666666666667
            },
            {
              "index": 734,
              "timeLabel": "2007-01-16T14:00:00",
              "y": 1.9168666666666667
            },
            {
              "index": 735,
              "timeLabel": "2007-01-16T15:00:00",
              "y": 0.8901333333333333
            },
            {
              "index": 736,
              "timeLabel": "2007-01-16T16:00:00",
              "y": 1.6489666666666667
            },
            {
              "index": 737,
              "timeLabel": "2007-01-16T17:00:00",
              "y": 2.8615
            },
            {
              "index": 738,
              "timeLabel": "2007-01-16T18:00:00",
              "y": 3.1261666666666668
            },
            {
              "index": 739,
              "timeLabel": "2007-01-16T19:00:00",
              "y": 1.9595
            },
            {
              "index": 740,
              "timeLabel": "2007-01-16T20:00:00",
              "y": 1.3968333333333334
            },
            {
              "index": 741,
              "timeLabel": "2007-01-16T21:00:00",
              "y": 1.4027666666666667
            },
            {
              "index": 742,
              "timeLabel": "2007-01-16T22:00:00",
              "y": 0.9547666666666667
            },
            {
              "index": 743,
              "timeLabel": "2007-01-16T23:00:00",
              "y": 0.3900666666666667
            },
            {
              "index": 744,
              "timeLabel": "2007-01-17T00:00:00",
              "y": 0.29933333333333334
            },
            {
              "index": 745,
              "timeLabel": "2007-01-17T01:00:00",
              "y": 0.24646666666666667
            },
            {
              "index": 746,
              "timeLabel": "2007-01-17T02:00:00",
              "y": 0.8600666666666666
            },
            {
              "index": 747,
              "timeLabel": "2007-01-17T03:00:00",
              "y": 0.2673
            },
            {
              "index": 748,
              "timeLabel": "2007-01-17T04:00:00",
              "y": 0.2867
            },
            {
              "index": 749,
              "timeLabel": "2007-01-17T05:00:00",
              "y": 0.2635
            },
            {
              "index": 750,
              "timeLabel": "2007-01-17T06:00:00",
              "y": 0.8768
            },
            {
              "index": 751,
              "timeLabel": "2007-01-17T07:00:00",
              "y": 2.2358
            },
            {
              "index": 752,
              "timeLabel": "2007-01-17T08:00:00",
              "y": 3.1199333333333334
            },
            {
              "index": 753,
              "timeLabel": "2007-01-17T09:00:00",
              "y": 3.227133333333333
            },
            {
              "index": 754,
              "timeLabel": "2007-01-17T10:00:00",
              "y": 4.085766666666666
            },
            {
              "index": 755,
              "timeLabel": "2007-01-17T11:00:00",
              "y": 2.4455999999999998
            },
            {
              "index": 756,
              "timeLabel": "2007-01-17T12:00:00",
              "y": 1.7472
            },
            {
              "index": 757,
              "timeLabel": "2007-01-17T13:00:00",
              "y": 1.4257
            },
            {
              "index": 758,
              "timeLabel": "2007-01-17T14:00:00",
              "y": 1.5297
            },
            {
              "index": 759,
              "timeLabel": "2007-01-17T15:00:00",
              "y": 3.871966666666667
            },
            {
              "index": 760,
              "timeLabel": "2007-01-17T16:00:00",
              "y": 1.8885
            },
            {
              "index": 761,
              "timeLabel": "2007-01-17T17:00:00",
              "y": 3.066866666666667
            },
            {
              "index": 762,
              "timeLabel": "2007-01-17T18:00:00",
              "y": 1.6686999999999999
            },
            {
              "index": 763,
              "timeLabel": "2007-01-17T19:00:00",
              "y": 2.606533333333333
            },
            {
              "index": 764,
              "timeLabel": "2007-01-17T20:00:00",
              "y": 3.220833333333333
            },
            {
              "index": 765,
              "timeLabel": "2007-01-17T21:00:00",
              "y": 3.5447333333333333
            },
            {
              "index": 766,
              "timeLabel": "2007-01-17T22:00:00",
              "y": 2.720666666666667
            },
            {
              "index": 767,
              "timeLabel": "2007-01-17T23:00:00",
              "y": 1.9556666666666667
            },
            {
              "index": 768,
              "timeLabel": "2007-01-18T00:00:00",
              "y": 1.4016666666666666
            },
            {
              "index": 769,
              "timeLabel": "2007-01-18T01:00:00",
              "y": 1.1285666666666667
            },
            {
              "index": 770,
              "timeLabel": "2007-01-18T02:00:00",
              "y": 0.2991333333333333
            },
            {
              "index": 771,
              "timeLabel": "2007-01-18T03:00:00",
              "y": 0.28536666666666666
            },
            {
              "index": 772,
              "timeLabel": "2007-01-18T04:00:00",
              "y": 0.2859333333333333
            },
            {
              "index": 773,
              "timeLabel": "2007-01-18T05:00:00",
              "y": 0.2725666666666667
            },
            {
              "index": 774,
              "timeLabel": "2007-01-18T06:00:00",
              "y": 0.7473333333333333
            },
            {
              "index": 775,
              "timeLabel": "2007-01-18T07:00:00",
              "y": 2.6217333333333332
            },
            {
              "index": 776,
              "timeLabel": "2007-01-18T08:00:00",
              "y": 1.6582666666666666
            },
            {
              "index": 777,
              "timeLabel": "2007-01-18T09:00:00",
              "y": 1.3265666666666667
            },
            {
              "index": 778,
              "timeLabel": "2007-01-18T10:00:00",
              "y": 0.8661333333333333
            },
            {
              "index": 779,
              "timeLabel": "2007-01-18T11:00:00",
              "y": 0.27963333333333334
            },
            {
              "index": 780,
              "timeLabel": "2007-01-18T12:00:00",
              "y": 0.3050333333333333
            },
            {
              "index": 781,
              "timeLabel": "2007-01-18T13:00:00",
              "y": 0.5061
            },
            {
              "index": 782,
              "timeLabel": "2007-01-18T14:00:00",
              "y": 0.3720333333333333
            },
            {
              "index": 783,
              "timeLabel": "2007-01-18T15:00:00",
              "y": 0.6128333333333333
            },
            {
              "index": 784,
              "timeLabel": "2007-01-18T16:00:00",
              "y": 1.6330666666666667
            },
            {
              "index": 785,
              "timeLabel": "2007-01-18T17:00:00",
              "y": 2.1533333333333333
            },
            {
              "index": 786,
              "timeLabel": "2007-01-18T18:00:00",
              "y": 3.1334666666666666
            },
            {
              "index": 787,
              "timeLabel": "2007-01-18T19:00:00",
              "y": 2.793
            },
            {
              "index": 788,
              "timeLabel": "2007-01-18T20:00:00",
              "y": 2.9685333333333332
            },
            {
              "index": 789,
              "timeLabel": "2007-01-18T21:00:00",
              "y": 2.7788
            },
            {
              "index": 790,
              "timeLabel": "2007-01-18T22:00:00",
              "y": 1.4036333333333333
            },
            {
              "index": 791,
              "timeLabel": "2007-01-18T23:00:00",
              "y": 0.5249666666666667
            },
            {
              "index": 792,
              "timeLabel": "2007-01-19T00:00:00",
              "y": 0.3053666666666667
            },
            {
              "index": 793,
              "timeLabel": "2007-01-19T01:00:00",
              "y": 0.31633333333333336
            },
            {
              "index": 794,
              "timeLabel": "2007-01-19T02:00:00",
              "y": 0.3047666666666667
            },
            {
              "index": 795,
              "timeLabel": "2007-01-19T03:00:00",
              "y": 0.30856666666666666
            },
            {
              "index": 796,
              "timeLabel": "2007-01-19T04:00:00",
              "y": 0.31726666666666664
            },
            {
              "index": 797,
              "timeLabel": "2007-01-19T05:00:00",
              "y": 0.30043333333333333
            },
            {
              "index": 798,
              "timeLabel": "2007-01-19T06:00:00",
              "y": 0.8006666666666666
            },
            {
              "index": 799,
              "timeLabel": "2007-01-19T07:00:00",
              "y": 2.8391
            },
            {
              "index": 800,
              "timeLabel": "2007-01-19T08:00:00",
              "y": 2.1277666666666666
            },
            {
              "index": 801,
              "timeLabel": "2007-01-19T09:00:00",
              "y": 1.8329666666666666
            },
            {
              "index": 802,
              "timeLabel": "2007-01-19T10:00:00",
              "y": 1.1446333333333334
            },
            {
              "index": 803,
              "timeLabel": "2007-01-19T11:00:00",
              "y": 0.2579
            },
            {
              "index": 804,
              "timeLabel": "2007-01-19T12:00:00",
              "y": 0.3025
            },
            {
              "index": 805,
              "timeLabel": "2007-01-19T13:00:00",
              "y": 0.3826
            },
            {
              "index": 806,
              "timeLabel": "2007-01-19T14:00:00",
              "y": 0.4230333333333333
            },
            {
              "index": 807,
              "timeLabel": "2007-01-19T15:00:00",
              "y": 0.3586666666666667
            },
            {
              "index": 808,
              "timeLabel": "2007-01-19T16:00:00",
              "y": 1.0321666666666667
            },
            {
              "index": 809,
              "timeLabel": "2007-01-19T17:00:00",
              "y": 1.3404666666666667
            },
            {
              "index": 810,
              "timeLabel": "2007-01-19T18:00:00",
              "y": 0.7348666666666667
            },
            {
              "index": 811,
              "timeLabel": "2007-01-19T19:00:00",
              "y": 0.9607666666666667
            },
            {
              "index": 812,
              "timeLabel": "2007-01-19T20:00:00",
              "y": 1.5455666666666668
            },
            {
              "index": 813,
              "timeLabel": "2007-01-19T21:00:00",
              "y": 2.422633333333333
            },
            {
              "index": 814,
              "timeLabel": "2007-01-19T22:00:00",
              "y": 2.4906333333333333
            },
            {
              "index": 815,
              "timeLabel": "2007-01-19T23:00:00",
              "y": 1.8243333333333334
            },
            {
              "index": 816,
              "timeLabel": "2007-01-20T00:00:00",
              "y": 1.7318
            },
            {
              "index": 817,
              "timeLabel": "2007-01-20T01:00:00",
              "y": 1.1492666666666667
            },
            {
              "index": 818,
              "timeLabel": "2007-01-20T02:00:00",
              "y": 1.0384
            },
            {
              "index": 819,
              "timeLabel": "2007-01-20T03:00:00",
              "y": 1.1203333333333334
            },
            {
              "index": 820,
              "timeLabel": "2007-01-20T04:00:00",
              "y": 1.0231666666666666
            },
            {
              "index": 821,
              "timeLabel": "2007-01-20T05:00:00",
              "y": 1.051
            },
            {
              "index": 822,
              "timeLabel": "2007-01-20T06:00:00",
              "y": 1.1070333333333333
            },
            {
              "index": 823,
              "timeLabel": "2007-01-20T07:00:00",
              "y": 2.1135333333333333
            },
            {
              "index": 824,
              "timeLabel": "2007-01-20T08:00:00",
              "y": 2.0351333333333335
            },
            {
              "index": 825,
              "timeLabel": "2007-01-20T09:00:00",
              "y": 2.0485333333333333
            },
            {
              "index": 826,
              "timeLabel": "2007-01-20T10:00:00",
              "y": 2.279733333333333
            },
            {
              "index": 827,
              "timeLabel": "2007-01-20T11:00:00",
              "y": 2.0756
            },
            {
              "index": 828,
              "timeLabel": "2007-01-20T12:00:00",
              "y": 1.8431333333333333
            },
            {
              "index": 829,
              "timeLabel": "2007-01-20T13:00:00",
              "y": 4.251033333333333
            },
            {
              "index": 830,
              "timeLabel": "2007-01-20T14:00:00",
              "y": 2.6337
            },
            {
              "index": 831,
              "timeLabel": "2007-01-20T15:00:00",
              "y": 1.9713666666666667
            },
            {
              "index": 832,
              "timeLabel": "2007-01-20T16:00:00",
              "y": 1.9525333333333332
            },
            {
              "index": 833,
              "timeLabel": "2007-01-20T17:00:00",
              "y": 2.7952
            },
            {
              "index": 834,
              "timeLabel": "2007-01-20T18:00:00",
              "y": 4.312366666666667
            },
            {
              "index": 835,
              "timeLabel": "2007-01-20T19:00:00",
              "y": 5.3430333333333335
            },
            {
              "index": 836,
              "timeLabel": "2007-01-20T20:00:00",
              "y": 3.7129333333333334
            },
            {
              "index": 837,
              "timeLabel": "2007-01-20T21:00:00",
              "y": 2.4257333333333335
            },
            {
              "index": 838,
              "timeLabel": "2007-01-20T22:00:00",
              "y": 1.0950333333333333
            },
            {
              "index": 839,
              "timeLabel": "2007-01-20T23:00:00",
              "y": 1.1192666666666666
            }
          ],
          "result": {
            "metrics": {
              "origin": 672.0,
              "trainingCalendar": 672.0,
              "trainingObserved": 670.0,
              "horizon": 168.0,
              "forecastDefined": 168.0,
              "scorePairs": 167.0,
              "MAE": 1.1951193612774451,
              "MSE": 2.8571128460146378
            },
            "pred": [
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335
            ],
            "actual": [
              3.3405666666666667,
              2.916,
              2.8794333333333335,
              1.1217333333333332,
              1.1342333333333334,
              1.1941,
              1.5761,
              1.1410666666666667,
              1.3151666666666666,
              2.2260333333333335,
              1.7363666666666666,
              1.0085666666666666,
              0.7125,
              1.2987,
              1.8274666666666666,
              2.0970666666666666,
              3.4258,
              4.211133333333334,
              null,
              3.2915,
              3.1929,
              2.1076333333333332,
              1.4627333333333334,
              1.3745333333333334,
              1.3573,
              1.3417333333333334,
              0.462,
              0.28986666666666666,
              0.29159999999999997,
              0.244,
              0.30833333333333335,
              1.9449,
              2.5957333333333334,
              1.595,
              1.8552666666666666,
              1.3714333333333333,
              1.1310333333333333,
              0.6521,
              1.4841333333333333,
              1.6232333333333333,
              1.5423333333333333,
              1.7919666666666667,
              2.2478333333333333,
              2.9717333333333333,
              2.742566666666667,
              1.6235,
              1.8572333333333333,
              2.486466666666667,
              0.3873666666666667,
              0.2992666666666667,
              0.3085,
              0.2936666666666667,
              0.7837666666666666,
              0.40863333333333335,
              0.7007666666666666,
              2.4842333333333335,
              1.0849,
              0.8876,
              0.4004666666666667,
              0.6403666666666666,
              1.9346666666666668,
              0.9449666666666667,
              1.9168666666666667,
              0.8901333333333333,
              1.6489666666666667,
              2.8615,
              3.1261666666666668,
              1.9595,
              1.3968333333333334,
              1.4027666666666667,
              0.9547666666666667,
              0.3900666666666667,
              0.29933333333333334,
              0.24646666666666667,
              0.8600666666666666,
              0.2673,
              0.2867,
              0.2635,
              0.8768,
              2.2358,
              3.1199333333333334,
              3.227133333333333,
              4.085766666666666,
              2.4455999999999998,
              1.7472,
              1.4257,
              1.5297,
              3.871966666666667,
              1.8885,
              3.066866666666667,
              1.6686999999999999,
              2.606533333333333,
              3.220833333333333,
              3.5447333333333333,
              2.720666666666667,
              1.9556666666666667,
              1.4016666666666666,
              1.1285666666666667,
              0.2991333333333333,
              0.28536666666666666,
              0.2859333333333333,
              0.2725666666666667,
              0.7473333333333333,
              2.6217333333333332,
              1.6582666666666666,
              1.3265666666666667,
              0.8661333333333333,
              0.27963333333333334,
              0.3050333333333333,
              0.5061,
              0.3720333333333333,
              0.6128333333333333,
              1.6330666666666667,
              2.1533333333333333,
              3.1334666666666666,
              2.793,
              2.9685333333333332,
              2.7788,
              1.4036333333333333,
              0.5249666666666667,
              0.3053666666666667,
              0.31633333333333336,
              0.3047666666666667,
              0.30856666666666666,
              0.31726666666666664,
              0.30043333333333333,
              0.8006666666666666,
              2.8391,
              2.1277666666666666,
              1.8329666666666666,
              1.1446333333333334,
              0.2579,
              0.3025,
              0.3826,
              0.4230333333333333,
              0.3586666666666667,
              1.0321666666666667,
              1.3404666666666667,
              0.7348666666666667,
              0.9607666666666667,
              1.5455666666666668,
              2.422633333333333,
              2.4906333333333333,
              1.8243333333333334,
              1.7318,
              1.1492666666666667,
              1.0384,
              1.1203333333333334,
              1.0231666666666666,
              1.051,
              1.1070333333333333,
              2.1135333333333333,
              2.0351333333333335,
              2.0485333333333333,
              2.279733333333333,
              2.0756,
              1.8431333333333333,
              4.251033333333333,
              2.6337,
              1.9713666666666667,
              1.9525333333333332,
              2.7952,
              4.312366666666667,
              5.3430333333333335,
              3.7129333333333334,
              2.4257333333333335,
              1.0950333333333333,
              1.1192666666666666
            ],
            "error": [
              2.452166666666667,
              2.599266666666667,
              2.623,
              0.8238666666666665,
              0.8452333333333335,
              0.9295,
              1.2609333333333335,
              -0.6515666666666666,
              -1.340366666666667,
              0.5101333333333335,
              -1.4336666666666669,
              -2.5545,
              -1.2576666666666667,
              -0.3405,
              0.19776666666666665,
              0.025399999999999867,
              1.3681666666666668,
              1.413066666666667,
              null,
              0.137,
              -1.3192000000000004,
              -2.8738333333333337,
              -4.351533333333333,
              -3.6968,
              0.4689,
              1.0250000000000001,
              0.20556666666666668,
              -0.008000000000000007,
              0.002599999999999991,
              -0.020600000000000007,
              -0.006833333333333302,
              0.15226666666666677,
              -0.059800000000000075,
              -0.12090000000000001,
              -1.3147666666666669,
              -2.1916333333333338,
              -0.8391333333333333,
              -0.9871,
              -0.14556666666666662,
              -0.44843333333333346,
              -0.5153000000000001,
              -1.0061,
              0.35973333333333324,
              -0.18276666666666674,
              -1.7695333333333334,
              -3.357966666666667,
              -3.9570333333333334,
              -2.5848666666666666,
              -0.5010333333333332,
              -0.01746666666666663,
              0.05206666666666665,
              -0.0041999999999999815,
              0.49476666666666663,
              0.14403333333333335,
              0.3856,
              0.6916000000000002,
              -1.5706333333333335,
              -0.8283,
              -2.769566666666667,
              -2.9227000000000003,
              -0.035499999999999865,
              -0.6942333333333333,
              0.2871666666666668,
              -1.1815333333333333,
              -0.40866666666666673,
              0.06343333333333323,
              1.2380666666666666,
              -1.195,
              -3.115266666666667,
              -3.5787000000000004,
              -4.8595,
              -4.681266666666667,
              -0.5890666666666666,
              -0.07026666666666664,
              0.6036333333333332,
              -0.030566666666666686,
              -0.0022999999999999687,
              -0.0010999999999999899,
              0.5616333333333334,
              0.4431666666666665,
              0.4643999999999999,
              1.5112333333333332,
              0.9157333333333328,
              -1.117466666666667,
              -0.22296666666666654,
              -0.21350000000000002,
              -0.09999999999999987,
              1.8003,
              -0.16913333333333336,
              0.26880000000000015,
              -0.21940000000000026,
              -0.5479666666666669,
              -1.291266666666667,
              -1.4367333333333336,
              -3.0936,
              -3.115666666666667,
              0.5132666666666666,
              0.8118333333333334,
              0.04269999999999996,
              -0.012500000000000011,
              -0.003066666666666662,
              0.007966666666666677,
              0.43216666666666664,
              0.8291,
              -0.997266666666667,
              -0.3893333333333333,
              -2.3039,
              -3.2834333333333334,
              -1.6651333333333334,
              -1.1331,
              -1.2576666666666667,
              -1.4588333333333334,
              -0.42456666666666676,
              -0.6447333333333334,
              1.2453666666666665,
              -0.36149999999999993,
              -1.543566666666667,
              -2.202666666666667,
              -4.410633333333333,
              -4.546366666666667,
              -0.5830333333333333,
              -0.00039999999999995595,
              0.04833333333333334,
              0.010699999999999987,
              0.028266666666666662,
              0.03583333333333333,
              0.4855,
              1.0464666666666669,
              -0.5277666666666669,
              0.11706666666666665,
              -2.0254000000000003,
              -3.3051666666666666,
              -1.6676666666666666,
              -1.2566,
              -1.2066666666666666,
              -1.713,
              -1.0254666666666667,
              -1.4576,
              -1.1532333333333336,
              -2.1937333333333333,
              -2.9665333333333335,
              -2.5588333333333337,
              -3.3236333333333334,
              -3.247,
              0.8434,
              0.8325333333333333,
              0.7819666666666667,
              0.8224666666666667,
              0.7341666666666666,
              0.7864,
              0.7918666666666667,
              0.32089999999999996,
              -0.6204000000000001,
              0.33263333333333334,
              -0.8903000000000003,
              -1.4874666666666667,
              -0.12703333333333333,
              2.6118333333333332,
              1.0040000000000002,
              -0.10030000000000006,
              -0.1051000000000002,
              -0.002866666666666795,
              2.4242666666666666,
              2.1885333333333334,
              -0.7991666666666668,
              -2.5557333333333334,
              -4.719233333333333,
              -3.952066666666667
            ],
            "fit": null
          }
        },
        "plotPoints": [
          {
            "label": "Actual recorded values",
            "x": [
              648,
              649,
              650,
              651,
              652,
              653,
              654,
              655,
              656,
              657,
              658,
              659,
              660,
              661,
              662,
              663,
              664,
              665,
              666,
              667,
              668,
              669,
              670,
              671,
              672,
              673,
              674,
              675,
              676,
              677,
              678,
              679,
              680,
              681,
              682,
              683,
              684,
              685,
              686,
              687,
              688,
              689,
              690,
              691,
              692,
              693,
              694,
              695,
              696,
              697,
              698,
              699,
              700,
              701,
              702,
              703,
              704,
              705,
              706,
              707,
              708,
              709,
              710,
              711,
              712,
              713,
              714,
              715,
              716,
              717,
              718,
              719,
              720,
              721,
              722,
              723,
              724,
              725,
              726,
              727,
              728,
              729,
              730,
              731,
              732,
              733,
              734,
              735,
              736,
              737,
              738,
              739,
              740,
              741,
              742,
              743,
              744,
              745,
              746,
              747,
              748,
              749,
              750,
              751,
              752,
              753,
              754,
              755,
              756,
              757,
              758,
              759,
              760,
              761,
              762,
              763,
              764,
              765,
              766,
              767,
              768,
              769,
              770,
              771,
              772,
              773,
              774,
              775,
              776,
              777,
              778,
              779,
              780,
              781,
              782,
              783,
              784,
              785,
              786,
              787,
              788,
              789,
              790,
              791,
              792,
              793,
              794,
              795,
              796,
              797,
              798,
              799,
              800,
              801,
              802,
              803,
              804,
              805,
              806,
              807,
              808,
              809,
              810,
              811,
              812,
              813,
              814,
              815,
              816,
              817,
              818,
              819,
              820,
              821,
              822,
              823,
              824,
              825,
              826,
              827,
              828,
              829,
              830,
              831,
              832,
              833,
              834,
              835,
              836,
              837,
              838,
              839
            ],
            "y": [
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              3.3405666666666667,
              2.916,
              2.8794333333333335,
              1.1217333333333332,
              1.1342333333333334,
              1.1941,
              1.5761,
              1.1410666666666667,
              1.3151666666666666,
              2.2260333333333335,
              1.7363666666666666,
              1.0085666666666666,
              0.7125,
              1.2987,
              1.8274666666666666,
              2.0970666666666666,
              3.4258,
              4.211133333333334,
              null,
              3.2915,
              3.1929,
              2.1076333333333332,
              1.4627333333333334,
              1.3745333333333334,
              1.3573,
              1.3417333333333334,
              0.462,
              0.28986666666666666,
              0.29159999999999997,
              0.244,
              0.30833333333333335,
              1.9449,
              2.5957333333333334,
              1.595,
              1.8552666666666666,
              1.3714333333333333,
              1.1310333333333333,
              0.6521,
              1.4841333333333333,
              1.6232333333333333,
              1.5423333333333333,
              1.7919666666666667,
              2.2478333333333333,
              2.9717333333333333,
              2.742566666666667,
              1.6235,
              1.8572333333333333,
              2.486466666666667,
              0.3873666666666667,
              0.2992666666666667,
              0.3085,
              0.2936666666666667,
              0.7837666666666666,
              0.40863333333333335,
              0.7007666666666666,
              2.4842333333333335,
              1.0849,
              0.8876,
              0.4004666666666667,
              0.6403666666666666,
              1.9346666666666668,
              0.9449666666666667,
              1.9168666666666667,
              0.8901333333333333,
              1.6489666666666667,
              2.8615,
              3.1261666666666668,
              1.9595,
              1.3968333333333334,
              1.4027666666666667,
              0.9547666666666667,
              0.3900666666666667,
              0.29933333333333334,
              0.24646666666666667,
              0.8600666666666666,
              0.2673,
              0.2867,
              0.2635,
              0.8768,
              2.2358,
              3.1199333333333334,
              3.227133333333333,
              4.085766666666666,
              2.4455999999999998,
              1.7472,
              1.4257,
              1.5297,
              3.871966666666667,
              1.8885,
              3.066866666666667,
              1.6686999999999999,
              2.606533333333333,
              3.220833333333333,
              3.5447333333333333,
              2.720666666666667,
              1.9556666666666667,
              1.4016666666666666,
              1.1285666666666667,
              0.2991333333333333,
              0.28536666666666666,
              0.2859333333333333,
              0.2725666666666667,
              0.7473333333333333,
              2.6217333333333332,
              1.6582666666666666,
              1.3265666666666667,
              0.8661333333333333,
              0.27963333333333334,
              0.3050333333333333,
              0.5061,
              0.3720333333333333,
              0.6128333333333333,
              1.6330666666666667,
              2.1533333333333333,
              3.1334666666666666,
              2.793,
              2.9685333333333332,
              2.7788,
              1.4036333333333333,
              0.5249666666666667,
              0.3053666666666667,
              0.31633333333333336,
              0.3047666666666667,
              0.30856666666666666,
              0.31726666666666664,
              0.30043333333333333,
              0.8006666666666666,
              2.8391,
              2.1277666666666666,
              1.8329666666666666,
              1.1446333333333334,
              0.2579,
              0.3025,
              0.3826,
              0.4230333333333333,
              0.3586666666666667,
              1.0321666666666667,
              1.3404666666666667,
              0.7348666666666667,
              0.9607666666666667,
              1.5455666666666668,
              2.422633333333333,
              2.4906333333333333,
              1.8243333333333334,
              1.7318,
              1.1492666666666667,
              1.0384,
              1.1203333333333334,
              1.0231666666666666,
              1.051,
              1.1070333333333333,
              2.1135333333333333,
              2.0351333333333335,
              2.0485333333333333,
              2.279733333333333,
              2.0756,
              1.8431333333333333,
              4.251033333333333,
              2.6337,
              1.9713666666666667,
              1.9525333333333332,
              2.7952,
              4.312366666666667,
              5.3430333333333335,
              3.7129333333333334,
              2.4257333333333335,
              1.0950333333333333,
              1.1192666666666666
            ]
          },
          {
            "label": "Declared model forecast",
            "x": [
              672.0,
              673.0,
              674.0,
              675.0,
              676.0,
              677.0,
              678.0,
              679.0,
              680.0,
              681.0,
              682.0,
              683.0,
              684.0,
              685.0,
              686.0,
              687.0,
              688.0,
              689.0,
              690.0,
              691.0,
              692.0,
              693.0,
              694.0,
              695.0,
              696.0,
              697.0,
              698.0,
              699.0,
              700.0,
              701.0,
              702.0,
              703.0,
              704.0,
              705.0,
              706.0,
              707.0,
              708.0,
              709.0,
              710.0,
              711.0,
              712.0,
              713.0,
              714.0,
              715.0,
              716.0,
              717.0,
              718.0,
              719.0,
              720.0,
              721.0,
              722.0,
              723.0,
              724.0,
              725.0,
              726.0,
              727.0,
              728.0,
              729.0,
              730.0,
              731.0,
              732.0,
              733.0,
              734.0,
              735.0,
              736.0,
              737.0,
              738.0,
              739.0,
              740.0,
              741.0,
              742.0,
              743.0,
              744.0,
              745.0,
              746.0,
              747.0,
              748.0,
              749.0,
              750.0,
              751.0,
              752.0,
              753.0,
              754.0,
              755.0,
              756.0,
              757.0,
              758.0,
              759.0,
              760.0,
              761.0,
              762.0,
              763.0,
              764.0,
              765.0,
              766.0,
              767.0,
              768.0,
              769.0,
              770.0,
              771.0,
              772.0,
              773.0,
              774.0,
              775.0,
              776.0,
              777.0,
              778.0,
              779.0,
              780.0,
              781.0,
              782.0,
              783.0,
              784.0,
              785.0,
              786.0,
              787.0,
              788.0,
              789.0,
              790.0,
              791.0,
              792.0,
              793.0,
              794.0,
              795.0,
              796.0,
              797.0,
              798.0,
              799.0,
              800.0,
              801.0,
              802.0,
              803.0,
              804.0,
              805.0,
              806.0,
              807.0,
              808.0,
              809.0,
              810.0,
              811.0,
              812.0,
              813.0,
              814.0,
              815.0,
              816.0,
              817.0,
              818.0,
              819.0,
              820.0,
              821.0,
              822.0,
              823.0,
              824.0,
              825.0,
              826.0,
              827.0,
              828.0,
              829.0,
              830.0,
              831.0,
              832.0,
              833.0,
              834.0,
              835.0,
              836.0,
              837.0,
              838.0,
              839.0
            ],
            "y": [
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335,
              0.8884,
              0.3167333333333333,
              0.25643333333333335,
              0.29786666666666667,
              0.289,
              0.2646,
              0.31516666666666665,
              1.7926333333333333,
              2.6555333333333335,
              1.7159,
              3.1700333333333335,
              3.563066666666667,
              1.9701666666666666,
              1.6392,
              1.6297,
              2.0716666666666668,
              2.0576333333333334,
              2.7980666666666667,
              1.8881000000000001,
              3.1545,
              4.5121,
              4.981466666666667,
              5.814266666666667,
              5.0713333333333335
            ]
          }
        ],
        "plotFile": "metr14-plots/realdata-person-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      },
      "company": {
        "api": "realdata",
        "variant": "company",
        "language": "r",
        "codeFile": "metr14-code/realdata-company.R",
        "codeText": "args<-commandArgs(trailingOnly=TRUE)\ndest<-if(length(args))args[1]else \"realdata-company-output\"\nscript<-commandArgs()[grepl(\"^--file=\",commandArgs())][1]\nroot<-dirname(dirname(normalizePath(sub(\"^--file=\",\"\",script))))\noptions(metr14.fixed.root=root)\nsource(file.path(root,\"metr14-fixed-support.R\"))\nrun_fixed(\"realdata\",\"company\",dest)\n",
        "codeSHA": "10a9b3a34bba44ad2bc7cee3a82684f71318d75293a151af017d54f39df4c7d2",
        "supportFiles": [
          {
            "file": "metr14-fixed-support.R",
            "codeText": "# Public METR14 fixed-example numeric/plot support;no JavaScript engine.\n# Run beside the public metr14-sources directory and metr14-profiles.csv.\n# Numerical QR is a separate finite-precision implementation, not exact fractions.\n# No production JS engine/private author checker/network download is used.\noptions(stringsAsFactors=FALSE,digits=17)\nargs<-commandArgs(trailingOnly=TRUE);base<-if(length(args))args[1]else 'metr14-r-results'\nroot<-normalizePath(getOption('metr14.fixed.root',getwd()))\nrd<-function(n)read.csv(file.path(root,'metr14-sources',n),check.names=FALSE,colClasses='character',na.strings=character(),fileEncoding='UTF-8-BOM')\nnumber<-function(x){vapply(x,function(s){if(is.na(s)||s==''||s=='?')return(NA_real_);if(grepl('/',s,fixed=TRUE)){a<-strsplit(s,'/',fixed=TRUE)[[1]];as.numeric(a[1])/as.numeric(a[2])}else as.numeric(s)},numeric(1))}\ng<-rd('actual45-KOR-GDPpercapita-original-1980-2024.csv');models<-list(country=data.frame(index=0:(nrow(g)-1),timeLabel=g$year,y=number(g$gdpOriginalToken)))\nm<-rd('actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv');h<-rd('derived840-household-civil-hour-means-and-coverage.csv');power<-number(m$Global_active_power);hourly<-vapply(0:839,function(i){v<-power[(60*i+1):(60*i+60)];if(anyNA(v))NA_real_ else mean(v)},numeric(1));models$person<-data.frame(index=0:839,timeLabel=h$localHour,y=hourly)\nretail<-rd('actual2313-retail-SKU85123A-all8-original-fields.csv');coverage<-rd('derived374-retail-calendar-day-gross-net-and-coverage.csv');days<-as.character(as.Date(floor(number(retail$InvoiceDate)),origin='1899-12-30'));quantities<-number(retail$Quantity);gross<-tapply(pmax(quantities,0),days,sum);values<-unname(gross[coverage$calendarDate]);values[is.na(values)]<-0;eligible<-number(coverage$allRetailerRecordedRows)>0 & !(coverage$calendarDate %in% c('2010-12-01','2011-12-09'));values[!eligible]<-NA_real_;models$company<-data.frame(index=0:373,timeLabel=coverage$calendarDate,y=values)\nprofiles<-read.csv(file.path(root,'metr14-profiles.csv'),check.names=FALSE,na.strings='',fileEncoding='UTF-8-BOM')\ndelta<-function(d,D,s){a<-numeric(d+D*s+1);for(i in 0:d)for(j in 0:D)a[i+j*s+1]<-a[i+j*s+1]+(-1)^(i+j)*choose(d,i)*choose(D,j);a}\ntransform_y<-function(y,a){vapply(seq_along(y),function(i){js<-which(a!=0)-1L;if(any(i-js<1)||anyNA(y[i-js]))NA_real_ else sum(a[js+1]*y[i-js])},numeric(1))}\nnames_spec<-function(o){c(if(o$intercept)'intercept',if(o$arOrder>0)paste0('ARlag',seq_len(o$arOrder)),if(o$trend)'time-from-trendOrigin',if(o$season>0)paste0('season-phase',if(o$intercept)seq_len(o$season-1)else 0:(o$season-1)))}\nfeature<-function(t,lookup,o){c(if(o$intercept)1,if(o$arOrder>0)unname(lookup[as.character(t-seq_len(o$arOrder))]),if(o$trend)t,if(o$season>0)as.numeric(t%%o$season==(if(o$intercept)seq_len(o$season-1)else 0:(o$season-1))))}\nfit_qr<-function(series,o){train<-series[series$index<o$origin,];z<-transform_y(train$y,delta(o$d,0,1));lookup<-setNames(z,train$index);names<-names_spec(o);k<-length(names);X<-matrix(numeric(),nrow=0,ncol=k);Y<-numeric();used<-integer()\n for(i in seq_len(nrow(train))){x<-feature(train$index[i],lookup,o);if(!is.na(z[i])&&!anyNA(x)){X<-rbind(X,x);Y<-c(Y,z[i]);used<-c(used,train$index[i])}}\n if(!length(Y)){return(list(part=rep(0,k),basis=diag(k),rank=0,df=0,rss=0,fitted=numeric(),residual=numeric(),X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1)))}\n qrX<-qr(X,tol=1e-10,LAPACK=FALSE);rank<-qrX$rank;pivot<-qrX$pivot[seq_len(rank)];part<-rep(0,k);Xp<-X[,pivot,drop=FALSE];qP<-qr(Xp,tol=1e-10,LAPACK=FALSE);part[pivot]<-qr.coef(qP,Y);free<-setdiff(seq_len(k),pivot);basis<-matrix(0,nrow=k,ncol=length(free))\n if(length(free))for(j in seq_along(free)){basis[free[j],j]<-1;basis[pivot,j]<- -qr.coef(qP,X[,free[j]])}\n fitted<-as.vector(X%*%part);residual<-Y-fitted;list(part=part,basis=basis,rank=rank,df=length(Y)-rank,rss=sum(residual^2),fitted=fitted,residual=residual,X=X,Y=Y,used=used,train=train,z=z,names=names,delta=delta(o$d,0,1))\n}\npath_profile<-function(series,o){train<-series[series$index<o$origin,];lookup<-setNames(train$y,train$index);f<-NULL;pred<-rep(NA_real_,o$horizon)\n if(o$model=='AR'){\n  f<-fit_qr(series,o);zl<-setNames(f$z,train$index);levels<-lookup;zero<-abs(f$part)<1e-10 & (if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-10 else TRUE)\n  for(h in seq_len(o$horizon)){t<-o$origin+h-1;x<-feature(t,zl,o);x[is.na(x)&zero]<-0;v<-NA_real_\n   if(!anyNA(x)&&(ncol(f$basis)==0||max(abs(as.vector(x%*%f$basis)))<1e-8))v<-sum(x*f$part)\n   zl[as.character(t)]<-v;level<-v;for(j in seq_len(length(f$delta)-1)){a<-f$delta[j+1];if(a==0)next;past<-levels[as.character(t-j)];if(is.na(past)){level<-NA_real_;break};if(!is.na(level))level<-level-a*past};levels[as.character(t)]<-level;pred[h]<-level\n  }\n }else for(h in seq_len(o$horizon)){\n  t<-o$origin+h-1\n  if(o$model=='mean')pred[h]<-if(all(is.na(train$y)))NA_real_ else mean(train$y,na.rm=TRUE)\n  if(o$model=='naive')pred[h]<-tail(train$y,1)\n  if(o$model=='drift'&&nrow(train)>1&&!is.na(train$y[1])&&!is.na(tail(train$y,1)))pred[h]<-tail(train$y,1)+h*(tail(train$y,1)-train$y[1])/(tail(train$index,1)-train$index[1])\n  if(o$model=='seasonalNaive'){j<-t-o$baselinePeriod*(floor((t-o$origin)/o$baselinePeriod)+1);pred[h]<-lookup[as.character(j)]}\n }\n actual<-series$y[match(o$origin+seq_len(o$horizon)-1,series$index)];errors<-actual-pred;es<-errors[!is.na(errors)];metrics<-c(origin=o$origin,trainingCalendar=nrow(train),trainingObserved=sum(!is.na(train$y)),horizon=o$horizon,forecastDefined=sum(!is.na(pred)),scorePairs=length(es),MAE=if(length(es))mean(abs(es))else NA_real_,MSE=if(length(es))mean(es^2)else NA_real_)\n if(!is.null(f)){metrics<-c(metrics,fitRows=length(f$Y),rank=f$rank,parameters=length(f$part),df=f$df,RSS=f$rss,residualVariance=if(f$df>0)f$rss/f$df else NA_real_);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));coef<-f$part;coef[!identified]<-NA_real_;names(coef)<-paste0('coefficient:',f$names);metrics<-c(metrics,coef)}\n list(metrics=metrics,pred=pred,actual=actual,error=errors,fit=f)\n}\n\njson_text<-function(x){\n if(is.null(x))return('null')\n if(is.data.frame(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(as.list(x[i,,drop=FALSE])),character(1)),collapse=','),']'))\n if(is.matrix(x))return(paste0('[',paste(vapply(seq_len(nrow(x)),function(i)json_text(unname(x[i,])),character(1)),collapse=','),']'))\n if(is.list(x)||length(x)>1){n<-names(x);if(!is.null(n)&&all(n!=''))return(paste0('{',paste(vapply(seq_along(x),function(i)paste0(encodeString(n[i],quote='\"'),':',json_text(x[[i]])),character(1)),collapse=','),'}'));return(paste0('[',paste(vapply(seq_along(x),function(i)json_text(x[[i]]),character(1)),collapse=','),']'))}\n if(!length(x))return('[]');if(is.na(x)||is.numeric(x)&&!is.finite(x))return('null');if(is.character(x))return(encodeString(x,quote='\"'));if(is.logical(x))return(if(x)'true'else'false');format(x,digits=17,scientific=TRUE,trim=TRUE)\n}\nwrite_json<-function(x,p)writeLines(json_text(x),p,useBytes=TRUE)\nrun_fixed<-function(api,variant,outdir){\n dir.create(outdir,recursive=TRUE,showWarnings=FALSE);summary<-list();full<-list();curves<-list();xlabel<-'Assumed calendar index';ylabel<-'Assumed outcome units';title<-paste(api,variant,'(assumed teaching values)')\n addcurve<-function(label,x,y)list(label=label,x=unname(x),y=unname(y))\n toy<-function(v)data.frame(index=seq_along(v)-1,timeLabel=as.character(seq_along(v)-1),y=v)\n if(api=='difference'){\n  if(variant=='default'){v<-c(1,4,9,16);a<-delta(1,0,1);z<-transform_y(v,a);summary<-list(rows=4,defined=3,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('First differences',0:3,z))}\n  else if(variant=='inverse'){v<-c(4,9);z<-c(2,2);for(w in z)v<-c(v,w+2*tail(v,1)-v[length(v)-1]);f<-tail(v,2);summary<-list(rows=2,defined=2,last=tail(f,1));full<-list(history=c(4,9),predictedSecondDifferences=z,levels=f);curves<-list(addcurve('Reconstructed levels',2:3,f))}\n  else{v<-c(1,NA,9);a<-delta(0,1,2);z<-transform_y(v,a);summary<-list(rows=3,defined=1,last=tail(z,1));full<-list(levels=v,polynomial=a,transformed=z);curves<-list(addcurve('Seasonal differences',0:2,z))}\n }else if(api=='polynomial'){\n  P<-if(variant=='default')c(1,-.5)else c(1,-1);B<-if(variant=='default')c(1,.25)else c(1,-1);psi<-numeric(8)\n  for(j in 0:7){v<-if(j<length(B))B[j+1]else 0;if(j>0)for(k in seq_len(min(j,length(P)-1)))v<-v-P[k+1]*psi[j-k+1];psi[j+1]<-v}\n  summary<-as.list(setNames(c(psi[1:4],length(P)-1),c(paste0('psi',0:3),'expandedDegree')));full<-list(expandedPolynomial=P,MA=B,psi=psi);curves<-list(addcurve('Level impulse weights',0:7,psi));ylabel<-'Assumed level impulse response'\n }else if(api=='fit'){\n  v<-if(variant=='default')c(1,3,5,7)else 5;o<-list(origin=length(v),arOrder=0,intercept=TRUE,trend=TRUE,season=0,d=0);f<-fit_qr(toy(v),o);identified<-if(ncol(f$basis))apply(abs(f$basis),1,max)<1e-9 else rep(TRUE,length(f$part));summary<-list(rank=f$rank,RSS=f$rss,df=f$df,intercept=if(identified[1])f$part[1]else NA_real_,trend=if(identified[2])f$part[2]else NA_real_);full<-list(inputs=o,levels=v,fit=f);curves<-list(addcurve('Observed assumed values',seq_along(v)-1,v),addcurve('Fitted assumed values',f$used,f$fitted))\n }else if(api=='forecast'){\n  if(variant=='invalid')stop('nonnegative-innovation-variance: supplied -1')\n  if(variant=='default'){\n   v<-c(2,1,2);phi<-.5;theta<-.25;e0<-0;e1<-v[2]-phi*v[1]-theta*e0;e2<-v[3]-phi*v[2]-theta*e1;means<-numeric(6);means[1]<-phi*v[3]+theta*e2;for(i in 2:6)means[i]<-phi*means[i-1];psi<-c(1,(phi+theta)*phi^(0:4));variance<-cumsum(psi^2);summary<-list(defined=6,first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(levels=v,phi=phi,theta=theta,initialInnovation=e0,conditionalResiduals=c(e1,e2),means=means,psi=psi,variance=variance);origin<-3\n  }else{\n   # Each state row contains constant and coefficient of unobserved u.\n   transition<-matrix(c(1,1,-1,0),2,2);state<-rbind(c(4,0),c(0,1));forms<-matrix(0,6,2);response<-c(1,0);psi<-numeric(6)\n   for(i in 1:6){state<-transition%*%state;forms[i,]<-state[1,];psi[i]<-response[1];response<-as.vector(transition%*%response)}\n   means<-forms[,1];means[abs(forms[,2])>1e-12]<-NA_real_;variance<-cumsum(psi^2);summary<-list(defined=sum(!is.na(means)),first=means[1],last=means[6],lastInnovationVariance=variance[6]);full<-list(unknownPastSymbol='u',affineForms= forms,means=means,psi=psi,variance=variance);origin<-2\n  }\n  curves<-list(addcurve('Identified level means',origin+0:5,means));ylabel<-'Assumed conditional level mean'\n }else if(api=='origins'){\n  v<-c(1,2,3,10,5,6);o<-list(origin=3,horizon=3,model=if(variant=='default')'naive'else'drift');r<-path_profile(toy(v),o);summary<-as.list(r$metrics[c('forecastDefined','scorePairs','MAE','MSE')]);full<-list(inputs=o,levels=v,result=r);curves<-list(addcurve('Actual assumed outcomes',3:5,v[4:6]),addcurve('Forecast path',3:5,r$pred))\n }else if(api=='realdata'){\n  id<-c(country='country-ar1-trend',person='person-seasonal24',company='company-ar1-dummies7-trend')[[variant]];p<-profiles[profiles$id==id,];o<-as.list(p);o$intercept<-TRUE;o$arOrder<-if(is.na(o$arOrder))1 else o$arOrder;o$trend<-isTRUE(o$trend);o$season<-if(is.na(o$season))0 else o$season;o$d<-if(is.na(o$d))0 else o$d;series<-models[[variant]];r<-path_profile(series,o);summary<-as.list(r$metrics[c('origin','trainingObserved','forecastDefined','scorePairs','MAE','MSE')]);full<-list(profile=p,originalCalendar=series,result=r);start<-max(0,o$origin-if(variant=='country')5 else 24);rr<-series[series$index>=start & series$index<o$origin+o$horizon,];xx<-function(indices)if(variant=='country')as.numeric(series$timeLabel[match(indices,series$index)])else indices;curves<-list(addcurve('Actual recorded values',xx(rr$index),rr$y),addcurve('Declared model forecast',xx(o$origin+seq_len(o$horizon)-1),r$pred));xlabel<-if(variant=='country')'Year'else if(variant=='person')'Original hour index'else'Original calendar-day index';ylabel<-c(country='Constant-2015 USD/person',person='kW (complete-hour mean)',company='Recorded gross SKU units')[[variant]];title<-paste('Actual',variant,'/',id,'; disclosed local plot window')\n }else stop('unknown fixed API')\n write_json(summary,file.path(outdir,'summary.json'));write_json(full,file.path(outdir,'full.json'));write_json(curves,file.path(outdir,'plot-points.json'))\n svg(file.path(outdir,'plot.svg'),width=7.2,height=4.2,pointsize=11);par(mar=c(4.3,5.3,4.2,1));xs<-unlist(lapply(curves,function(r)r$x));ys<-unlist(lapply(curves,function(r)r$y));plot(range(xs),range(ys,na.rm=TRUE),type='n',xlab=xlabel,ylab=ylabel,main=paste(strwrap(title,width=65),collapse='\\n'),cex.main=.9,cex.axis=.9,cex.lab=.9);grid(col='#dddddd');colors<-c('#0f766e','#c2410c','#2563eb');for(i in seq_along(curves)){r<-curves[[i]];lines(r$x,r$y,col=colors[i],lwd=1.8);if(length(r$x)<12)points(r$x,r$y,col=colors[i],pch=16,cex=.65)};legend('topright',vapply(curves,function(r)r$label,character(1)),col=colors[seq_along(curves)],lty=1,bty='n',cex=.75);invisible(dev.off());cat(json_text(list(api=api,variant=variant,summary=summary,scope='Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.')),'\\n')\n}\n",
            "sha256": "36f8f7e0baa5eab930c4b099ea485ee4732c81711461629d33da9be81623876e"
          },
          {
            "file": "metr14-profiles.csv",
            "codeText": "id,kind,model,origin,horizon,arOrder,trend,season,d,baselinePeriod\ncountry-naive,country,naive,35,10,,,,,\ncountry-drift,country,drift,35,10,,,,,\ncountry-ar1-trend,country,AR,35,10,1,TRUE,,,\ncountry-difference-mean,country,AR,35,10,0,,,1,\nperson-seasonal24,person,seasonalNaive,672,168,,,,,24\nperson-dummies24-trend,person,AR,672,168,0,TRUE,24,,\nperson-ar1-dummies24-trend,person,AR,672,24,1,TRUE,24,,\nperson-naive-day,person,naive,672,24,,,,,\ncompany-seasonal7,company,seasonalNaive,335,39,,,,,7\ncompany-dummies7-trend,company,AR,335,39,0,TRUE,7,,\ncompany-ar1-dummies7-trend,company,AR,335,39,1,TRUE,7,,\ncompany-naive,company,naive,335,39,,,,,\n",
            "sha256": "1441f7611f4fb6c30ce69ab684d262dedcc04745471da503b784632248fe0987"
          }
        ],
        "inputFiles": [
          "metr14-sources/actual2313-retail-SKU85123A-all8-original-fields.csv",
          "metr14-sources/actual45-KOR-GDPpercapita-original-1980-2024.csv",
          "metr14-sources/actual50400-household-original-minute-records-Dec17-2006-to-Jan20-2007.csv",
          "metr14-sources/derived374-retail-calendar-day-gross-net-and-coverage.csv",
          "metr14-sources/derived840-household-civil-hour-means-and-coverage.csv"
        ],
        "returnCode": 0,
        "stdout": "{\"api\":\"realdata\",\"variant\":\"company\",\"summary\":{\"origin\":3.35e+02,\"trainingObserved\":2.7e+02,\"forecastDefined\":4e+00,\"scorePairs\":4e+00,\"MAE\":3.2813761981148542e+02,\"MSE\":3.0527113626307796e+05},\"scope\":\"Actual data only for realdata;other values assumed. Full numeric outputs and SVG written.\"} \n",
        "stderr": "",
        "stderrProjection": "Unmodified actual stderr.",
        "summary": {
          "origin": 335.0,
          "trainingObserved": 270.0,
          "forecastDefined": 4.0,
          "scorePairs": 4.0,
          "MAE": 328.1376198114854,
          "MSE": 305271.13626307796
        },
        "fullResult": {
          "profile": [
            {
              "id": "company-ar1-dummies7-trend",
              "kind": "company",
              "model": "AR",
              "origin": 335,
              "horizon": 39,
              "arOrder": 1,
              "trend": true,
              "season": 7,
              "d": null,
              "baselinePeriod": null
            }
          ],
          "originalCalendar": [
            {
              "index": 0,
              "timeLabel": "2010-12-01",
              "y": null
            },
            {
              "index": 1,
              "timeLabel": "2010-12-02",
              "y": 309.0
            },
            {
              "index": 2,
              "timeLabel": "2010-12-03",
              "y": 25.0
            },
            {
              "index": 3,
              "timeLabel": "2010-12-04",
              "y": null
            },
            {
              "index": 4,
              "timeLabel": "2010-12-05",
              "y": 198.0
            },
            {
              "index": 5,
              "timeLabel": "2010-12-06",
              "y": 161.0
            },
            {
              "index": 6,
              "timeLabel": "2010-12-07",
              "y": 331.0
            },
            {
              "index": 7,
              "timeLabel": "2010-12-08",
              "y": 151.0
            },
            {
              "index": 8,
              "timeLabel": "2010-12-09",
              "y": 195.0
            },
            {
              "index": 9,
              "timeLabel": "2010-12-10",
              "y": 165.0
            },
            {
              "index": 10,
              "timeLabel": "2010-12-11",
              "y": null
            },
            {
              "index": 11,
              "timeLabel": "2010-12-12",
              "y": 42.0
            },
            {
              "index": 12,
              "timeLabel": "2010-12-13",
              "y": 337.0
            },
            {
              "index": 13,
              "timeLabel": "2010-12-14",
              "y": 185.0
            },
            {
              "index": 14,
              "timeLabel": "2010-12-15",
              "y": 112.0
            },
            {
              "index": 15,
              "timeLabel": "2010-12-16",
              "y": 790.0
            },
            {
              "index": 16,
              "timeLabel": "2010-12-17",
              "y": 58.0
            },
            {
              "index": 17,
              "timeLabel": "2010-12-18",
              "y": null
            },
            {
              "index": 18,
              "timeLabel": "2010-12-19",
              "y": 42.0
            },
            {
              "index": 19,
              "timeLabel": "2010-12-20",
              "y": 85.0
            },
            {
              "index": 20,
              "timeLabel": "2010-12-21",
              "y": 41.0
            },
            {
              "index": 21,
              "timeLabel": "2010-12-22",
              "y": 25.0
            },
            {
              "index": 22,
              "timeLabel": "2010-12-23",
              "y": 47.0
            },
            {
              "index": 23,
              "timeLabel": "2010-12-24",
              "y": null
            },
            {
              "index": 24,
              "timeLabel": "2010-12-25",
              "y": null
            },
            {
              "index": 25,
              "timeLabel": "2010-12-26",
              "y": null
            },
            {
              "index": 26,
              "timeLabel": "2010-12-27",
              "y": null
            },
            {
              "index": 27,
              "timeLabel": "2010-12-28",
              "y": null
            },
            {
              "index": 28,
              "timeLabel": "2010-12-29",
              "y": null
            },
            {
              "index": 29,
              "timeLabel": "2010-12-30",
              "y": null
            },
            {
              "index": 30,
              "timeLabel": "2010-12-31",
              "y": null
            },
            {
              "index": 31,
              "timeLabel": "2011-01-01",
              "y": null
            },
            {
              "index": 32,
              "timeLabel": "2011-01-02",
              "y": null
            },
            {
              "index": 33,
              "timeLabel": "2011-01-03",
              "y": null
            },
            {
              "index": 34,
              "timeLabel": "2011-01-04",
              "y": 67.0
            },
            {
              "index": 35,
              "timeLabel": "2011-01-05",
              "y": 304.0
            },
            {
              "index": 36,
              "timeLabel": "2011-01-06",
              "y": 171.0
            },
            {
              "index": 37,
              "timeLabel": "2011-01-07",
              "y": 334.0
            },
            {
              "index": 38,
              "timeLabel": "2011-01-08",
              "y": null
            },
            {
              "index": 39,
              "timeLabel": "2011-01-09",
              "y": 97.0
            },
            {
              "index": 40,
              "timeLabel": "2011-01-10",
              "y": 12.0
            },
            {
              "index": 41,
              "timeLabel": "2011-01-11",
              "y": 3114.0
            },
            {
              "index": 42,
              "timeLabel": "2011-01-12",
              "y": 83.0
            },
            {
              "index": 43,
              "timeLabel": "2011-01-13",
              "y": 8.0
            },
            {
              "index": 44,
              "timeLabel": "2011-01-14",
              "y": 89.0
            },
            {
              "index": 45,
              "timeLabel": "2011-01-15",
              "y": null
            },
            {
              "index": 46,
              "timeLabel": "2011-01-16",
              "y": 23.0
            },
            {
              "index": 47,
              "timeLabel": "2011-01-17",
              "y": 220.0
            },
            {
              "index": 48,
              "timeLabel": "2011-01-18",
              "y": 18.0
            },
            {
              "index": 49,
              "timeLabel": "2011-01-19",
              "y": 271.0
            },
            {
              "index": 50,
              "timeLabel": "2011-01-20",
              "y": 42.0
            },
            {
              "index": 51,
              "timeLabel": "2011-01-21",
              "y": 63.0
            },
            {
              "index": 52,
              "timeLabel": "2011-01-22",
              "y": null
            },
            {
              "index": 53,
              "timeLabel": "2011-01-23",
              "y": 47.0
            },
            {
              "index": 54,
              "timeLabel": "2011-01-24",
              "y": 11.0
            },
            {
              "index": 55,
              "timeLabel": "2011-01-25",
              "y": 92.0
            },
            {
              "index": 56,
              "timeLabel": "2011-01-26",
              "y": 183.0
            },
            {
              "index": 57,
              "timeLabel": "2011-01-27",
              "y": 64.0
            },
            {
              "index": 58,
              "timeLabel": "2011-01-28",
              "y": 68.0
            },
            {
              "index": 59,
              "timeLabel": "2011-01-29",
              "y": null
            },
            {
              "index": 60,
              "timeLabel": "2011-01-30",
              "y": 123.0
            },
            {
              "index": 61,
              "timeLabel": "2011-01-31",
              "y": 29.0
            },
            {
              "index": 62,
              "timeLabel": "2011-02-01",
              "y": 195.0
            },
            {
              "index": 63,
              "timeLabel": "2011-02-02",
              "y": 222.0
            },
            {
              "index": 64,
              "timeLabel": "2011-02-03",
              "y": 63.0
            },
            {
              "index": 65,
              "timeLabel": "2011-02-04",
              "y": 42.0
            },
            {
              "index": 66,
              "timeLabel": "2011-02-05",
              "y": null
            },
            {
              "index": 67,
              "timeLabel": "2011-02-06",
              "y": 35.0
            },
            {
              "index": 68,
              "timeLabel": "2011-02-07",
              "y": 69.0
            },
            {
              "index": 69,
              "timeLabel": "2011-02-08",
              "y": 153.0
            },
            {
              "index": 70,
              "timeLabel": "2011-02-09",
              "y": 14.0
            },
            {
              "index": 71,
              "timeLabel": "2011-02-10",
              "y": 66.0
            },
            {
              "index": 72,
              "timeLabel": "2011-02-11",
              "y": 209.0
            },
            {
              "index": 73,
              "timeLabel": "2011-02-12",
              "y": null
            },
            {
              "index": 74,
              "timeLabel": "2011-02-13",
              "y": 6.0
            },
            {
              "index": 75,
              "timeLabel": "2011-02-14",
              "y": 66.0
            },
            {
              "index": 76,
              "timeLabel": "2011-02-15",
              "y": 12.0
            },
            {
              "index": 77,
              "timeLabel": "2011-02-16",
              "y": 203.0
            },
            {
              "index": 78,
              "timeLabel": "2011-02-17",
              "y": 50.0
            },
            {
              "index": 79,
              "timeLabel": "2011-02-18",
              "y": 6.0
            },
            {
              "index": 80,
              "timeLabel": "2011-02-19",
              "y": null
            },
            {
              "index": 81,
              "timeLabel": "2011-02-20",
              "y": 28.0
            },
            {
              "index": 82,
              "timeLabel": "2011-02-21",
              "y": 23.0
            },
            {
              "index": 83,
              "timeLabel": "2011-02-22",
              "y": 96.0
            },
            {
              "index": 84,
              "timeLabel": "2011-02-23",
              "y": 116.0
            },
            {
              "index": 85,
              "timeLabel": "2011-02-24",
              "y": 99.0
            },
            {
              "index": 86,
              "timeLabel": "2011-02-25",
              "y": 40.0
            },
            {
              "index": 87,
              "timeLabel": "2011-02-26",
              "y": null
            },
            {
              "index": 88,
              "timeLabel": "2011-02-27",
              "y": 27.0
            },
            {
              "index": 89,
              "timeLabel": "2011-02-28",
              "y": 37.0
            },
            {
              "index": 90,
              "timeLabel": "2011-03-01",
              "y": 86.0
            },
            {
              "index": 91,
              "timeLabel": "2011-03-02",
              "y": 33.0
            },
            {
              "index": 92,
              "timeLabel": "2011-03-03",
              "y": 96.0
            },
            {
              "index": 93,
              "timeLabel": "2011-03-04",
              "y": 27.0
            },
            {
              "index": 94,
              "timeLabel": "2011-03-05",
              "y": null
            },
            {
              "index": 95,
              "timeLabel": "2011-03-06",
              "y": 101.0
            },
            {
              "index": 96,
              "timeLabel": "2011-03-07",
              "y": 26.0
            },
            {
              "index": 97,
              "timeLabel": "2011-03-08",
              "y": 145.0
            },
            {
              "index": 98,
              "timeLabel": "2011-03-09",
              "y": 98.0
            },
            {
              "index": 99,
              "timeLabel": "2011-03-10",
              "y": 57.0
            },
            {
              "index": 100,
              "timeLabel": "2011-03-11",
              "y": 125.0
            },
            {
              "index": 101,
              "timeLabel": "2011-03-12",
              "y": null
            },
            {
              "index": 102,
              "timeLabel": "2011-03-13",
              "y": 3.0
            },
            {
              "index": 103,
              "timeLabel": "2011-03-14",
              "y": 19.0
            },
            {
              "index": 104,
              "timeLabel": "2011-03-15",
              "y": 114.0
            },
            {
              "index": 105,
              "timeLabel": "2011-03-16",
              "y": 141.0
            },
            {
              "index": 106,
              "timeLabel": "2011-03-17",
              "y": 87.0
            },
            {
              "index": 107,
              "timeLabel": "2011-03-18",
              "y": 57.0
            },
            {
              "index": 108,
              "timeLabel": "2011-03-19",
              "y": null
            },
            {
              "index": 109,
              "timeLabel": "2011-03-20",
              "y": 47.0
            },
            {
              "index": 110,
              "timeLabel": "2011-03-21",
              "y": 38.0
            },
            {
              "index": 111,
              "timeLabel": "2011-03-22",
              "y": 84.0
            },
            {
              "index": 112,
              "timeLabel": "2011-03-23",
              "y": 83.0
            },
            {
              "index": 113,
              "timeLabel": "2011-03-24",
              "y": 52.0
            },
            {
              "index": 114,
              "timeLabel": "2011-03-25",
              "y": 31.0
            },
            {
              "index": 115,
              "timeLabel": "2011-03-26",
              "y": null
            },
            {
              "index": 116,
              "timeLabel": "2011-03-27",
              "y": 77.0
            },
            {
              "index": 117,
              "timeLabel": "2011-03-28",
              "y": 44.0
            },
            {
              "index": 118,
              "timeLabel": "2011-03-29",
              "y": 185.0
            },
            {
              "index": 119,
              "timeLabel": "2011-03-30",
              "y": 68.0
            },
            {
              "index": 120,
              "timeLabel": "2011-03-31",
              "y": 75.0
            },
            {
              "index": 121,
              "timeLabel": "2011-04-01",
              "y": 133.0
            },
            {
              "index": 122,
              "timeLabel": "2011-04-02",
              "y": null
            },
            {
              "index": 123,
              "timeLabel": "2011-04-03",
              "y": 77.0
            },
            {
              "index": 124,
              "timeLabel": "2011-04-04",
              "y": 66.0
            },
            {
              "index": 125,
              "timeLabel": "2011-04-05",
              "y": 51.0
            },
            {
              "index": 126,
              "timeLabel": "2011-04-06",
              "y": 65.0
            },
            {
              "index": 127,
              "timeLabel": "2011-04-07",
              "y": 50.0
            },
            {
              "index": 128,
              "timeLabel": "2011-04-08",
              "y": 68.0
            },
            {
              "index": 129,
              "timeLabel": "2011-04-09",
              "y": null
            },
            {
              "index": 130,
              "timeLabel": "2011-04-10",
              "y": 74.0
            },
            {
              "index": 131,
              "timeLabel": "2011-04-11",
              "y": 45.0
            },
            {
              "index": 132,
              "timeLabel": "2011-04-12",
              "y": 198.0
            },
            {
              "index": 133,
              "timeLabel": "2011-04-13",
              "y": 73.0
            },
            {
              "index": 134,
              "timeLabel": "2011-04-14",
              "y": 127.0
            },
            {
              "index": 135,
              "timeLabel": "2011-04-15",
              "y": 8.0
            },
            {
              "index": 136,
              "timeLabel": "2011-04-16",
              "y": null
            },
            {
              "index": 137,
              "timeLabel": "2011-04-17",
              "y": 23.0
            },
            {
              "index": 138,
              "timeLabel": "2011-04-18",
              "y": 2102.0
            },
            {
              "index": 139,
              "timeLabel": "2011-04-19",
              "y": 110.0
            },
            {
              "index": 140,
              "timeLabel": "2011-04-20",
              "y": 73.0
            },
            {
              "index": 141,
              "timeLabel": "2011-04-21",
              "y": 137.0
            },
            {
              "index": 142,
              "timeLabel": "2011-04-22",
              "y": null
            },
            {
              "index": 143,
              "timeLabel": "2011-04-23",
              "y": null
            },
            {
              "index": 144,
              "timeLabel": "2011-04-24",
              "y": null
            },
            {
              "index": 145,
              "timeLabel": "2011-04-25",
              "y": null
            },
            {
              "index": 146,
              "timeLabel": "2011-04-26",
              "y": 179.0
            },
            {
              "index": 147,
              "timeLabel": "2011-04-27",
              "y": 73.0
            },
            {
              "index": 148,
              "timeLabel": "2011-04-28",
              "y": 111.0
            },
            {
              "index": 149,
              "timeLabel": "2011-04-29",
              "y": null
            },
            {
              "index": 150,
              "timeLabel": "2011-04-30",
              "y": null
            },
            {
              "index": 151,
              "timeLabel": "2011-05-01",
              "y": 12.0
            },
            {
              "index": 152,
              "timeLabel": "2011-05-02",
              "y": null
            },
            {
              "index": 153,
              "timeLabel": "2011-05-03",
              "y": 317.0
            },
            {
              "index": 154,
              "timeLabel": "2011-05-04",
              "y": 85.0
            },
            {
              "index": 155,
              "timeLabel": "2011-05-05",
              "y": 421.0
            },
            {
              "index": 156,
              "timeLabel": "2011-05-06",
              "y": 179.0
            },
            {
              "index": 157,
              "timeLabel": "2011-05-07",
              "y": null
            },
            {
              "index": 158,
              "timeLabel": "2011-05-08",
              "y": 142.0
            },
            {
              "index": 159,
              "timeLabel": "2011-05-09",
              "y": 216.0
            },
            {
              "index": 160,
              "timeLabel": "2011-05-10",
              "y": 142.0
            },
            {
              "index": 161,
              "timeLabel": "2011-05-11",
              "y": 120.0
            },
            {
              "index": 162,
              "timeLabel": "2011-05-12",
              "y": 227.0
            },
            {
              "index": 163,
              "timeLabel": "2011-05-13",
              "y": 25.0
            },
            {
              "index": 164,
              "timeLabel": "2011-05-14",
              "y": null
            },
            {
              "index": 165,
              "timeLabel": "2011-05-15",
              "y": 143.0
            },
            {
              "index": 166,
              "timeLabel": "2011-05-16",
              "y": 201.0
            },
            {
              "index": 167,
              "timeLabel": "2011-05-17",
              "y": 156.0
            },
            {
              "index": 168,
              "timeLabel": "2011-05-18",
              "y": 73.0
            },
            {
              "index": 169,
              "timeLabel": "2011-05-19",
              "y": 108.0
            },
            {
              "index": 170,
              "timeLabel": "2011-05-20",
              "y": 92.0
            },
            {
              "index": 171,
              "timeLabel": "2011-05-21",
              "y": null
            },
            {
              "index": 172,
              "timeLabel": "2011-05-22",
              "y": 153.0
            },
            {
              "index": 173,
              "timeLabel": "2011-05-23",
              "y": 113.0
            },
            {
              "index": 174,
              "timeLabel": "2011-05-24",
              "y": 144.0
            },
            {
              "index": 175,
              "timeLabel": "2011-05-25",
              "y": 68.0
            },
            {
              "index": 176,
              "timeLabel": "2011-05-26",
              "y": 653.0
            },
            {
              "index": 177,
              "timeLabel": "2011-05-27",
              "y": 22.0
            },
            {
              "index": 178,
              "timeLabel": "2011-05-28",
              "y": null
            },
            {
              "index": 179,
              "timeLabel": "2011-05-29",
              "y": 26.0
            },
            {
              "index": 180,
              "timeLabel": "2011-05-30",
              "y": null
            },
            {
              "index": 181,
              "timeLabel": "2011-05-31",
              "y": 168.0
            },
            {
              "index": 182,
              "timeLabel": "2011-06-01",
              "y": 29.0
            },
            {
              "index": 183,
              "timeLabel": "2011-06-02",
              "y": 353.0
            },
            {
              "index": 184,
              "timeLabel": "2011-06-03",
              "y": 29.0
            },
            {
              "index": 185,
              "timeLabel": "2011-06-04",
              "y": null
            },
            {
              "index": 186,
              "timeLabel": "2011-06-05",
              "y": 49.0
            },
            {
              "index": 187,
              "timeLabel": "2011-06-06",
              "y": 108.0
            },
            {
              "index": 188,
              "timeLabel": "2011-06-07",
              "y": 56.0
            },
            {
              "index": 189,
              "timeLabel": "2011-06-08",
              "y": 109.0
            },
            {
              "index": 190,
              "timeLabel": "2011-06-09",
              "y": 4015.0
            },
            {
              "index": 191,
              "timeLabel": "2011-06-10",
              "y": 68.0
            },
            {
              "index": 192,
              "timeLabel": "2011-06-11",
              "y": null
            },
            {
              "index": 193,
              "timeLabel": "2011-06-12",
              "y": 33.0
            },
            {
              "index": 194,
              "timeLabel": "2011-06-13",
              "y": 17.0
            },
            {
              "index": 195,
              "timeLabel": "2011-06-14",
              "y": 50.0
            },
            {
              "index": 196,
              "timeLabel": "2011-06-15",
              "y": 118.0
            },
            {
              "index": 197,
              "timeLabel": "2011-06-16",
              "y": 42.0
            },
            {
              "index": 198,
              "timeLabel": "2011-06-17",
              "y": 15.0
            },
            {
              "index": 199,
              "timeLabel": "2011-06-18",
              "y": null
            },
            {
              "index": 200,
              "timeLabel": "2011-06-19",
              "y": 147.0
            },
            {
              "index": 201,
              "timeLabel": "2011-06-20",
              "y": 29.0
            },
            {
              "index": 202,
              "timeLabel": "2011-06-21",
              "y": 13.0
            },
            {
              "index": 203,
              "timeLabel": "2011-06-22",
              "y": 18.0
            },
            {
              "index": 204,
              "timeLabel": "2011-06-23",
              "y": 106.0
            },
            {
              "index": 205,
              "timeLabel": "2011-06-24",
              "y": 38.0
            },
            {
              "index": 206,
              "timeLabel": "2011-06-25",
              "y": null
            },
            {
              "index": 207,
              "timeLabel": "2011-06-26",
              "y": 32.0
            },
            {
              "index": 208,
              "timeLabel": "2011-06-27",
              "y": 66.0
            },
            {
              "index": 209,
              "timeLabel": "2011-06-28",
              "y": 13.0
            },
            {
              "index": 210,
              "timeLabel": "2011-06-29",
              "y": 77.0
            },
            {
              "index": 211,
              "timeLabel": "2011-06-30",
              "y": 46.0
            },
            {
              "index": 212,
              "timeLabel": "2011-07-01",
              "y": 39.0
            },
            {
              "index": 213,
              "timeLabel": "2011-07-02",
              "y": null
            },
            {
              "index": 214,
              "timeLabel": "2011-07-03",
              "y": 18.0
            },
            {
              "index": 215,
              "timeLabel": "2011-07-04",
              "y": 8.0
            },
            {
              "index": 216,
              "timeLabel": "2011-07-05",
              "y": 134.0
            },
            {
              "index": 217,
              "timeLabel": "2011-07-06",
              "y": 5.0
            },
            {
              "index": 218,
              "timeLabel": "2011-07-07",
              "y": 59.0
            },
            {
              "index": 219,
              "timeLabel": "2011-07-08",
              "y": 32.0
            },
            {
              "index": 220,
              "timeLabel": "2011-07-09",
              "y": null
            },
            {
              "index": 221,
              "timeLabel": "2011-07-10",
              "y": 20.0
            },
            {
              "index": 222,
              "timeLabel": "2011-07-11",
              "y": 81.0
            },
            {
              "index": 223,
              "timeLabel": "2011-07-12",
              "y": 786.0
            },
            {
              "index": 224,
              "timeLabel": "2011-07-13",
              "y": 58.0
            },
            {
              "index": 225,
              "timeLabel": "2011-07-14",
              "y": 224.0
            },
            {
              "index": 226,
              "timeLabel": "2011-07-15",
              "y": 23.0
            },
            {
              "index": 227,
              "timeLabel": "2011-07-16",
              "y": null
            },
            {
              "index": 228,
              "timeLabel": "2011-07-17",
              "y": 23.0
            },
            {
              "index": 229,
              "timeLabel": "2011-07-18",
              "y": 114.0
            },
            {
              "index": 230,
              "timeLabel": "2011-07-19",
              "y": 157.0
            },
            {
              "index": 231,
              "timeLabel": "2011-07-20",
              "y": 104.0
            },
            {
              "index": 232,
              "timeLabel": "2011-07-21",
              "y": 52.0
            },
            {
              "index": 233,
              "timeLabel": "2011-07-22",
              "y": 132.0
            },
            {
              "index": 234,
              "timeLabel": "2011-07-23",
              "y": null
            },
            {
              "index": 235,
              "timeLabel": "2011-07-24",
              "y": 160.0
            },
            {
              "index": 236,
              "timeLabel": "2011-07-25",
              "y": 43.0
            },
            {
              "index": 237,
              "timeLabel": "2011-07-26",
              "y": 8.0
            },
            {
              "index": 238,
              "timeLabel": "2011-07-27",
              "y": 58.0
            },
            {
              "index": 239,
              "timeLabel": "2011-07-28",
              "y": 490.0
            },
            {
              "index": 240,
              "timeLabel": "2011-07-29",
              "y": 74.0
            },
            {
              "index": 241,
              "timeLabel": "2011-07-30",
              "y": null
            },
            {
              "index": 242,
              "timeLabel": "2011-07-31",
              "y": 107.0
            },
            {
              "index": 243,
              "timeLabel": "2011-08-01",
              "y": 61.0
            },
            {
              "index": 244,
              "timeLabel": "2011-08-02",
              "y": 32.0
            },
            {
              "index": 245,
              "timeLabel": "2011-08-03",
              "y": 91.0
            },
            {
              "index": 246,
              "timeLabel": "2011-08-04",
              "y": 130.0
            },
            {
              "index": 247,
              "timeLabel": "2011-08-05",
              "y": 38.0
            },
            {
              "index": 248,
              "timeLabel": "2011-08-06",
              "y": null
            },
            {
              "index": 249,
              "timeLabel": "2011-08-07",
              "y": 89.0
            },
            {
              "index": 250,
              "timeLabel": "2011-08-08",
              "y": 73.0
            },
            {
              "index": 251,
              "timeLabel": "2011-08-09",
              "y": 121.0
            },
            {
              "index": 252,
              "timeLabel": "2011-08-10",
              "y": 132.0
            },
            {
              "index": 253,
              "timeLabel": "2011-08-11",
              "y": 60.0
            },
            {
              "index": 254,
              "timeLabel": "2011-08-12",
              "y": 28.0
            },
            {
              "index": 255,
              "timeLabel": "2011-08-13",
              "y": null
            },
            {
              "index": 256,
              "timeLabel": "2011-08-14",
              "y": 52.0
            },
            {
              "index": 257,
              "timeLabel": "2011-08-15",
              "y": 104.0
            },
            {
              "index": 258,
              "timeLabel": "2011-08-16",
              "y": 87.0
            },
            {
              "index": 259,
              "timeLabel": "2011-08-17",
              "y": 69.0
            },
            {
              "index": 260,
              "timeLabel": "2011-08-18",
              "y": 15.0
            },
            {
              "index": 261,
              "timeLabel": "2011-08-19",
              "y": 6.0
            },
            {
              "index": 262,
              "timeLabel": "2011-08-20",
              "y": null
            },
            {
              "index": 263,
              "timeLabel": "2011-08-21",
              "y": 15.0
            },
            {
              "index": 264,
              "timeLabel": "2011-08-22",
              "y": 420.0
            },
            {
              "index": 265,
              "timeLabel": "2011-08-23",
              "y": 122.0
            },
            {
              "index": 266,
              "timeLabel": "2011-08-24",
              "y": 58.0
            },
            {
              "index": 267,
              "timeLabel": "2011-08-25",
              "y": 107.0
            },
            {
              "index": 268,
              "timeLabel": "2011-08-26",
              "y": 24.0
            },
            {
              "index": 269,
              "timeLabel": "2011-08-27",
              "y": null
            },
            {
              "index": 270,
              "timeLabel": "2011-08-28",
              "y": 42.0
            },
            {
              "index": 271,
              "timeLabel": "2011-08-29",
              "y": null
            },
            {
              "index": 272,
              "timeLabel": "2011-08-30",
              "y": 63.0
            },
            {
              "index": 273,
              "timeLabel": "2011-08-31",
              "y": 37.0
            },
            {
              "index": 274,
              "timeLabel": "2011-09-01",
              "y": 112.0
            },
            {
              "index": 275,
              "timeLabel": "2011-09-02",
              "y": 166.0
            },
            {
              "index": 276,
              "timeLabel": "2011-09-03",
              "y": null
            },
            {
              "index": 277,
              "timeLabel": "2011-09-04",
              "y": 16.0
            },
            {
              "index": 278,
              "timeLabel": "2011-09-05",
              "y": 95.0
            },
            {
              "index": 279,
              "timeLabel": "2011-09-06",
              "y": 184.0
            },
            {
              "index": 280,
              "timeLabel": "2011-09-07",
              "y": 16.0
            },
            {
              "index": 281,
              "timeLabel": "2011-09-08",
              "y": 27.0
            },
            {
              "index": 282,
              "timeLabel": "2011-09-09",
              "y": 29.0
            },
            {
              "index": 283,
              "timeLabel": "2011-09-10",
              "y": null
            },
            {
              "index": 284,
              "timeLabel": "2011-09-11",
              "y": 89.0
            },
            {
              "index": 285,
              "timeLabel": "2011-09-12",
              "y": 117.0
            },
            {
              "index": 286,
              "timeLabel": "2011-09-13",
              "y": 131.0
            },
            {
              "index": 287,
              "timeLabel": "2011-09-14",
              "y": 85.0
            },
            {
              "index": 288,
              "timeLabel": "2011-09-15",
              "y": 144.0
            },
            {
              "index": 289,
              "timeLabel": "2011-09-16",
              "y": 100.0
            },
            {
              "index": 290,
              "timeLabel": "2011-09-17",
              "y": null
            },
            {
              "index": 291,
              "timeLabel": "2011-09-18",
              "y": 81.0
            },
            {
              "index": 292,
              "timeLabel": "2011-09-19",
              "y": 42.0
            },
            {
              "index": 293,
              "timeLabel": "2011-09-20",
              "y": 398.0
            },
            {
              "index": 294,
              "timeLabel": "2011-09-21",
              "y": 11.0
            },
            {
              "index": 295,
              "timeLabel": "2011-09-22",
              "y": 58.0
            },
            {
              "index": 296,
              "timeLabel": "2011-09-23",
              "y": 127.0
            },
            {
              "index": 297,
              "timeLabel": "2011-09-24",
              "y": null
            },
            {
              "index": 298,
              "timeLabel": "2011-09-25",
              "y": 69.0
            },
            {
              "index": 299,
              "timeLabel": "2011-09-26",
              "y": 48.0
            },
            {
              "index": 300,
              "timeLabel": "2011-09-27",
              "y": 17.0
            },
            {
              "index": 301,
              "timeLabel": "2011-09-28",
              "y": 125.0
            },
            {
              "index": 302,
              "timeLabel": "2011-09-29",
              "y": 80.0
            },
            {
              "index": 303,
              "timeLabel": "2011-09-30",
              "y": 111.0
            },
            {
              "index": 304,
              "timeLabel": "2011-10-01",
              "y": null
            },
            {
              "index": 305,
              "timeLabel": "2011-10-02",
              "y": 21.0
            },
            {
              "index": 306,
              "timeLabel": "2011-10-03",
              "y": 23.0
            },
            {
              "index": 307,
              "timeLabel": "2011-10-04",
              "y": 20.0
            },
            {
              "index": 308,
              "timeLabel": "2011-10-05",
              "y": 49.0
            },
            {
              "index": 309,
              "timeLabel": "2011-10-06",
              "y": 13.0
            },
            {
              "index": 310,
              "timeLabel": "2011-10-07",
              "y": 34.0
            },
            {
              "index": 311,
              "timeLabel": "2011-10-08",
              "y": null
            },
            {
              "index": 312,
              "timeLabel": "2011-10-09",
              "y": 26.0
            },
            {
              "index": 313,
              "timeLabel": "2011-10-10",
              "y": 123.0
            },
            {
              "index": 314,
              "timeLabel": "2011-10-11",
              "y": 46.0
            },
            {
              "index": 315,
              "timeLabel": "2011-10-12",
              "y": 25.0
            },
            {
              "index": 316,
              "timeLabel": "2011-10-13",
              "y": 243.0
            },
            {
              "index": 317,
              "timeLabel": "2011-10-14",
              "y": 187.0
            },
            {
              "index": 318,
              "timeLabel": "2011-10-15",
              "y": null
            },
            {
              "index": 319,
              "timeLabel": "2011-10-16",
              "y": 55.0
            },
            {
              "index": 320,
              "timeLabel": "2011-10-17",
              "y": 69.0
            },
            {
              "index": 321,
              "timeLabel": "2011-10-18",
              "y": 21.0
            },
            {
              "index": 322,
              "timeLabel": "2011-10-19",
              "y": 39.0
            },
            {
              "index": 323,
              "timeLabel": "2011-10-20",
              "y": 26.0
            },
            {
              "index": 324,
              "timeLabel": "2011-10-21",
              "y": 13.0
            },
            {
              "index": 325,
              "timeLabel": "2011-10-22",
              "y": null
            },
            {
              "index": 326,
              "timeLabel": "2011-10-23",
              "y": 63.0
            },
            {
              "index": 327,
              "timeLabel": "2011-10-24",
              "y": 76.0
            },
            {
              "index": 328,
              "timeLabel": "2011-10-25",
              "y": 16.0
            },
            {
              "index": 329,
              "timeLabel": "2011-10-26",
              "y": 17.0
            },
            {
              "index": 330,
              "timeLabel": "2011-10-27",
              "y": 117.0
            },
            {
              "index": 331,
              "timeLabel": "2011-10-28",
              "y": 90.0
            },
            {
              "index": 332,
              "timeLabel": "2011-10-29",
              "y": null
            },
            {
              "index": 333,
              "timeLabel": "2011-10-30",
              "y": 128.0
            },
            {
              "index": 334,
              "timeLabel": "2011-10-31",
              "y": 149.0
            },
            {
              "index": 335,
              "timeLabel": "2011-11-01",
              "y": 39.0
            },
            {
              "index": 336,
              "timeLabel": "2011-11-02",
              "y": 80.0
            },
            {
              "index": 337,
              "timeLabel": "2011-11-03",
              "y": 1265.0
            },
            {
              "index": 338,
              "timeLabel": "2011-11-04",
              "y": 85.0
            },
            {
              "index": 339,
              "timeLabel": "2011-11-05",
              "y": null
            },
            {
              "index": 340,
              "timeLabel": "2011-11-06",
              "y": 86.0
            },
            {
              "index": 341,
              "timeLabel": "2011-11-07",
              "y": 95.0
            },
            {
              "index": 342,
              "timeLabel": "2011-11-08",
              "y": 97.0
            },
            {
              "index": 343,
              "timeLabel": "2011-11-09",
              "y": 113.0
            },
            {
              "index": 344,
              "timeLabel": "2011-11-10",
              "y": 71.0
            },
            {
              "index": 345,
              "timeLabel": "2011-11-11",
              "y": 134.0
            },
            {
              "index": 346,
              "timeLabel": "2011-11-12",
              "y": null
            },
            {
              "index": 347,
              "timeLabel": "2011-11-13",
              "y": 65.0
            },
            {
              "index": 348,
              "timeLabel": "2011-11-14",
              "y": 380.0
            },
            {
              "index": 349,
              "timeLabel": "2011-11-15",
              "y": 457.0
            },
            {
              "index": 350,
              "timeLabel": "2011-11-16",
              "y": 157.0
            },
            {
              "index": 351,
              "timeLabel": "2011-11-17",
              "y": 102.0
            },
            {
              "index": 352,
              "timeLabel": "2011-11-18",
              "y": 125.0
            },
            {
              "index": 353,
              "timeLabel": "2011-11-19",
              "y": null
            },
            {
              "index": 354,
              "timeLabel": "2011-11-20",
              "y": 101.0
            },
            {
              "index": 355,
              "timeLabel": "2011-11-21",
              "y": 36.0
            },
            {
              "index": 356,
              "timeLabel": "2011-11-22",
              "y": 253.0
            },
            {
              "index": 357,
              "timeLabel": "2011-11-23",
              "y": 248.0
            },
            {
              "index": 358,
              "timeLabel": "2011-11-24",
              "y": 131.0
            },
            {
              "index": 359,
              "timeLabel": "2011-11-25",
              "y": 222.0
            },
            {
              "index": 360,
              "timeLabel": "2011-11-26",
              "y": null
            },
            {
              "index": 361,
              "timeLabel": "2011-11-27",
              "y": 8.0
            },
            {
              "index": 362,
              "timeLabel": "2011-11-28",
              "y": 133.0
            },
            {
              "index": 363,
              "timeLabel": "2011-11-29",
              "y": 116.0
            },
            {
              "index": 364,
              "timeLabel": "2011-11-30",
              "y": 311.0
            },
            {
              "index": 365,
              "timeLabel": "2011-12-01",
              "y": 41.0
            },
            {
              "index": 366,
              "timeLabel": "2011-12-02",
              "y": 117.0
            },
            {
              "index": 367,
              "timeLabel": "2011-12-03",
              "y": null
            },
            {
              "index": 368,
              "timeLabel": "2011-12-04",
              "y": 8.0
            },
            {
              "index": 369,
              "timeLabel": "2011-12-05",
              "y": 298.0
            },
            {
              "index": 370,
              "timeLabel": "2011-12-06",
              "y": 39.0
            },
            {
              "index": 371,
              "timeLabel": "2011-12-07",
              "y": 200.0
            },
            {
              "index": 372,
              "timeLabel": "2011-12-08",
              "y": 108.0
            },
            {
              "index": 373,
              "timeLabel": "2011-12-09",
              "y": null
            }
          ],
          "result": {
            "metrics": {
              "origin": 335.0,
              "trainingCalendar": 335.0,
              "trainingObserved": 270.0,
              "horizon": 39.0,
              "forecastDefined": 4.0,
              "scorePairs": 4.0,
              "MAE": 328.1376198114854,
              "MSE": 305271.13626307796,
              "fitRows": 219.0,
              "rank": 7.0,
              "parameters": 9.0,
              "df": 212.0,
              "RSS": 29702128.782628734,
              "residualVariance": 140104.38105013553,
              "coefficient:intercept": 152.91705163000952,
              "coefficient:ARlag1": -0.022986185936359822,
              "coefficient:time-from-trendOrigin": -0.35124208692884606,
              "coefficient:season-phase1": 133.78326780820936,
              "coefficient:season-phase2": -12.1733290079987,
              "coefficient:season-phase3": null,
              "coefficient:season-phase4": null,
              "coefficient:season-phase5": 47.66955698687758,
              "coefficient:season-phase6": 107.20276431522511
            },
            "pred": [
              139.0287751195536,
              31.703969146514833,
              167.60298281347536,
              18.171343913621786,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null
            ],
            "actual": [
              39.0,
              80.0,
              1265.0,
              85.0,
              null,
              86.0,
              95.0,
              97.0,
              113.0,
              71.0,
              134.0,
              null,
              65.0,
              380.0,
              457.0,
              157.0,
              102.0,
              125.0,
              null,
              101.0,
              36.0,
              253.0,
              248.0,
              131.0,
              222.0,
              null,
              8.0,
              133.0,
              116.0,
              311.0,
              41.0,
              117.0,
              null,
              8.0,
              298.0,
              39.0,
              200.0,
              108.0,
              null
            ],
            "error": [
              -100.02877511955359,
              48.29603085348516,
              1097.3970171865246,
              66.82865608637822,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null
            ],
            "fit": {
              "part": [
                152.91705163000952,
                -0.022986185936359822,
                -0.35124208692884606,
                133.78326780820936,
                -12.1733290079987,
                0.0,
                0.0,
                47.66955698687758,
                107.20276431522511
              ],
              "basis": [
                [
                  0.0,
                  0.0
                ],
                [
                  0.0,
                  0.0
                ],
                [
                  0.0,
                  0.0
                ],
                [
                  0.0,
                  0.0
                ],
                [
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  0.0
                ],
                [
                  0.0,
                  1.0
                ],
                [
                  0.0,
                  0.0
                ],
                [
                  0.0,
                  0.0
                ]
              ],
              "rank": 7,
              "df": 212,
              "rss": 29702128.782628734,
              "fitted": [
                132.93850699381795,
                194.27913336684364,
                254.31158748790762,
                142.8499294765725,
                280.4194686663978,
                133.10023758206106,
                195.40628376441384,
                247.80732415460636,
                143.7472180147791,
                278.8572353094139,
                116.96476234142504,
                192.94758915591194,
                251.14114840206713,
                144.59853418111302,
                278.3983388773753,
                139.0835041297638,
                267.067803784127,
                123.81712761052599,
                184.30726510390636,
                245.4430561499156,
                66.58590097317351,
                269.68905626756066,
                125.10518130965072,
                183.54954825469508,
                238.20323486665086,
                135.2924380236416,
                262.9089587030231,
                121.86495637931257,
                180.53918518372052,
                240.5486531188481,
                131.13276565584906,
                262.4730484569208,
                118.9005656802107,
                176.33354044405525,
                237.67620716349177,
                126.30649389590207,
                259.1178925969009,
                116.46485725764514,
                175.89763019795296,
                234.29806511753543,
                124.81321909672725,
                261.4403246631618,
                113.93720409133417,
                174.1055349816055,
                231.9083290668426,
                125.59557670525204,
                254.63724091268784,
                111.846288457814,
                171.14114428250366,
                230.43804045360412,
                121.20604247809592,
                254.17834448064923,
                108.26127073843044,
                168.7054358599381,
                227.65753924199316,
                118.97720972895758,
                253.62750330486517,
                105.8715346877376,
                164.54576349214554,
                225.45169267879123,
                115.16233015021044,
                249.67470661049987,
                104.3093013307537,
                164.33971510540687,
                223.1539013718438,
                113.41620730573565,
                246.22760600673445,
                101.16102114416098,
                160.86962831570514,
                220.25846923055104,
                111.64709827532454,
                245.10211018254142,
                99.50684304343166,
                157.7213481291124,
                217.66185750643098,
                106.86679888725027,
                242.9882083630849,
                96.51946615839346,
                155.26265352061048,
                214.69746680732914,
                107.48825319422056,
                240.59847231239206,
                94.63542619830054,
                152.87291746991764,
                212.72148210349076,
                101.65058925307376,
                237.95588821639925,
                90.40679527269891,
                151.5865183441701,
                162.98020302389668,
                101.2146790069715,
                235.49719360789732,
                97.16993756886075,
                233.03849899939542,
                91.53914930114115,
                230.30397015965715,
                76.27277278190334,
                141.4750783922375,
                198.95606587436555,
                93.10303723150223,
                227.04075904338265,
                78.27339824505525,
                138.99339759779923,
                196.842164054909,
                90.32253601989126,
                225.66241517388963,
                78.55005976298013,
                136.3048411299337,
                196.40625380880675,
                88.13967564262566,
                223.3186514950695,
                63.56389381916209,
                85.1293125716511,
                221.75641813808562,
                68.00105499156814,
                133.77801525031126,
                191.6037955214847,
                85.24507078802147,
                217.4588286546749,
                -18.63305251588346,
                131.6870996167911,
                191.23684383319153,
                82.9242932951377,
                214.79325837274575,
                70.2323696007722,
                126.60797981154415,
                188.5023149934533,
                81.31608756628111,
                214.63318235787983,
                66.30255909234323,
                126.7926965857236,
                185.19313150530607,
                78.85739295777918,
                210.81830277913267,
                65.22303564002291,
                124.65580858033073,
                184.06763568111302,
                73.61736985097771,
                210.01461355804864,
                62.46552061434829,
                122.15114159995609,
                179.93094949925683,
                56.171682011969196,
                206.33765109491964,
                56.214105326347024,
                119.62348843364508,
                176.71371075485501,
                68.17129835743759,
                202.8215919333452,
                57.709034698898975,
                114.01568635186186,
                175.88703534783465,
                69.13754545345327,
                201.42026187791578,
                45.18239065027146,
                112.775259597987,
                173.01458939247823,
                66.12718238247872,
                198.20302313351402,
                50.998722978859064,
                110.73031633633956,
                170.28006055274,
                61.622717225640784,
                194.80189490162132,
                50.14906138590233,
                109.12211060748295,
                167.1087941802109,
                59.945552938975084,
                193.7913300071101,
                48.72474514453661,
                107.51390487862636,
                157.3864648158193,
                56.68234182270058,
                191.58548344390812,
                44.15132142988958,
                55.57983218444387,
                189.60949874006974,
                41.577695891705844,
                102.57352947568616,
                159.9395860281324,
                50.339809077642414,
                187.6335140362314,
                41.07282708779451,
                98.43684329382994,
                156.97519532903056,
                49.09938232376757,
                183.5887725981206,
                35.92474872473851,
                96.16203817281891,
                156.24046466575564,
                40.50337607025756,
                182.8310557489093,
                35.4428661067635,
                93.97917779555331,
                153.64385294163554,
                46.802418303508745,
                177.7519359436624,
                32.478475407661676,
                92.62382011199666,
                151.7598129815426,
                44.27476513719775,
                177.04019146632382,
                31.559855256895876,
                90.05019457381293,
                147.00249977940473,
                41.21842969435046,
                175.13316532029455,
                23.814337883031175,
                86.92490057315658,
                145.78505921146623,
                39.33438973425754,
                172.3526641086836,
                26.34364562271934,
                84.28231647716376,
                143.16546130140978,
                36.99062605543742,
                170.39966559078158,
                21.793208094008694,
                80.32951978279846
              ],
              "residual": [
                -107.93850699381795,
                -33.27913336684364,
                76.68841251209238,
                8.150070523427502,
                -85.41946866639779,
                31.899762417938945,
                141.59371623558616,
                -62.80732415460636,
                -31.747218014779094,
                511.1427646905861,
                -58.96476234142504,
                -107.94758915591194,
                -210.14114840206713,
                -119.59853418111302,
                -231.3983388773753,
                164.9164958702362,
                -96.06780378412702,
                210.18287238947403,
                -172.30726510390636,
                2868.5569438500843,
                16.41409902682649,
                -261.68905626756066,
                -36.10518130965072,
                36.45045174530492,
                -220.20323486665086,
                135.7075619763584,
                -220.90895870302307,
                -58.864956379312574,
                -169.53918518372052,
                -148.5486531188481,
                51.867234344150944,
                -198.47304845692082,
                -50.900565680210704,
                -147.33354044405525,
                -42.67620716349177,
                95.69350610409793,
                -196.1178925969009,
                -74.46485725764514,
                -106.89763019795296,
                -81.29806511753543,
                -110.81321909672725,
                -195.4403246631618,
                95.06279590866583,
                -108.1055349816055,
                -219.9083290668426,
                77.40442329474796,
                -204.63724091268784,
                -105.846288457814,
                -148.14114428250366,
                -134.43804045360412,
                -5.206042478095924,
                -155.17834448064923,
                -68.26127073843044,
                -131.7054358599381,
                -141.65753924199316,
                -85.97720972895758,
                -157.62750330486517,
                -78.8715346877376,
                -138.54576349214554,
                -80.45169267879123,
                -17.162330150210437,
                -192.67470661049987,
                20.690698669246302,
                -145.33971510540687,
                -109.1539013718438,
                27.583792694264346,
                -159.22760600673445,
                -44.16102114416098,
                -122.86962831570514,
                -136.25846923055104,
                -28.647098275324538,
                -193.10211018254142,
                -68.50684304343166,
                -113.72134812911241,
                -32.66185750643098,
                -38.86679888725027,
                -167.9882083630849,
                36.480533841606544,
                -89.26265352061048,
                -163.69746680732914,
                -42.48825319422056,
                -190.59847231239206,
                -26.635426198300536,
                -107.87291746991764,
                -14.721482103490757,
                -28.65058925307376,
                -110.95588821639925,
                -82.40679527269891,
                1950.4134816558299,
                -52.98020302389668,
                -28.214679006971494,
                -98.49719360789732,
                -24.169937568860746,
                -122.03849899939542,
                -6.539149301141151,
                190.69602984034285,
                102.72722721809666,
                74.52492160776251,
                -56.95606587436555,
                26.896962768497772,
                -0.04075904338264991,
                -53.27339824505525,
                62.00660240220077,
                -40.842164054909006,
                -17.32253601989126,
                -117.66241517388963,
                13.449940237019874,
                -23.304841129933692,
                -52.40625380880675,
                -20.13967564262566,
                429.6813485049305,
                -41.56389381916209,
                -56.1293125716511,
                131.24358186191438,
                -39.00105499156814,
                -25.778015250311256,
                -135.6037955214847,
                23.754929211978535,
                3797.541171345325,
                86.63305251588346,
                -114.6870996167911,
                -141.23684383319153,
                35.0757067048623,
                -172.79325837274575,
                -55.2323696007722,
                -97.60797981154415,
                -175.5023149934533,
                -63.31608756628111,
                -108.63318235787983,
                -28.30255909234323,
                -60.792696585723604,
                -172.19313150530607,
                -1.857392957779183,
                -164.81830277913267,
                -26.223035640022914,
                -116.65580858033073,
                -50.06763568111302,
                -68.61736985097771,
                -151.01461355804864,
                -30.465520614348293,
                -41.15114159995609,
                606.0690505007432,
                1.828317988030804,
                17.662348905080364,
                -33.214105326347024,
                -5.623488433645079,
                -19.713710754855015,
                35.82870164256241,
                -150.8215919333452,
                74.29096530110102,
                -71.01568635186186,
                -167.88703534783465,
                -11.13754545345327,
                288.5797381220842,
                28.817609349728542,
                -51.775259597987,
                -141.01458939247823,
                24.872817617521278,
                -68.20302313351402,
                -12.998722978859064,
                -37.730316336339556,
                -49.28006055274,
                70.37728277435922,
                -134.80189490162132,
                -22.14906138590233,
                -5.122110607482952,
                -80.10879418021091,
                9.054447061024916,
                -178.7913300071101,
                -42.72474514453661,
                312.48609512137364,
                -35.386464815819295,
                1.3176581772994211,
                -84.58548344390812,
                -20.151321429889578,
                -18.579832184443873,
                -77.60949874006974,
                124.42230410829416,
                -7.573529475686158,
                24.060413971867604,
                -34.339809077642414,
                -160.6335140362314,
                -12.072827087794508,
                18.563156706170062,
                -25.975195329030555,
                35.90061767623243,
                -39.58877259812061,
                64.0752512752615,
                -54.16203817281891,
                241.75953533424436,
                -29.50337607025756,
                -124.83105574890931,
                91.5571338932365,
                -45.97917779555331,
                -136.64385294163554,
                78.19758169649126,
                -97.7519359436624,
                78.52152459233832,
                -69.62382011199666,
                -131.7598129815426,
                4.725234862802253,
                -164.04019146632382,
                2.440144743104124,
                32.94980542618707,
                -101.00249977940473,
                -16.218429694350462,
                67.86683467970545,
                163.1856621169688,
                -17.924900573156577,
                -124.78505921146623,
                -0.3343897342575417,
                -146.3526641086836,
                -13.34364562271934,
                -8.28231647716376,
                -127.16546130140978,
                -19.990626055437417,
                -53.39966559078158,
                68.20679190599131,
                68.67048021720154
              ],
              "X": [
                [
                  1.0,
                  309.0,
                  2.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  198.0,
                  5.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  161.0,
                  6.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  331.0,
                  7.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  151.0,
                  8.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  195.0,
                  9.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  42.0,
                  12.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  337.0,
                  13.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  185.0,
                  14.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  112.0,
                  15.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  790.0,
                  16.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  42.0,
                  19.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  85.0,
                  20.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  41.0,
                  21.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  25.0,
                  22.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  67.0,
                  35.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  304.0,
                  36.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  171.0,
                  37.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  97.0,
                  40.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  12.0,
                  41.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  3114.0,
                  42.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  83.0,
                  43.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  8.0,
                  44.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  23.0,
                  47.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  220.0,
                  48.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  18.0,
                  49.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  271.0,
                  50.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  42.0,
                  51.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  47.0,
                  54.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  11.0,
                  55.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  92.0,
                  56.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  183.0,
                  57.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  64.0,
                  58.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  123.0,
                  61.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  29.0,
                  62.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  195.0,
                  63.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  222.0,
                  64.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  63.0,
                  65.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  35.0,
                  68.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  69.0,
                  69.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  153.0,
                  70.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  14.0,
                  71.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  66.0,
                  72.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  6.0,
                  75.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  66.0,
                  76.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  12.0,
                  77.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  203.0,
                  78.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  50.0,
                  79.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  28.0,
                  82.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  23.0,
                  83.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  96.0,
                  84.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  116.0,
                  85.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  99.0,
                  86.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  27.0,
                  89.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  37.0,
                  90.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  86.0,
                  91.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  33.0,
                  92.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  96.0,
                  93.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  101.0,
                  96.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  26.0,
                  97.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  145.0,
                  98.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  98.0,
                  99.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  57.0,
                  100.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  3.0,
                  103.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  19.0,
                  104.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  114.0,
                  105.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  141.0,
                  106.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  87.0,
                  107.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  47.0,
                  110.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  38.0,
                  111.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  84.0,
                  112.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  83.0,
                  113.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  52.0,
                  114.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  77.0,
                  117.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  44.0,
                  118.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  185.0,
                  119.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  68.0,
                  120.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  75.0,
                  121.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  77.0,
                  124.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  66.0,
                  125.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  51.0,
                  126.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  65.0,
                  127.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  50.0,
                  128.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  74.0,
                  131.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  45.0,
                  132.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  198.0,
                  133.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  73.0,
                  134.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  127.0,
                  135.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  23.0,
                  138.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  2102.0,
                  139.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  110.0,
                  140.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  73.0,
                  141.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  179.0,
                  147.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  73.0,
                  148.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  317.0,
                  154.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  85.0,
                  155.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  421.0,
                  156.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  142.0,
                  159.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  216.0,
                  160.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  142.0,
                  161.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  120.0,
                  162.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  227.0,
                  163.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  143.0,
                  166.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  201.0,
                  167.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  156.0,
                  168.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  73.0,
                  169.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  108.0,
                  170.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  153.0,
                  173.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  113.0,
                  174.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  144.0,
                  175.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  68.0,
                  176.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  653.0,
                  177.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  168.0,
                  182.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  29.0,
                  183.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  353.0,
                  184.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  49.0,
                  187.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  108.0,
                  188.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  56.0,
                  189.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  109.0,
                  190.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  4015.0,
                  191.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  33.0,
                  194.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  17.0,
                  195.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  50.0,
                  196.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  118.0,
                  197.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  42.0,
                  198.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  147.0,
                  201.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  29.0,
                  202.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  13.0,
                  203.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  18.0,
                  204.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  106.0,
                  205.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  32.0,
                  208.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  66.0,
                  209.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  13.0,
                  210.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  77.0,
                  211.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  46.0,
                  212.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  18.0,
                  215.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  8.0,
                  216.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  134.0,
                  217.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  5.0,
                  218.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  59.0,
                  219.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  20.0,
                  222.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  81.0,
                  223.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  786.0,
                  224.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  58.0,
                  225.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  224.0,
                  226.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  23.0,
                  229.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  114.0,
                  230.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  157.0,
                  231.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  104.0,
                  232.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  52.0,
                  233.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  160.0,
                  236.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  43.0,
                  237.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  8.0,
                  238.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  58.0,
                  239.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  490.0,
                  240.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  107.0,
                  243.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  61.0,
                  244.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  32.0,
                  245.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  91.0,
                  246.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  130.0,
                  247.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  89.0,
                  250.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  73.0,
                  251.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  121.0,
                  252.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  132.0,
                  253.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  60.0,
                  254.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  52.0,
                  257.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  104.0,
                  258.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  87.0,
                  259.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  69.0,
                  260.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  15.0,
                  261.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  15.0,
                  264.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  420.0,
                  265.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  122.0,
                  266.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  58.0,
                  267.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  107.0,
                  268.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  63.0,
                  273.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  37.0,
                  274.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  112.0,
                  275.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  16.0,
                  278.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  95.0,
                  279.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  184.0,
                  280.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  16.0,
                  281.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  27.0,
                  282.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  89.0,
                  285.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  117.0,
                  286.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  131.0,
                  287.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  85.0,
                  288.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  144.0,
                  289.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  81.0,
                  292.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  42.0,
                  293.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  398.0,
                  294.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  11.0,
                  295.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  58.0,
                  296.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  69.0,
                  299.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  48.0,
                  300.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  17.0,
                  301.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  125.0,
                  302.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  80.0,
                  303.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  21.0,
                  306.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  23.0,
                  307.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  20.0,
                  308.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  49.0,
                  309.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  13.0,
                  310.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  26.0,
                  313.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  123.0,
                  314.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  46.0,
                  315.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  25.0,
                  316.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  243.0,
                  317.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  55.0,
                  320.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  69.0,
                  321.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  21.0,
                  322.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  39.0,
                  323.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  26.0,
                  324.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  63.0,
                  327.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ],
                [
                  1.0,
                  76.0,
                  328.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  16.0,
                  329.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  17.0,
                  330.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  117.0,
                  331.0,
                  0.0,
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0
                ],
                [
                  1.0,
                  128.0,
                  334.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  1.0,
                  0.0
                ]
              ],
              "Y": [
                25.0,
                161.0,
                331.0,
                151.0,
                195.0,
                165.0,
                337.0,
                185.0,
                112.0,
                790.0,
                58.0,
                85.0,
                41.0,
                25.0,
                47.0,
                304.0,
                171.0,
                334.0,
                12.0,
                3114.0,
                83.0,
                8.0,
                89.0,
                220.0,
                18.0,
                271.0,
                42.0,
                63.0,
                11.0,
                92.0,
                183.0,
                64.0,
                68.0,
                29.0,
                195.0,
                222.0,
                63.0,
                42.0,
                69.0,
                153.0,
                14.0,
                66.0,
                209.0,
                66.0,
                12.0,
                203.0,
                50.0,
                6.0,
                23.0,
                96.0,
                116.0,
                99.0,
                40.0,
                37.0,
                86.0,
                33.0,
                96.0,
                27.0,
                26.0,
                145.0,
                98.0,
                57.0,
                125.0,
                19.0,
                114.0,
                141.0,
                87.0,
                57.0,
                38.0,
                84.0,
                83.0,
                52.0,
                31.0,
                44.0,
                185.0,
                68.0,
                75.0,
                133.0,
                66.0,
                51.0,
                65.0,
                50.0,
                68.0,
                45.0,
                198.0,
                73.0,
                127.0,
                8.0,
                2102.0,
                110.0,
                73.0,
                137.0,
                73.0,
                111.0,
                85.0,
                421.0,
                179.0,
                216.0,
                142.0,
                120.0,
                227.0,
                25.0,
                201.0,
                156.0,
                73.0,
                108.0,
                92.0,
                113.0,
                144.0,
                68.0,
                653.0,
                22.0,
                29.0,
                353.0,
                29.0,
                108.0,
                56.0,
                109.0,
                4015.0,
                68.0,
                17.0,
                50.0,
                118.0,
                42.0,
                15.0,
                29.0,
                13.0,
                18.0,
                106.0,
                38.0,
                66.0,
                13.0,
                77.0,
                46.0,
                39.0,
                8.0,
                134.0,
                5.0,
                59.0,
                32.0,
                81.0,
                786.0,
                58.0,
                224.0,
                23.0,
                114.0,
                157.0,
                104.0,
                52.0,
                132.0,
                43.0,
                8.0,
                58.0,
                490.0,
                74.0,
                61.0,
                32.0,
                91.0,
                130.0,
                38.0,
                73.0,
                121.0,
                132.0,
                60.0,
                28.0,
                104.0,
                87.0,
                69.0,
                15.0,
                6.0,
                420.0,
                122.0,
                58.0,
                107.0,
                24.0,
                37.0,
                112.0,
                166.0,
                95.0,
                184.0,
                16.0,
                27.0,
                29.0,
                117.0,
                131.0,
                85.0,
                144.0,
                100.0,
                42.0,
                398.0,
                11.0,
                58.0,
                127.0,
                48.0,
                17.0,
                125.0,
                80.0,
                111.0,
                23.0,
                20.0,
                49.0,
                13.0,
                34.0,
                123.0,
                46.0,
                25.0,
                243.0,
                187.0,
                69.0,
                21.0,
                39.0,
                26.0,
                13.0,
                76.0,
                16.0,
                17.0,
                117.0,
                90.0,
                149.0
              ],
              "used": [
                2,
                5,
                6,
                7,
                8,
                9,
                12,
                13,
                14,
                15,
                16,
                19,
                20,
                21,
                22,
                35,
                36,
                37,
                40,
                41,
                42,
                43,
                44,
                47,
                48,
                49,
                50,
                51,
                54,
                55,
                56,
                57,
                58,
                61,
                62,
                63,
                64,
                65,
                68,
                69,
                70,
                71,
                72,
                75,
                76,
                77,
                78,
                79,
                82,
                83,
                84,
                85,
                86,
                89,
                90,
                91,
                92,
                93,
                96,
                97,
                98,
                99,
                100,
                103,
                104,
                105,
                106,
                107,
                110,
                111,
                112,
                113,
                114,
                117,
                118,
                119,
                120,
                121,
                124,
                125,
                126,
                127,
                128,
                131,
                132,
                133,
                134,
                135,
                138,
                139,
                140,
                141,
                147,
                148,
                154,
                155,
                156,
                159,
                160,
                161,
                162,
                163,
                166,
                167,
                168,
                169,
                170,
                173,
                174,
                175,
                176,
                177,
                182,
                183,
                184,
                187,
                188,
                189,
                190,
                191,
                194,
                195,
                196,
                197,
                198,
                201,
                202,
                203,
                204,
                205,
                208,
                209,
                210,
                211,
                212,
                215,
                216,
                217,
                218,
                219,
                222,
                223,
                224,
                225,
                226,
                229,
                230,
                231,
                232,
                233,
                236,
                237,
                238,
                239,
                240,
                243,
                244,
                245,
                246,
                247,
                250,
                251,
                252,
                253,
                254,
                257,
                258,
                259,
                260,
                261,
                264,
                265,
                266,
                267,
                268,
                273,
                274,
                275,
                278,
                279,
                280,
                281,
                282,
                285,
                286,
                287,
                288,
                289,
                292,
                293,
                294,
                295,
                296,
                299,
                300,
                301,
                302,
                303,
                306,
                307,
                308,
                309,
                310,
                313,
                314,
                315,
                316,
                317,
                320,
                321,
                322,
                323,
                324,
                327,
                328,
                329,
                330,
                331,
                334
              ],
              "train": [
                {
                  "index": 0,
                  "timeLabel": "2010-12-01",
                  "y": null
                },
                {
                  "index": 1,
                  "timeLabel": "2010-12-02",
                  "y": 309.0
                },
                {
                  "index": 2,
                  "timeLabel": "2010-12-03",
                  "y": 25.0
                },
                {
                  "index": 3,
                  "timeLabel": "2010-12-04",
                  "y": null
                },
                {
                  "index": 4,
                  "timeLabel": "2010-12-05",
                  "y": 198.0
                },
                {
                  "index": 5,
                  "timeLabel": "2010-12-06",
                  "y": 161.0
                },
                {
                  "index": 6,
                  "timeLabel": "2010-12-07",
                  "y": 331.0
                },
                {
                  "index": 7,
                  "timeLabel": "2010-12-08",
                  "y": 151.0
                },
                {
                  "index": 8,
                  "timeLabel": "2010-12-09",
                  "y": 195.0
                },
                {
                  "index": 9,
                  "timeLabel": "2010-12-10",
                  "y": 165.0
                },
                {
                  "index": 10,
                  "timeLabel": "2010-12-11",
                  "y": null
                },
                {
                  "index": 11,
                  "timeLabel": "2010-12-12",
                  "y": 42.0
                },
                {
                  "index": 12,
                  "timeLabel": "2010-12-13",
                  "y": 337.0
                },
                {
                  "index": 13,
                  "timeLabel": "2010-12-14",
                  "y": 185.0
                },
                {
                  "index": 14,
                  "timeLabel": "2010-12-15",
                  "y": 112.0
                },
                {
                  "index": 15,
                  "timeLabel": "2010-12-16",
                  "y": 790.0
                },
                {
                  "index": 16,
                  "timeLabel": "2010-12-17",
                  "y": 58.0
                },
                {
                  "index": 17,
                  "timeLabel": "2010-12-18",
                  "y": null
                },
                {
                  "index": 18,
                  "timeLabel": "2010-12-19",
                  "y": 42.0
                },
                {
                  "index": 19,
                  "timeLabel": "2010-12-20",
                  "y": 85.0
                },
                {
                  "index": 20,
                  "timeLabel": "2010-12-21",
                  "y": 41.0
                },
                {
                  "index": 21,
                  "timeLabel": "2010-12-22",
                  "y": 25.0
                },
                {
                  "index": 22,
                  "timeLabel": "2010-12-23",
                  "y": 47.0
                },
                {
                  "index": 23,
                  "timeLabel": "2010-12-24",
                  "y": null
                },
                {
                  "index": 24,
                  "timeLabel": "2010-12-25",
                  "y": null
                },
                {
                  "index": 25,
                  "timeLabel": "2010-12-26",
                  "y": null
                },
                {
                  "index": 26,
                  "timeLabel": "2010-12-27",
                  "y": null
                },
                {
                  "index": 27,
                  "timeLabel": "2010-12-28",
                  "y": null
                },
                {
                  "index": 28,
                  "timeLabel": "2010-12-29",
                  "y": null
                },
                {
                  "index": 29,
                  "timeLabel": "2010-12-30",
                  "y": null
                },
                {
                  "index": 30,
                  "timeLabel": "2010-12-31",
                  "y": null
                },
                {
                  "index": 31,
                  "timeLabel": "2011-01-01",
                  "y": null
                },
                {
                  "index": 32,
                  "timeLabel": "2011-01-02",
                  "y": null
                },
                {
                  "index": 33,
                  "timeLabel": "2011-01-03",
                  "y": null
                },
                {
                  "index": 34,
                  "timeLabel": "2011-01-04",
                  "y": 67.0
                },
                {
                  "index": 35,
                  "timeLabel": "2011-01-05",
                  "y": 304.0
                },
                {
                  "index": 36,
                  "timeLabel": "2011-01-06",
                  "y": 171.0
                },
                {
                  "index": 37,
                  "timeLabel": "2011-01-07",
                  "y": 334.0
                },
                {
                  "index": 38,
                  "timeLabel": "2011-01-08",
                  "y": null
                },
                {
                  "index": 39,
                  "timeLabel": "2011-01-09",
                  "y": 97.0
                },
                {
                  "index": 40,
                  "timeLabel": "2011-01-10",
                  "y": 12.0
                },
                {
                  "index": 41,
                  "timeLabel": "2011-01-11",
                  "y": 3114.0
                },
                {
                  "index": 42,
                  "timeLabel": "2011-01-12",
                  "y": 83.0
                },
                {
                  "index": 43,
                  "timeLabel": "2011-01-13",
                  "y": 8.0
                },
                {
                  "index": 44,
                  "timeLabel": "2011-01-14",
                  "y": 89.0
                },
                {
                  "index": 45,
                  "timeLabel": "2011-01-15",
                  "y": null
                },
                {
                  "index": 46,
                  "timeLabel": "2011-01-16",
                  "y": 23.0
                },
                {
                  "index": 47,
                  "timeLabel": "2011-01-17",
                  "y": 220.0
                },
                {
                  "index": 48,
                  "timeLabel": "2011-01-18",
                  "y": 18.0
                },
                {
                  "index": 49,
                  "timeLabel": "2011-01-19",
                  "y": 271.0
                },
                {
                  "index": 50,
                  "timeLabel": "2011-01-20",
                  "y": 42.0
                },
                {
                  "index": 51,
                  "timeLabel": "2011-01-21",
                  "y": 63.0
                },
                {
                  "index": 52,
                  "timeLabel": "2011-01-22",
                  "y": null
                },
                {
                  "index": 53,
                  "timeLabel": "2011-01-23",
                  "y": 47.0
                },
                {
                  "index": 54,
                  "timeLabel": "2011-01-24",
                  "y": 11.0
                },
                {
                  "index": 55,
                  "timeLabel": "2011-01-25",
                  "y": 92.0
                },
                {
                  "index": 56,
                  "timeLabel": "2011-01-26",
                  "y": 183.0
                },
                {
                  "index": 57,
                  "timeLabel": "2011-01-27",
                  "y": 64.0
                },
                {
                  "index": 58,
                  "timeLabel": "2011-01-28",
                  "y": 68.0
                },
                {
                  "index": 59,
                  "timeLabel": "2011-01-29",
                  "y": null
                },
                {
                  "index": 60,
                  "timeLabel": "2011-01-30",
                  "y": 123.0
                },
                {
                  "index": 61,
                  "timeLabel": "2011-01-31",
                  "y": 29.0
                },
                {
                  "index": 62,
                  "timeLabel": "2011-02-01",
                  "y": 195.0
                },
                {
                  "index": 63,
                  "timeLabel": "2011-02-02",
                  "y": 222.0
                },
                {
                  "index": 64,
                  "timeLabel": "2011-02-03",
                  "y": 63.0
                },
                {
                  "index": 65,
                  "timeLabel": "2011-02-04",
                  "y": 42.0
                },
                {
                  "index": 66,
                  "timeLabel": "2011-02-05",
                  "y": null
                },
                {
                  "index": 67,
                  "timeLabel": "2011-02-06",
                  "y": 35.0
                },
                {
                  "index": 68,
                  "timeLabel": "2011-02-07",
                  "y": 69.0
                },
                {
                  "index": 69,
                  "timeLabel": "2011-02-08",
                  "y": 153.0
                },
                {
                  "index": 70,
                  "timeLabel": "2011-02-09",
                  "y": 14.0
                },
                {
                  "index": 71,
                  "timeLabel": "2011-02-10",
                  "y": 66.0
                },
                {
                  "index": 72,
                  "timeLabel": "2011-02-11",
                  "y": 209.0
                },
                {
                  "index": 73,
                  "timeLabel": "2011-02-12",
                  "y": null
                },
                {
                  "index": 74,
                  "timeLabel": "2011-02-13",
                  "y": 6.0
                },
                {
                  "index": 75,
                  "timeLabel": "2011-02-14",
                  "y": 66.0
                },
                {
                  "index": 76,
                  "timeLabel": "2011-02-15",
                  "y": 12.0
                },
                {
                  "index": 77,
                  "timeLabel": "2011-02-16",
                  "y": 203.0
                },
                {
                  "index": 78,
                  "timeLabel": "2011-02-17",
                  "y": 50.0
                },
                {
                  "index": 79,
                  "timeLabel": "2011-02-18",
                  "y": 6.0
                },
                {
                  "index": 80,
                  "timeLabel": "2011-02-19",
                  "y": null
                },
                {
                  "index": 81,
                  "timeLabel": "2011-02-20",
                  "y": 28.0
                },
                {
                  "index": 82,
                  "timeLabel": "2011-02-21",
                  "y": 23.0
                },
                {
                  "index": 83,
                  "timeLabel": "2011-02-22",
                  "y": 96.0
                },
                {
                  "index": 84,
                  "timeLabel": "2011-02-23",
                  "y": 116.0
                },
                {
                  "index": 85,
                  "timeLabel": "2011-02-24",
                  "y": 99.0
                },
                {
                  "index": 86,
                  "timeLabel": "2011-02-25",
                  "y": 40.0
                },
                {
                  "index": 87,
                  "timeLabel": "2011-02-26",
                  "y": null
                },
                {
                  "index": 88,
                  "timeLabel": "2011-02-27",
                  "y": 27.0
                },
                {
                  "index": 89,
                  "timeLabel": "2011-02-28",
                  "y": 37.0
                },
                {
                  "index": 90,
                  "timeLabel": "2011-03-01",
                  "y": 86.0
                },
                {
                  "index": 91,
                  "timeLabel": "2011-03-02",
                  "y": 33.0
                },
                {
                  "index": 92,
                  "timeLabel": "2011-03-03",
                  "y": 96.0
                },
                {
                  "index": 93,
                  "timeLabel": "2011-03-04",
                  "y": 27.0
                },
                {
                  "index": 94,
                  "timeLabel": "2011-03-05",
                  "y": null
                },
                {
                  "index": 95,
                  "timeLabel": "2011-03-06",
                  "y": 101.0
                },
                {
                  "index": 96,
                  "timeLabel": "2011-03-07",
                  "y": 26.0
                },
                {
                  "index": 97,
                  "timeLabel": "2011-03-08",
                  "y": 145.0
                },
                {
                  "index": 98,
                  "timeLabel": "2011-03-09",
                  "y": 98.0
                },
                {
                  "index": 99,
                  "timeLabel": "2011-03-10",
                  "y": 57.0
                },
                {
                  "index": 100,
                  "timeLabel": "2011-03-11",
                  "y": 125.0
                },
                {
                  "index": 101,
                  "timeLabel": "2011-03-12",
                  "y": null
                },
                {
                  "index": 102,
                  "timeLabel": "2011-03-13",
                  "y": 3.0
                },
                {
                  "index": 103,
                  "timeLabel": "2011-03-14",
                  "y": 19.0
                },
                {
                  "index": 104,
                  "timeLabel": "2011-03-15",
                  "y": 114.0
                },
                {
                  "index": 105,
                  "timeLabel": "2011-03-16",
                  "y": 141.0
                },
                {
                  "index": 106,
                  "timeLabel": "2011-03-17",
                  "y": 87.0
                },
                {
                  "index": 107,
                  "timeLabel": "2011-03-18",
                  "y": 57.0
                },
                {
                  "index": 108,
                  "timeLabel": "2011-03-19",
                  "y": null
                },
                {
                  "index": 109,
                  "timeLabel": "2011-03-20",
                  "y": 47.0
                },
                {
                  "index": 110,
                  "timeLabel": "2011-03-21",
                  "y": 38.0
                },
                {
                  "index": 111,
                  "timeLabel": "2011-03-22",
                  "y": 84.0
                },
                {
                  "index": 112,
                  "timeLabel": "2011-03-23",
                  "y": 83.0
                },
                {
                  "index": 113,
                  "timeLabel": "2011-03-24",
                  "y": 52.0
                },
                {
                  "index": 114,
                  "timeLabel": "2011-03-25",
                  "y": 31.0
                },
                {
                  "index": 115,
                  "timeLabel": "2011-03-26",
                  "y": null
                },
                {
                  "index": 116,
                  "timeLabel": "2011-03-27",
                  "y": 77.0
                },
                {
                  "index": 117,
                  "timeLabel": "2011-03-28",
                  "y": 44.0
                },
                {
                  "index": 118,
                  "timeLabel": "2011-03-29",
                  "y": 185.0
                },
                {
                  "index": 119,
                  "timeLabel": "2011-03-30",
                  "y": 68.0
                },
                {
                  "index": 120,
                  "timeLabel": "2011-03-31",
                  "y": 75.0
                },
                {
                  "index": 121,
                  "timeLabel": "2011-04-01",
                  "y": 133.0
                },
                {
                  "index": 122,
                  "timeLabel": "2011-04-02",
                  "y": null
                },
                {
                  "index": 123,
                  "timeLabel": "2011-04-03",
                  "y": 77.0
                },
                {
                  "index": 124,
                  "timeLabel": "2011-04-04",
                  "y": 66.0
                },
                {
                  "index": 125,
                  "timeLabel": "2011-04-05",
                  "y": 51.0
                },
                {
                  "index": 126,
                  "timeLabel": "2011-04-06",
                  "y": 65.0
                },
                {
                  "index": 127,
                  "timeLabel": "2011-04-07",
                  "y": 50.0
                },
                {
                  "index": 128,
                  "timeLabel": "2011-04-08",
                  "y": 68.0
                },
                {
                  "index": 129,
                  "timeLabel": "2011-04-09",
                  "y": null
                },
                {
                  "index": 130,
                  "timeLabel": "2011-04-10",
                  "y": 74.0
                },
                {
                  "index": 131,
                  "timeLabel": "2011-04-11",
                  "y": 45.0
                },
                {
                  "index": 132,
                  "timeLabel": "2011-04-12",
                  "y": 198.0
                },
                {
                  "index": 133,
                  "timeLabel": "2011-04-13",
                  "y": 73.0
                },
                {
                  "index": 134,
                  "timeLabel": "2011-04-14",
                  "y": 127.0
                },
                {
                  "index": 135,
                  "timeLabel": "2011-04-15",
                  "y": 8.0
                },
                {
                  "index": 136,
                  "timeLabel": "2011-04-16",
                  "y": null
                },
                {
                  "index": 137,
                  "timeLabel": "2011-04-17",
                  "y": 23.0
                },
                {
                  "index": 138,
                  "timeLabel": "2011-04-18",
                  "y": 2102.0
                },
                {
                  "index": 139,
                  "timeLabel": "2011-04-19",
                  "y": 110.0
                },
                {
                  "index": 140,
                  "timeLabel": "2011-04-20",
                  "y": 73.0
                },
                {
                  "index": 141,
                  "timeLabel": "2011-04-21",
                  "y": 137.0
                },
                {
                  "index": 142,
                  "timeLabel": "2011-04-22",
                  "y": null
                },
                {
                  "index": 143,
                  "timeLabel": "2011-04-23",
                  "y": null
                },
                {
                  "index": 144,
                  "timeLabel": "2011-04-24",
                  "y": null
                },
                {
                  "index": 145,
                  "timeLabel": "2011-04-25",
                  "y": null
                },
                {
                  "index": 146,
                  "timeLabel": "2011-04-26",
                  "y": 179.0
                },
                {
                  "index": 147,
                  "timeLabel": "2011-04-27",
                  "y": 73.0
                },
                {
                  "index": 148,
                  "timeLabel": "2011-04-28",
                  "y": 111.0
                },
                {
                  "index": 149,
                  "timeLabel": "2011-04-29",
                  "y": null
                },
                {
                  "index": 150,
                  "timeLabel": "2011-04-30",
                  "y": null
                },
                {
                  "index": 151,
                  "timeLabel": "2011-05-01",
                  "y": 12.0
                },
                {
                  "index": 152,
                  "timeLabel": "2011-05-02",
                  "y": null
                },
                {
                  "index": 153,
                  "timeLabel": "2011-05-03",
                  "y": 317.0
                },
                {
                  "index": 154,
                  "timeLabel": "2011-05-04",
                  "y": 85.0
                },
                {
                  "index": 155,
                  "timeLabel": "2011-05-05",
                  "y": 421.0
                },
                {
                  "index": 156,
                  "timeLabel": "2011-05-06",
                  "y": 179.0
                },
                {
                  "index": 157,
                  "timeLabel": "2011-05-07",
                  "y": null
                },
                {
                  "index": 158,
                  "timeLabel": "2011-05-08",
                  "y": 142.0
                },
                {
                  "index": 159,
                  "timeLabel": "2011-05-09",
                  "y": 216.0
                },
                {
                  "index": 160,
                  "timeLabel": "2011-05-10",
                  "y": 142.0
                },
                {
                  "index": 161,
                  "timeLabel": "2011-05-11",
                  "y": 120.0
                },
                {
                  "index": 162,
                  "timeLabel": "2011-05-12",
                  "y": 227.0
                },
                {
                  "index": 163,
                  "timeLabel": "2011-05-13",
                  "y": 25.0
                },
                {
                  "index": 164,
                  "timeLabel": "2011-05-14",
                  "y": null
                },
                {
                  "index": 165,
                  "timeLabel": "2011-05-15",
                  "y": 143.0
                },
                {
                  "index": 166,
                  "timeLabel": "2011-05-16",
                  "y": 201.0
                },
                {
                  "index": 167,
                  "timeLabel": "2011-05-17",
                  "y": 156.0
                },
                {
                  "index": 168,
                  "timeLabel": "2011-05-18",
                  "y": 73.0
                },
                {
                  "index": 169,
                  "timeLabel": "2011-05-19",
                  "y": 108.0
                },
                {
                  "index": 170,
                  "timeLabel": "2011-05-20",
                  "y": 92.0
                },
                {
                  "index": 171,
                  "timeLabel": "2011-05-21",
                  "y": null
                },
                {
                  "index": 172,
                  "timeLabel": "2011-05-22",
                  "y": 153.0
                },
                {
                  "index": 173,
                  "timeLabel": "2011-05-23",
                  "y": 113.0
                },
                {
                  "index": 174,
                  "timeLabel": "2011-05-24",
                  "y": 144.0
                },
                {
                  "index": 175,
                  "timeLabel": "2011-05-25",
                  "y": 68.0
                },
                {
                  "index": 176,
                  "timeLabel": "2011-05-26",
                  "y": 653.0
                },
                {
                  "index": 177,
                  "timeLabel": "2011-05-27",
                  "y": 22.0
                },
                {
                  "index": 178,
                  "timeLabel": "2011-05-28",
                  "y": null
                },
                {
                  "index": 179,
                  "timeLabel": "2011-05-29",
                  "y": 26.0
                },
                {
                  "index": 180,
                  "timeLabel": "2011-05-30",
                  "y": null
                },
                {
                  "index": 181,
                  "timeLabel": "2011-05-31",
                  "y": 168.0
                },
                {
                  "index": 182,
                  "timeLabel": "2011-06-01",
                  "y": 29.0
                },
                {
                  "index": 183,
                  "timeLabel": "2011-06-02",
                  "y": 353.0
                },
                {
                  "index": 184,
                  "timeLabel": "2011-06-03",
                  "y": 29.0
                },
                {
                  "index": 185,
                  "timeLabel": "2011-06-04",
                  "y": null
                },
                {
                  "index": 186,
                  "timeLabel": "2011-06-05",
                  "y": 49.0
                },
                {
                  "index": 187,
                  "timeLabel": "2011-06-06",
                  "y": 108.0
                },
                {
                  "index": 188,
                  "timeLabel": "2011-06-07",
                  "y": 56.0
                },
                {
                  "index": 189,
                  "timeLabel": "2011-06-08",
                  "y": 109.0
                },
                {
                  "index": 190,
                  "timeLabel": "2011-06-09",
                  "y": 4015.0
                },
                {
                  "index": 191,
                  "timeLabel": "2011-06-10",
                  "y": 68.0
                },
                {
                  "index": 192,
                  "timeLabel": "2011-06-11",
                  "y": null
                },
                {
                  "index": 193,
                  "timeLabel": "2011-06-12",
                  "y": 33.0
                },
                {
                  "index": 194,
                  "timeLabel": "2011-06-13",
                  "y": 17.0
                },
                {
                  "index": 195,
                  "timeLabel": "2011-06-14",
                  "y": 50.0
                },
                {
                  "index": 196,
                  "timeLabel": "2011-06-15",
                  "y": 118.0
                },
                {
                  "index": 197,
                  "timeLabel": "2011-06-16",
                  "y": 42.0
                },
                {
                  "index": 198,
                  "timeLabel": "2011-06-17",
                  "y": 15.0
                },
                {
                  "index": 199,
                  "timeLabel": "2011-06-18",
                  "y": null
                },
                {
                  "index": 200,
                  "timeLabel": "2011-06-19",
                  "y": 147.0
                },
                {
                  "index": 201,
                  "timeLabel": "2011-06-20",
                  "y": 29.0
                },
                {
                  "index": 202,
                  "timeLabel": "2011-06-21",
                  "y": 13.0
                },
                {
                  "index": 203,
                  "timeLabel": "2011-06-22",
                  "y": 18.0
                },
                {
                  "index": 204,
                  "timeLabel": "2011-06-23",
                  "y": 106.0
                },
                {
                  "index": 205,
                  "timeLabel": "2011-06-24",
                  "y": 38.0
                },
                {
                  "index": 206,
                  "timeLabel": "2011-06-25",
                  "y": null
                },
                {
                  "index": 207,
                  "timeLabel": "2011-06-26",
                  "y": 32.0
                },
                {
                  "index": 208,
                  "timeLabel": "2011-06-27",
                  "y": 66.0
                },
                {
                  "index": 209,
                  "timeLabel": "2011-06-28",
                  "y": 13.0
                },
                {
                  "index": 210,
                  "timeLabel": "2011-06-29",
                  "y": 77.0
                },
                {
                  "index": 211,
                  "timeLabel": "2011-06-30",
                  "y": 46.0
                },
                {
                  "index": 212,
                  "timeLabel": "2011-07-01",
                  "y": 39.0
                },
                {
                  "index": 213,
                  "timeLabel": "2011-07-02",
                  "y": null
                },
                {
                  "index": 214,
                  "timeLabel": "2011-07-03",
                  "y": 18.0
                },
                {
                  "index": 215,
                  "timeLabel": "2011-07-04",
                  "y": 8.0
                },
                {
                  "index": 216,
                  "timeLabel": "2011-07-05",
                  "y": 134.0
                },
                {
                  "index": 217,
                  "timeLabel": "2011-07-06",
                  "y": 5.0
                },
                {
                  "index": 218,
                  "timeLabel": "2011-07-07",
                  "y": 59.0
                },
                {
                  "index": 219,
                  "timeLabel": "2011-07-08",
                  "y": 32.0
                },
                {
                  "index": 220,
                  "timeLabel": "2011-07-09",
                  "y": null
                },
                {
                  "index": 221,
                  "timeLabel": "2011-07-10",
                  "y": 20.0
                },
                {
                  "index": 222,
                  "timeLabel": "2011-07-11",
                  "y": 81.0
                },
                {
                  "index": 223,
                  "timeLabel": "2011-07-12",
                  "y": 786.0
                },
                {
                  "index": 224,
                  "timeLabel": "2011-07-13",
                  "y": 58.0
                },
                {
                  "index": 225,
                  "timeLabel": "2011-07-14",
                  "y": 224.0
                },
                {
                  "index": 226,
                  "timeLabel": "2011-07-15",
                  "y": 23.0
                },
                {
                  "index": 227,
                  "timeLabel": "2011-07-16",
                  "y": null
                },
                {
                  "index": 228,
                  "timeLabel": "2011-07-17",
                  "y": 23.0
                },
                {
                  "index": 229,
                  "timeLabel": "2011-07-18",
                  "y": 114.0
                },
                {
                  "index": 230,
                  "timeLabel": "2011-07-19",
                  "y": 157.0
                },
                {
                  "index": 231,
                  "timeLabel": "2011-07-20",
                  "y": 104.0
                },
                {
                  "index": 232,
                  "timeLabel": "2011-07-21",
                  "y": 52.0
                },
                {
                  "index": 233,
                  "timeLabel": "2011-07-22",
                  "y": 132.0
                },
                {
                  "index": 234,
                  "timeLabel": "2011-07-23",
                  "y": null
                },
                {
                  "index": 235,
                  "timeLabel": "2011-07-24",
                  "y": 160.0
                },
                {
                  "index": 236,
                  "timeLabel": "2011-07-25",
                  "y": 43.0
                },
                {
                  "index": 237,
                  "timeLabel": "2011-07-26",
                  "y": 8.0
                },
                {
                  "index": 238,
                  "timeLabel": "2011-07-27",
                  "y": 58.0
                },
                {
                  "index": 239,
                  "timeLabel": "2011-07-28",
                  "y": 490.0
                },
                {
                  "index": 240,
                  "timeLabel": "2011-07-29",
                  "y": 74.0
                },
                {
                  "index": 241,
                  "timeLabel": "2011-07-30",
                  "y": null
                },
                {
                  "index": 242,
                  "timeLabel": "2011-07-31",
                  "y": 107.0
                },
                {
                  "index": 243,
                  "timeLabel": "2011-08-01",
                  "y": 61.0
                },
                {
                  "index": 244,
                  "timeLabel": "2011-08-02",
                  "y": 32.0
                },
                {
                  "index": 245,
                  "timeLabel": "2011-08-03",
                  "y": 91.0
                },
                {
                  "index": 246,
                  "timeLabel": "2011-08-04",
                  "y": 130.0
                },
                {
                  "index": 247,
                  "timeLabel": "2011-08-05",
                  "y": 38.0
                },
                {
                  "index": 248,
                  "timeLabel": "2011-08-06",
                  "y": null
                },
                {
                  "index": 249,
                  "timeLabel": "2011-08-07",
                  "y": 89.0
                },
                {
                  "index": 250,
                  "timeLabel": "2011-08-08",
                  "y": 73.0
                },
                {
                  "index": 251,
                  "timeLabel": "2011-08-09",
                  "y": 121.0
                },
                {
                  "index": 252,
                  "timeLabel": "2011-08-10",
                  "y": 132.0
                },
                {
                  "index": 253,
                  "timeLabel": "2011-08-11",
                  "y": 60.0
                },
                {
                  "index": 254,
                  "timeLabel": "2011-08-12",
                  "y": 28.0
                },
                {
                  "index": 255,
                  "timeLabel": "2011-08-13",
                  "y": null
                },
                {
                  "index": 256,
                  "timeLabel": "2011-08-14",
                  "y": 52.0
                },
                {
                  "index": 257,
                  "timeLabel": "2011-08-15",
                  "y": 104.0
                },
                {
                  "index": 258,
                  "timeLabel": "2011-08-16",
                  "y": 87.0
                },
                {
                  "index": 259,
                  "timeLabel": "2011-08-17",
                  "y": 69.0
                },
                {
                  "index": 260,
                  "timeLabel": "2011-08-18",
                  "y": 15.0
                },
                {
                  "index": 261,
                  "timeLabel": "2011-08-19",
                  "y": 6.0
                },
                {
                  "index": 262,
                  "timeLabel": "2011-08-20",
                  "y": null
                },
                {
                  "index": 263,
                  "timeLabel": "2011-08-21",
                  "y": 15.0
                },
                {
                  "index": 264,
                  "timeLabel": "2011-08-22",
                  "y": 420.0
                },
                {
                  "index": 265,
                  "timeLabel": "2011-08-23",
                  "y": 122.0
                },
                {
                  "index": 266,
                  "timeLabel": "2011-08-24",
                  "y": 58.0
                },
                {
                  "index": 267,
                  "timeLabel": "2011-08-25",
                  "y": 107.0
                },
                {
                  "index": 268,
                  "timeLabel": "2011-08-26",
                  "y": 24.0
                },
                {
                  "index": 269,
                  "timeLabel": "2011-08-27",
                  "y": null
                },
                {
                  "index": 270,
                  "timeLabel": "2011-08-28",
                  "y": 42.0
                },
                {
                  "index": 271,
                  "timeLabel": "2011-08-29",
                  "y": null
                },
                {
                  "index": 272,
                  "timeLabel": "2011-08-30",
                  "y": 63.0
                },
                {
                  "index": 273,
                  "timeLabel": "2011-08-31",
                  "y": 37.0
                },
                {
                  "index": 274,
                  "timeLabel": "2011-09-01",
                  "y": 112.0
                },
                {
                  "index": 275,
                  "timeLabel": "2011-09-02",
                  "y": 166.0
                },
                {
                  "index": 276,
                  "timeLabel": "2011-09-03",
                  "y": null
                },
                {
                  "index": 277,
                  "timeLabel": "2011-09-04",
                  "y": 16.0
                },
                {
                  "index": 278,
                  "timeLabel": "2011-09-05",
                  "y": 95.0
                },
                {
                  "index": 279,
                  "timeLabel": "2011-09-06",
                  "y": 184.0
                },
                {
                  "index": 280,
                  "timeLabel": "2011-09-07",
                  "y": 16.0
                },
                {
                  "index": 281,
                  "timeLabel": "2011-09-08",
                  "y": 27.0
                },
                {
                  "index": 282,
                  "timeLabel": "2011-09-09",
                  "y": 29.0
                },
                {
                  "index": 283,
                  "timeLabel": "2011-09-10",
                  "y": null
                },
                {
                  "index": 284,
                  "timeLabel": "2011-09-11",
                  "y": 89.0
                },
                {
                  "index": 285,
                  "timeLabel": "2011-09-12",
                  "y": 117.0
                },
                {
                  "index": 286,
                  "timeLabel": "2011-09-13",
                  "y": 131.0
                },
                {
                  "index": 287,
                  "timeLabel": "2011-09-14",
                  "y": 85.0
                },
                {
                  "index": 288,
                  "timeLabel": "2011-09-15",
                  "y": 144.0
                },
                {
                  "index": 289,
                  "timeLabel": "2011-09-16",
                  "y": 100.0
                },
                {
                  "index": 290,
                  "timeLabel": "2011-09-17",
                  "y": null
                },
                {
                  "index": 291,
                  "timeLabel": "2011-09-18",
                  "y": 81.0
                },
                {
                  "index": 292,
                  "timeLabel": "2011-09-19",
                  "y": 42.0
                },
                {
                  "index": 293,
                  "timeLabel": "2011-09-20",
                  "y": 398.0
                },
                {
                  "index": 294,
                  "timeLabel": "2011-09-21",
                  "y": 11.0
                },
                {
                  "index": 295,
                  "timeLabel": "2011-09-22",
                  "y": 58.0
                },
                {
                  "index": 296,
                  "timeLabel": "2011-09-23",
                  "y": 127.0
                },
                {
                  "index": 297,
                  "timeLabel": "2011-09-24",
                  "y": null
                },
                {
                  "index": 298,
                  "timeLabel": "2011-09-25",
                  "y": 69.0
                },
                {
                  "index": 299,
                  "timeLabel": "2011-09-26",
                  "y": 48.0
                },
                {
                  "index": 300,
                  "timeLabel": "2011-09-27",
                  "y": 17.0
                },
                {
                  "index": 301,
                  "timeLabel": "2011-09-28",
                  "y": 125.0
                },
                {
                  "index": 302,
                  "timeLabel": "2011-09-29",
                  "y": 80.0
                },
                {
                  "index": 303,
                  "timeLabel": "2011-09-30",
                  "y": 111.0
                },
                {
                  "index": 304,
                  "timeLabel": "2011-10-01",
                  "y": null
                },
                {
                  "index": 305,
                  "timeLabel": "2011-10-02",
                  "y": 21.0
                },
                {
                  "index": 306,
                  "timeLabel": "2011-10-03",
                  "y": 23.0
                },
                {
                  "index": 307,
                  "timeLabel": "2011-10-04",
                  "y": 20.0
                },
                {
                  "index": 308,
                  "timeLabel": "2011-10-05",
                  "y": 49.0
                },
                {
                  "index": 309,
                  "timeLabel": "2011-10-06",
                  "y": 13.0
                },
                {
                  "index": 310,
                  "timeLabel": "2011-10-07",
                  "y": 34.0
                },
                {
                  "index": 311,
                  "timeLabel": "2011-10-08",
                  "y": null
                },
                {
                  "index": 312,
                  "timeLabel": "2011-10-09",
                  "y": 26.0
                },
                {
                  "index": 313,
                  "timeLabel": "2011-10-10",
                  "y": 123.0
                },
                {
                  "index": 314,
                  "timeLabel": "2011-10-11",
                  "y": 46.0
                },
                {
                  "index": 315,
                  "timeLabel": "2011-10-12",
                  "y": 25.0
                },
                {
                  "index": 316,
                  "timeLabel": "2011-10-13",
                  "y": 243.0
                },
                {
                  "index": 317,
                  "timeLabel": "2011-10-14",
                  "y": 187.0
                },
                {
                  "index": 318,
                  "timeLabel": "2011-10-15",
                  "y": null
                },
                {
                  "index": 319,
                  "timeLabel": "2011-10-16",
                  "y": 55.0
                },
                {
                  "index": 320,
                  "timeLabel": "2011-10-17",
                  "y": 69.0
                },
                {
                  "index": 321,
                  "timeLabel": "2011-10-18",
                  "y": 21.0
                },
                {
                  "index": 322,
                  "timeLabel": "2011-10-19",
                  "y": 39.0
                },
                {
                  "index": 323,
                  "timeLabel": "2011-10-20",
                  "y": 26.0
                },
                {
                  "index": 324,
                  "timeLabel": "2011-10-21",
                  "y": 13.0
                },
                {
                  "index": 325,
                  "timeLabel": "2011-10-22",
                  "y": null
                },
                {
                  "index": 326,
                  "timeLabel": "2011-10-23",
                  "y": 63.0
                },
                {
                  "index": 327,
                  "timeLabel": "2011-10-24",
                  "y": 76.0
                },
                {
                  "index": 328,
                  "timeLabel": "2011-10-25",
                  "y": 16.0
                },
                {
                  "index": 329,
                  "timeLabel": "2011-10-26",
                  "y": 17.0
                },
                {
                  "index": 330,
                  "timeLabel": "2011-10-27",
                  "y": 117.0
                },
                {
                  "index": 331,
                  "timeLabel": "2011-10-28",
                  "y": 90.0
                },
                {
                  "index": 332,
                  "timeLabel": "2011-10-29",
                  "y": null
                },
                {
                  "index": 333,
                  "timeLabel": "2011-10-30",
                  "y": 128.0
                },
                {
                  "index": 334,
                  "timeLabel": "2011-10-31",
                  "y": 149.0
                }
              ],
              "z": [
                null,
                309.0,
                25.0,
                null,
                198.0,
                161.0,
                331.0,
                151.0,
                195.0,
                165.0,
                null,
                42.0,
                337.0,
                185.0,
                112.0,
                790.0,
                58.0,
                null,
                42.0,
                85.0,
                41.0,
                25.0,
                47.0,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                67.0,
                304.0,
                171.0,
                334.0,
                null,
                97.0,
                12.0,
                3114.0,
                83.0,
                8.0,
                89.0,
                null,
                23.0,
                220.0,
                18.0,
                271.0,
                42.0,
                63.0,
                null,
                47.0,
                11.0,
                92.0,
                183.0,
                64.0,
                68.0,
                null,
                123.0,
                29.0,
                195.0,
                222.0,
                63.0,
                42.0,
                null,
                35.0,
                69.0,
                153.0,
                14.0,
                66.0,
                209.0,
                null,
                6.0,
                66.0,
                12.0,
                203.0,
                50.0,
                6.0,
                null,
                28.0,
                23.0,
                96.0,
                116.0,
                99.0,
                40.0,
                null,
                27.0,
                37.0,
                86.0,
                33.0,
                96.0,
                27.0,
                null,
                101.0,
                26.0,
                145.0,
                98.0,
                57.0,
                125.0,
                null,
                3.0,
                19.0,
                114.0,
                141.0,
                87.0,
                57.0,
                null,
                47.0,
                38.0,
                84.0,
                83.0,
                52.0,
                31.0,
                null,
                77.0,
                44.0,
                185.0,
                68.0,
                75.0,
                133.0,
                null,
                77.0,
                66.0,
                51.0,
                65.0,
                50.0,
                68.0,
                null,
                74.0,
                45.0,
                198.0,
                73.0,
                127.0,
                8.0,
                null,
                23.0,
                2102.0,
                110.0,
                73.0,
                137.0,
                null,
                null,
                null,
                null,
                179.0,
                73.0,
                111.0,
                null,
                null,
                12.0,
                null,
                317.0,
                85.0,
                421.0,
                179.0,
                null,
                142.0,
                216.0,
                142.0,
                120.0,
                227.0,
                25.0,
                null,
                143.0,
                201.0,
                156.0,
                73.0,
                108.0,
                92.0,
                null,
                153.0,
                113.0,
                144.0,
                68.0,
                653.0,
                22.0,
                null,
                26.0,
                null,
                168.0,
                29.0,
                353.0,
                29.0,
                null,
                49.0,
                108.0,
                56.0,
                109.0,
                4015.0,
                68.0,
                null,
                33.0,
                17.0,
                50.0,
                118.0,
                42.0,
                15.0,
                null,
                147.0,
                29.0,
                13.0,
                18.0,
                106.0,
                38.0,
                null,
                32.0,
                66.0,
                13.0,
                77.0,
                46.0,
                39.0,
                null,
                18.0,
                8.0,
                134.0,
                5.0,
                59.0,
                32.0,
                null,
                20.0,
                81.0,
                786.0,
                58.0,
                224.0,
                23.0,
                null,
                23.0,
                114.0,
                157.0,
                104.0,
                52.0,
                132.0,
                null,
                160.0,
                43.0,
                8.0,
                58.0,
                490.0,
                74.0,
                null,
                107.0,
                61.0,
                32.0,
                91.0,
                130.0,
                38.0,
                null,
                89.0,
                73.0,
                121.0,
                132.0,
                60.0,
                28.0,
                null,
                52.0,
                104.0,
                87.0,
                69.0,
                15.0,
                6.0,
                null,
                15.0,
                420.0,
                122.0,
                58.0,
                107.0,
                24.0,
                null,
                42.0,
                null,
                63.0,
                37.0,
                112.0,
                166.0,
                null,
                16.0,
                95.0,
                184.0,
                16.0,
                27.0,
                29.0,
                null,
                89.0,
                117.0,
                131.0,
                85.0,
                144.0,
                100.0,
                null,
                81.0,
                42.0,
                398.0,
                11.0,
                58.0,
                127.0,
                null,
                69.0,
                48.0,
                17.0,
                125.0,
                80.0,
                111.0,
                null,
                21.0,
                23.0,
                20.0,
                49.0,
                13.0,
                34.0,
                null,
                26.0,
                123.0,
                46.0,
                25.0,
                243.0,
                187.0,
                null,
                55.0,
                69.0,
                21.0,
                39.0,
                26.0,
                13.0,
                null,
                63.0,
                76.0,
                16.0,
                17.0,
                117.0,
                90.0,
                null,
                128.0,
                149.0
              ],
              "names": [
                "intercept",
                "ARlag1",
                "time-from-trendOrigin",
                "season-phase1",
                "season-phase2",
                "season-phase3",
                "season-phase4",
                "season-phase5",
                "season-phase6"
              ],
              "delta": 1.0
            }
          }
        },
        "plotPoints": [
          {
            "label": "Actual recorded values",
            "x": [
              311,
              312,
              313,
              314,
              315,
              316,
              317,
              318,
              319,
              320,
              321,
              322,
              323,
              324,
              325,
              326,
              327,
              328,
              329,
              330,
              331,
              332,
              333,
              334,
              335,
              336,
              337,
              338,
              339,
              340,
              341,
              342,
              343,
              344,
              345,
              346,
              347,
              348,
              349,
              350,
              351,
              352,
              353,
              354,
              355,
              356,
              357,
              358,
              359,
              360,
              361,
              362,
              363,
              364,
              365,
              366,
              367,
              368,
              369,
              370,
              371,
              372,
              373
            ],
            "y": [
              null,
              26.0,
              123.0,
              46.0,
              25.0,
              243.0,
              187.0,
              null,
              55.0,
              69.0,
              21.0,
              39.0,
              26.0,
              13.0,
              null,
              63.0,
              76.0,
              16.0,
              17.0,
              117.0,
              90.0,
              null,
              128.0,
              149.0,
              39.0,
              80.0,
              1265.0,
              85.0,
              null,
              86.0,
              95.0,
              97.0,
              113.0,
              71.0,
              134.0,
              null,
              65.0,
              380.0,
              457.0,
              157.0,
              102.0,
              125.0,
              null,
              101.0,
              36.0,
              253.0,
              248.0,
              131.0,
              222.0,
              null,
              8.0,
              133.0,
              116.0,
              311.0,
              41.0,
              117.0,
              null,
              8.0,
              298.0,
              39.0,
              200.0,
              108.0,
              null
            ]
          },
          {
            "label": "Declared model forecast",
            "x": [
              335.0,
              336.0,
              337.0,
              338.0,
              339.0,
              340.0,
              341.0,
              342.0,
              343.0,
              344.0,
              345.0,
              346.0,
              347.0,
              348.0,
              349.0,
              350.0,
              351.0,
              352.0,
              353.0,
              354.0,
              355.0,
              356.0,
              357.0,
              358.0,
              359.0,
              360.0,
              361.0,
              362.0,
              363.0,
              364.0,
              365.0,
              366.0,
              367.0,
              368.0,
              369.0,
              370.0,
              371.0,
              372.0,
              373.0
            ],
            "y": [
              139.0287751195536,
              31.703969146514833,
              167.60298281347536,
              18.171343913621786,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null,
              null
            ]
          }
        ],
        "plotFile": "metr14-plots/realdata-company-r.svg",
        "actualNativeOfflineExecution": true,
        "scope": "Fixed stated settings,not current web controls. Actual sources only for realdata;all other values explicitly assumed. Python exact fractions/base-R numeric QR;no JS oracle."
      }
    }
  }
}
