Skip to content

Commit

Permalink
feat: completed nn post.
Browse files Browse the repository at this point in the history
  • Loading branch information
Panadestein committed Jan 7, 2025
1 parent 4d15d75 commit ff5c926
Show file tree
Hide file tree
Showing 2 changed files with 7,913 additions and 27 deletions.
23 changes: 12 additions & 11 deletions src/bqn/nn.bqn
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ M ← +˝∘×⎉1‿∞

Minn ← {rtly𝕊dat:
ADA ← ⟨1÷1+⋆-, ⊢×1-
BP ← {fstswe𝕊𝕩:
do<(-ts×DA)hxtx1(↑⋈↓)𝕩
(fs<tx)×⌜˜¨dodo{d𝕊wz: z DA×d M˜w}`¨´tx˜1we
BP ← {fstswe𝕊𝕩:
do<(-ts×DA)hxtx¯1(↑⋈↓)𝕩
(fs<tx)×⌜˜¨do˜do({d𝕊wz: z DA×d M˜w}`)tx¨˜1we
}
FP ← {z𝕊bwe: wezA¨b+we M z}`(¨´)
EFP{´𝕩𝔽 dat{𝕨𝕊biwe: fsts𝕨(↑⋈↓)˜ly
biwe-rt× fstswe BP fs<FP𝕩}˝˜(U1-1≠⋈·<˘2)ly}
FP ← {z𝕊bwe: A¨b+we M z}`(¨´)
nndat{𝕨𝕊biwe: fsts𝕨(↑⋈↓)˜ly
biwe-rt× fstswe BP fs<FP𝕩}˝˜(U1-1≠⋈·<˘2)ly
E´<FPnn
}

nrirfdr102.840.1
td{𝕩˘2𝕩(⊣×1-×⊢)(n)•rand.Range 0}¨((ri+dr×⊢))rf
nerirfdr2003002.840.1
pd{𝕩˘⊏⍉2𝕩(⊣×1-×⊢)(↕⌊3÷˜n)•rand.Range 0}¨((ri+0.01×⊢))rf
@td(e-1)˜{𝕩˘2𝕩(⊣×1-×⊢)(n)•rand.Range 0}¨((ri+dr×⊢))rf

lm0.01‿⟨2, 5, 1Minn td
lm.E 2.85
lm0.001‿⟨2, 300, 1Minn td

)r Setplot "scatter"•Out¨ Plot´ m {ns≠⊑𝕨 ⋄ (>𝕨)˜nsns/𝕩} r
)r Setplot "scatter"•Out¨ Plot˝(⊑∾lm.E)˘pd
Loading

0 comments on commit ff5c926

Please sign in to comment.