PageSourceSearch

https://yasharkiarashi.info/assets/ASDPredictor-BE3Tlb4k.js

js yasharkiarashi.info collected 2026-10-07 04:05:56 UTC 12,537 bytes, 6 lines download raw bytes

1import{c as k,j as e,s as c,r as m,S as w,d as A,H as S,b as B,B as h,e as I}from"./index-BjqJOPO7.js";import{B as R}from"./BreadcrumbJsonLd-Bd8uhMRI.js";import{R as E}from"./rotate-ccw-CUR1-O-k.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const C=k("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),D=[{key:"aggression",label:"Aggression",color:"bg-red-500"},{key:"sib",label:"SIB (Self-Injurious)",color:"bg-orange-500"},{key:"disruptive",label:"Disruptive Behavior",color:"bg-amber-500"},{key:"elopement",label:"Elopement",color:"bg-yellow-500"},{key:"mouthing",label:"Mouthing/Pica",color:"bg-lime-500"},{key:"impulsive",label:"Impulsive Behavior",color:"bg-emerald-500"},{key:"agitation",label:"Agitation",color:"bg-cyan-500"}],g=Array.from({length:14},(s,r)=>-(14-r));function H({behaviorData:s,onToggle:r}){return e.jsx("div",{className:"w-full overflow-x-auto",children:e.jsxs("div",{className:"min-w-[800px]",children:[e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"w-40 flex-shrink-0 p-2 font-medium text-sm text-muted-foreground",children:"Behavior Category"}),g.map(t=>e.jsxs("div",{className:"flex-1 min-w-[40px] p-1 text-center text-xs font-medium text-muted-foreground",children:["Day ",t]},t))]}),D.map(({key:t,label:a,color:i})=>e.jsxs("div",{className:"flex items-center border-t border-border/50",children:[e.jsxs("div",{className:"w-40 flex-shrink-0 p-2 flex items-center gap-2",children:[e.jsx("div",{className:c("w-3 h-3 rounded-full",i)}),e.jsx("span",{className:"text-sm font-medium truncate",children:a})]}),g.map((l,n)=>{var d;const o=((d=s[t])==null?void 0:d[n])||!1;return e.jsx("div",{className:"flex-1 min-w-[40px] p-1 flex justify-center",children:e.jsx("button",{onClick:()=>r(t,n),className:c("w-7 h-7 rounded-md border-2 transition-all duration-200","hover:scale-110 hover:shadow-md focus:outline-none focus:ring-2 focus:ring-ring",o?c(i,"border-transparent shadow-sm"):"bg-background border-border/50 hover:border-border"),"aria-label":`${a} on Day ${l}: ${o?"Observed":"Not Observed"}`})},`${t}-${l}`)})]},t)),e.jsxs("div",{className:"flex items-center justify-center gap-6 mt-4 pt-4 border-t border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded-md border-2 border-border/50 bg-background"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Not Observed"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded-md bg-primary"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"Observed"})]})]})]})})}const j={sib:{disruptive:.85,seizure:.3,sib:1,aggression:.8,elopement:.35,mouthing:.25,impulsive:.3,agitation:.5},aggression:{disruptive:.8,seizure:.2,sib:.75,aggression:1,elopement:.35,mouthing:.2,impulsive:.35,agitation:.55},elopement:{disruptive:.9,seizure:.1,sib:.4,aggression:.4,elopement:1,mouthing:.15,impulsive:.45,agitation:.35}},P={aggression:78.3,sib:80.2,elopement:85.7};function L(s){return s>=11?1.25:s<=2?.75:1}function M(s){const r=["sib","aggression","elopement"],t=["aggression","sib","disruptive","elopement","mouthing","impulsive","agitation","seizure"],a={sib:0,aggression:0,elopement:0};return r.forEach(i=>{let l=0,n=0;t.forEach(o=>{const d=s[o]||Array(14).fill(!1),x=j[i][o];d.forEach((u,N)=>{const y=L(N),f=x*y;l+=f,u&&(n+=f)})}),a[i]=l>0?n/l*100:0}),a}function O(){return j}const T=[{key:"aggression",label:"Aggression",description:"Next-day aggression likelihood"},{key:"sib",label:"SIB",description:"Next-day self-injurious behavior likelihood"},{key:"elopement",label:"Elopement",description:"Next-day elopement likelihood"}];function b(s){return s>=60?"text-red-500":s>=30?"text-amber-500":"text-emerald-500"}function F(s){return s>=60?"stroke-red-500":s>=30?"stroke-amber-500":"stroke-emerald-500"}function _(s){return s>=60?"High":s>=30?"Moderate":"Low"}function $({value:s,size:r=120,strokeWidth:t=10}){const a=(r-t)/2,i=2*Math.PI*a,l=i-s/100*i;return e.jsxs("div",{className:"relative",style:{width:r,height:r},children:[e.jsxs("svg",{width:r,height:r,className:"transform -rotate-90",children:[e.jsx("circle",{cx:r/2,cy:r/2,r:a,fill:"none",stroke:"currentColor",strokeWidth:t,className:"text-muted/30"}),e.jsx("circle",{cx:r/2,cy:r/2,r:a,fill:"none",strokeWidth:t,strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:l,className:c("transition-all duration-500",F(s))})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[e.jsxs("span",{className:c("text-2xl font-bold",b(s)),children:[s.toFixed(0),"%"]}),e.jsx("span",{className:c("text-xs font-medium",b(s)),children:_(s)})]})]})}function V({riskScores:s}){return e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:T.map(({key:r,label:t,description:a})=>e.jsxs("div",{className:"flex flex-col items-center p-4 rounded-xl bg-card border border-border/50 shadow-sm",children:[e.jsx("h3",{className:"text-lg font-semibold mb-3",children:t}),e.jsx($,{value:s[r]}),e.jsx("p",{className:"text-xs text-muted-foreground text-center mt-3",children:a}),e.jsxs("div",{className:"mt-2 px-3 py-1 rounded-full bg-muted text-xs font-medium",children:["Model Accuracy: ",P[r],"%"]})]},r))})}const G=[{key:"disruptive",label:"Disruptive"},{key:"sib",label:"Prior SIB"},{key:"aggression",label:"Prior Aggression"},{key:"elopement",label:"Prior Elopement"},{key:"mouthing",label:"Mouthing/Pica"},{key:"impulsive",label:"Impulsive"},{key:"agitation",label:"Agitation"}],p=[{key:"aggression",label:"Aggression Risk"},{key:"sib",label:"SIB Risk"},{key:"elopement",label:"Elopement Risk"}];function W(s){return s>=.8?"bg-red-600 text-white":s>=.6?"bg-red-400 text-white":s>=.4?"bg-amber-400 text-foreground":s>=.2?"bg-blue-200 text-foreground":"bg-blue-100 text-foreground"}function z(){const s=O();return e.jsxs("div",{className:"rounded-xl bg-card border border-border/50 shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-border/50 bg-muted/30",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"Feature Importance Heatmap"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Based on Grad-CAM analysis from Figure 4 of the paper"})]}),e.jsx("div",{className:"p-4 overflow-x-auto",children:e.jsxs("div",{className:"min-w-[500px]",children:[e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"w-28 flex-shrink-0"}),p.map(({key:r,label:t})=>e.jsx("div",{className:"flex-1 min-w-[90px] p-2 text-center text-xs font-medium text-muted-foreground",children:t},r))]}),G.map(({key:r,label:t})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"w-28 flex-shrink-0 p-2 text-xs font-medium truncate",children:t}),p.map(({key:a})=>{const i=s[a][r];return e.jsx("div",{className:"flex-1 min-w-[90px] p-1",children:e.jsx("div",{className:c("rounded-md py-2 px-3 text-center text-sm font-medium transition-all",W(i)),children:i.toFixed(2)})},`${r}-${a}`)})]},r)),e.jsxs("div",{className:"flex items-center justify-center gap-4 mt-6 pt-4 border-t border-border/50",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Low Impact"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-8 h-4 rounded bg-blue-100"}),e.jsx("div",{className:"w-8 h-4 rounded bg-blue-200"}),e.jsx("div",{className:"w-8 h-4 rounded bg-amber-400"}),e.jsx("div",{className:"w-8 h-4 rounded bg-red-400"}),e.jsx("div",{className:"w-8 h-4 rounded bg-red-600"})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"High Impact"})]})]})})]})}const v={aggression:Array(14).fill(!1),sib:Array(14).fill(!1),disruptive:Array(14).fill(!1),elopement:Array(14).fill(!1),mouthing:Array(14).fill(!1),impulsive:Array(14).fill(!1),agitation:Array(14).fill(!1)},J=()=>{const[s,r]=m.useState(v),t=m.useCallback((n,o)=>{r(d=>({...d,[n]:d[n].map((x,u)=>u===o?!x:x)}))},[]),a=m.useCallback(()=>{r(v)},[]),i=m.useCallback(()=>{r({aggression:[!1,!0,!1,!1,!0,!0,!1,!1,!0,!1,!0,!0,!1,!0],sib:[!1,!1,!0,!1,!1,!0,!1,!0,!1,!1,!0,!1,!0,!1],disruptive:[!0,!0,!1,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0],elopement:[!1,!1,!1,!0,!1,!1,!1,!1,!0,!1,!1,!1,!1,!0],mouthing:[!1,
6!0,!1,!1,!1,!0,!1,!1,!1,!0,!1,!1,!1,!1],impulsive:[!0,!1,!0,!1,!0,!1,!0,!1,!0,!1,!0,!1,!0,!1],agitation:[!0,!0,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!1,!0]})},[]),l=m.useMemo(()=>M(s),[s]);return e.jsxs(e.Fragment,{children:[e.jsx(w,{title:"ASD High-Risk Event Predictor | Yashar Kiarashi",description:"Predict seizures and adverse behaviors in autism from 14-day behavioral patterns, from Kiarashi et al., Physiological Measurement 2025.",path:"/asd-predictor"}),e.jsx(R,{trail:[{name:"Demos",path:"/demos"},{name:"ASD High-Risk Event Predictor",path:"/asd-predictor"}]}),e.jsx("div",{className:"min-h-screen relative bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:e.jsxs("div",{className:"relative z-10",children:[e.jsx(A,{}),e.jsx(S,{}),e.jsx("div",{className:"container mx-auto px-4 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"p-3 rounded-2xl bg-primary/20 border border-primary/30",children:e.jsx(B,{className:"h-10 w-10 text-primary"})})}),e.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-white mb-3",children:"ASD High-Risk Event Predictor"}),e.jsx("p",{className:"text-slate-300 max-w-2xl mx-auto",children:"Predict high-risk behavioral events in autism through adverse behavioral patterns"}),e.jsx("div",{className:"mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/20 border border-primary/30",children:e.jsx("span",{className:"text-sm text-primary font-medium",children:"Simplified Demo Version. See paper for full model details"})})]}),e.jsx("div",{className:"mb-8 p-4 rounded-xl bg-slate-800/50 border border-slate-700/50 backdrop-blur-sm",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(C,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-slate-300",children:[e.jsx("span",{className:"font-medium text-white",children:"Based on:"}),' Kiarashi, Y., et al. (2025). "Predicting seizure episodes and high-risk events in autism through adverse behavioral patterns."',e.jsx("span",{className:"italic",children:" Physiological Measurement"}),", 46(4), 045008."]}),e.jsx("a",{href:"https://iopscience.iop.org/article/10.1088/1361-6579/adc844",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline text-sm mt-1 inline-block",children:"View Publication →"})]})]})}),e.jsxs("div",{className:"mb-8 p-6 rounded-xl bg-slate-800/50 border border-slate-700/50 backdrop-blur-sm",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold text-white",children:"14-Day Behavioral History"}),e.jsx("p",{className:"text-sm text-slate-400",children:"Click cells to toggle observed/not observed behaviors"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{variant:"outline",size:"sm",onClick:i,className:"border-slate-600 hover:bg-slate-700",children:"Load Sample"}),e.jsxs(h,{variant:"outline",size:"sm",onClick:a,className:"border-slate-600 hover:bg-slate-700",children:[e.jsx(E,{className:"w-4 h-4 mr-1"}),"Reset"]})]})]}),e.jsx(H,{behaviorData:s,onToggle:t})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-xl font-semibold text-white mb-4",children:"Next-Day Risk Prediction"}),e.jsx(V,{riskScores:l})]}),e.jsx("div",{className:"mb-8",children:e.jsx(z,{})}),e.jsx("div",{className:"mt-8 p-4 rounded-xl bg-amber-500/10 border border-amber-500/30",children:e.jsxs("p",{className:"text-sm text-amber-200/90",children:[e.jsx("span",{className:"font-semibold",children:"Disclaimer:"})," This is a research demonstration tool and should not be used for clinical decision-making. Always consult with healthcare professionals for medical advice and treatment decisions."]})})]})}),e.jsx(I,{})]})})]})};export{J 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.