aiddl-test.learning.regression.line-regression.aiddl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aiddl-common-scala Show documentation
Show all versions of aiddl-common-scala Show documentation
Provides common types and algorithm implementations for the fast prototyping integrative AI systems with the AIDDL framework.
The newest version!
(#mod self org.aiddl.common.test.learning.regression.line-regression-01)
(#req R org.aiddl.util.random)
(#nms RandNms nms-basic@R)
(#req EVAL org.aiddl.eval.namespace)
(#nms E basic@EVAL)
(#def f_real (+ 2.0 (* 4.0 #self)))
(#def f_noise (div (- (random) 0.5) 10.0))
(#def f (+ ($f_real #self) ($f_noise)))
(#def sample
(let [?x:(- (* 5.0 (random)) 10.0)]
(($f ?x) ?x)))
(#def (expand ?x)
(1 ?x (pow ?x 2) (pow ?x 3)))
(#def generate
(map ^$sample (domain {min:1 inc:1 max:#self})))
© 2015 - 2025 Weber Informatics LLC | Privacy Policy