PageSourceSearch

https://app.ambertrace.ai/assets/SymbolicForecastPanel-BCcRfFc-.js

js ambertrace.ai collected 2026-10-05 14:39:03 UTC 7,764 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FittedSeriesChart-DHV0MnAl.js","assets/index-lWBDFIKM.js","assets/index-0D3JmUqL.css","assets/DriverReportTable-xKZYZQMT.js","assets/DriverReportTable-BEPMidAQ.css"])))=>i.map(i=>d[i]);
2import{r as t,aY as S,j as e,_ as g}from"./index-lWBDFIKM.js";import{c as F}from"./conditionText-BEonOZLS.js";const E=t.lazy(()=>g(()=>import("./FittedSeriesChart-DHV0MnAl.js"),__vite__mapDeps([0,1,2]))),D=t.lazy(()=>g(()=>import("./DriverReportTable-xKZYZQMT.js"),__vite__mapDeps([3,1,2,4])));function j(i){return i==null||Number.isNaN(i)?"—":i.toFixed(3)}function $({platformId:i,configId:m}){var y;const[f,p]=t.useState(!1),[h,v]=t.useState(""),[s,x]=t.useState(null),w=S();if(t.useEffect(()=>{let a=!1;if(!i||!m){x(null),v("");return}return p(!0),v(""),x(null),w.mutateAsync({id:i,data:{prediction_config_id:parseInt(m),include_fitted_series:!0}}).then(c=>{a||x(c.data||null)}).catch(c=>{var d,u,o;a||v(((o=(u=(d=c.response)==null?void 0:d.data)==null?void 0:u.error)==null?void 0:o.message)||"Failed to load the symbolic forecast.")}).finally(()=>{a||p(!1)}),()=>{a=!0}},[i,m]),!m)return null;const b=(s==null?void 0:s.why)||(s==null?void 0:s.accepted_drivers)||[],r=s==null?void 0:s.forecast,l=s==null?void 0:s.why_certification,N=s==null?void 0:s.drivers_fired,k=s==null?void 0:s.point_is_persistence,n=s==null?void 0:s.discovery_mode,_=s==null?void 0:s.driver_report;return e.jsxs("div",{className:"at-card at-sf-panel",children:[e.jsx("div",{className:"at-card-header",children:e.jsxs("h2",{className:"at-card-title",children:["Symbolic forecast (explainable)",n&&e.jsx("span",{className:"at-sf-discovery-badge",children:"Discovery"})]})}),n&&!f&&!h&&s&&e.jsxs("div",{className:"at-sf-discovery-banner",role:"status",children:[e.jsx("strong",{children:"Find My Drivers"})," — the platform auto-discovered all numeric columns as candidate drivers and ranked them by holdout evidence. The table below shows the predictive drivers it found."]}),e.jsx("p",{className:"at-sf-lede",children:n?"The platform discovered predictive drivers from all available features and ranked them by importance with holdout evidence.":"The transparent neurosymbolic forecaster fits its own driver-RULES from your data and forecasts from them — every figure below is traceable to a named rule, its condition, and the features it reads."}),h&&e.jsxs("div",{className:"at-alert at-alert-error",role:"alert",children:[e.jsx("span",{className:"at-alert-label",children:"Error"}),h]}),f&&e.jsx("div",{style:{color:"var(--slate-400)",fontSize:"0.85rem"},"aria-live":"polite",children:"Loading the symbolic forecast and its driver-rules…"}),!f&&!h&&s&&e.jsxs(e.Fragment,{children:[r&&e.jsxs("div",{className:"at-sf-metrics",children:[e.jsxs("div",{className:"at-sf-metric",children:[e.jsxs("div",{className:"at-sf-metric-label",children:["Forecast",s.target_field?` — ${s.target_field}`:""]}),e.jsx("div",{className:"at-sf-metric-value",children:r.value!=null?r.value.toFixed(4):"—"}),e.jsxs("div",{className:"at-sf-metric-desc",children:["Interval [",r.lower!=null?r.lower.toFixed(4):"—",", ",r.upper!=null?r.upper.toFixed(4):"—","]",r.interval_basis?` · band from ${r.interval_basis==="driver_bands"?"fired driver bands":"backtest RMSE"}`:"",s.horizon!=null?` · horizon ${s.horizon}`:""]})]}),e.jsxs("div",{className:"at-sf-metric",children:[e.jsx("div",{className:"at-sf-metric-label",children:"Skill vs persistence"}),e.jsx("div",{className:"at-sf-metric-value",children:j(s.skill_vs_persistence)}),e.jsx("div",{className:"at-sf-metric-desc",children:"How much the accepted driver-set beats a naïve “tomorrow = today” baseline over the backtest (higher is better; 0 = no edge)."})]}),e.jsxs("div",{className:"at-sf-metric",children:[e.jsx("div",{className:"at-sf-metric-label",children:"Best single-rule skill"}),e.jsx("div",{className:"at-sf-metric-value",children:j(s.max_standalone_holdout_skill)}),e.jsx("div",{className:"at-sf-metric-desc",children:"The strongest individual driver-rule’s standalone skill over the same baseline."})]}),e.jsxs("div",{className:"at-sf-metric",children:[e.jsx("div",{className:"at-sf-metric-label",children:"Drivers fired now"}),e.jsx("div",{className:"at-sf-metric-value",children:N??"—"}),e.jsx("div",{className:"at-sf-metric-desc",children:k?"No driver fired on the latest row, so the point forecast falls back to persistence — the rules below still describe the learned structure.":"Number of driver-rules active on the latest row, c
2omposing the point forecast."})]})]}),l&&e.jsx("div",{className:`at-sf-cert${(y=l.rejected_facts)!=null&&y.length?" at-sf-cert-rejected":""}`,children:e.jsxs("p",{className:"at-sf-cert-summary",children:[e.jsxs("strong",{children:[l.proof_checked?"Certified":"Certification incomplete",":"]})," ",l.proof_summary||`${(l.certified_facts||[]).length} certified fact(s), ${(l.rejected_facts||[]).length} rejected.`]})}),n&&_&&e.jsxs("div",{className:"at-sf-section",children:[e.jsx("h3",{className:"at-sf-rules-heading",children:"Discovered Drivers (ranked)"}),e.jsx(t.Suspense,{fallback:e.jsx("div",{style:{color:"var(--slate-400)"},children:"Loading driver table..."}),children:e.jsx(D,{report:_})})]}),e.jsxs("div",{className:"at-sf-section",children:[e.jsx("h3",{className:"at-sf-rules-heading",children:n?"Driver-rules (detail)":"Driver-rules"}),b.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"at-sf-rules-sub",children:["The materially-contributing rules the forecaster induced and accepted on the holdout. Rules marked ",e.jsx("strong",{children:"Active now"})," ","fired on the latest row and compose the current forecast."]}),e.jsx("ul",{className:"at-sf-rules",children:b.map((a,c)=>{var o;const d=!!a.fired_on_latest_row,u=F(a.condition)||a.driver||"—";return e.jsxs("li",{className:`at-sf-rule${d?" at-sf-rule-active":""}`,children:[e.jsxs("div",{className:"at-sf-rule-head",children:[e.jsx("span",{className:"at-sf-rule-name",children:a.name||`Rule ${c+1}`}),d?e.jsx("span",{className:"at-sf-badge-active",children:"Active now"}):e.jsx("span",{className:"at-sf-badge-dormant",children:"Not active now"})]}),e.jsxs("pre",{className:"at-sf-rule-condition","aria-label":"Rule condition",children:["WHEN ",u]}),e.jsxs("div",{className:"at-sf-rule-meta",children:[((o=a.base_features)==null?void 0:o.length)>0&&e.jsxs("span",{children:[e.jsx("span",{className:"at-sf-rule-meta-label",children:"Reads "}),e.jsx("span",{className:"at-sf-rule-meta-value",children:a.base_features.join(", ")})]}),e.jsxs("span",{children:[e.jsx("span",{className:"at-sf-rule-meta-label",children:"Standalone skill "}),e.jsx("span",{className:"at-sf-rule-meta-value",children:j(a.standalone_holdout_skill)})]}),a.direction&&e.jsxs("span",{children:[e.jsx("span",{className:"at-sf-rule-meta-label",children:"Direction "}),e.jsx("span",{className:"at-sf-rule-meta-value",children:a.direction})]}),a.proof_checked&&e.jsxs("span",{children:[e.jsx("span",{className:"at-sf-rule-meta-label",children:"Proof "}),e.jsx("span",{className:"at-sf-rule-meta-value",children:"certified"})]})]})]},a.name||c)})})]}):e.jsx("div",{className:"at-sf-empty",children:"No driver-rules passed the backtest for this config — the symbolic signal here is weak or absent (common on short or near-random-walk series), so the forecast falls back to an honest persistence baseline with an uncertainty band. Add more historical rows or informative features to give the forecaster more to learn from."})]}),s.fitted_series&&e.jsx("div",{className:"at-sf-section",children:e.jsx(t.Suspense,{fallback:e.jsx("div",{style:{color:"var(--slate-400)"},children:"Loading chart…"}),children:e.jsx(E,{fittedSeries:s.fitted_series})})})]})]})}export{$ as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.