MilesCranmer commited on
Commit
386f4f2
1 Parent(s): 67dd4fe

Stop using anonymous function for square error

Browse files
Files changed (1) hide show
  1. eureqa.jl +2 -1
eureqa.jl CHANGED
@@ -227,7 +227,8 @@ end
227
 
228
  # Sum of square error between two arrays
229
  function SSE(x::Array{Float32}, y::Array{Float32})::Float32
230
- return sum(((cx,)->cx^2).(x - y))
 
231
  end
232
 
233
  # Mean of square error between two arrays
 
227
 
228
  # Sum of square error between two arrays
229
  function SSE(x::Array{Float32}, y::Array{Float32})::Float32
230
+ diff = (x - y)
231
+ return sum(diff .* diff)
232
  end
233
 
234
  # Mean of square error between two arrays