News for hackers. Stuff that matters.
Re:Smile – Statistical Machine Intelligence and Learning Engine by sampo on Wednesday March 29, 2017 @12:49PM (#13988125)
How does adding

    Array(1.0, 2.0, 3.0, 4.0)
and

    Array(4.0, 3.0, 2.0, 1.0)
result in

    Array(1.7302967433402214, 2.547722557505166, 3.3651483716701107, 4.182574185835056)
Re:Smile – Statistical Machine Intelligence and Learning Engine by jordigh on Wednesday March 29, 2017 @02:25PM (#13989146)
Floats are weird and unpredictable like that. You can save yourself an RNG call if you simply add two floats. ;-)

More seriously, the result here really is x + y/norm(y). I would be really interested in knowing what the bug is here. Probably just a C&P error that forgot to update the result, since y is unitized (in-place?) in a call further below.

Re:Smile – Statistical Machine Intelligence and Learning Engine by haifeng on Wednesday March 29, 2017 @02:40PM (#13989259)
Is there something wrong in your code? I don't see the effect.

smile> val x = Array(1.0, 2.0, 3.0, 4.0)

x: Array[Double] = Array(1.0, 2.0, 3.0, 4.0)

smile> val y = Array(4.0, 3.0, 2.0, 1.0)

y: Array[Double] = Array(4.0, 3.0, 2.0, 1.0)

smile> x + y

res2: smile.math.VectorAddVector = Array(5.0, 5.0, 5.0, 5.0)

Re:Smile – Statistical Machine Intelligence and Learning Engine by sampo on Wednesday March 29, 2017 @02:44PM (#13989317)
I just quoted the example in the webpage (section "Vector Operations"), I didn't run it myself.
Re:Smile – Statistical Machine Intelligence and Learning Engine by haifeng on Wednesday March 29, 2017 @02:54PM (#13989432)
Good eyes :) It should be a c&p error.
Re:Smile – Statistical Machine Intelligence and Learning Engine by sampo on Wednesday March 29, 2017 @04:45PM (#13990411)
Ok, they have fixed the website now.
Re:Smile – Statistical Machine Intelligence and Learning Engine by QuercusMax on Wednesday March 29, 2017 @12:53PM (#13988182)
That does seem very strange.