Skip to content

Instantly share code, notes, and snippets.

@pkofod
Created October 7, 2015 20:59
Show Gist options
  • Save pkofod/4124e62d1827c93e271e to your computer and use it in GitHub Desktop.
Save pkofod/4124e62d1827c93e271e to your computer and use it in GitHub Desktop.
type ML
vector
phat
end
ml = ML(rand(8000), zeros(8000))
function test6(a)
@time for i = 1:1000
for j = 1:8000
a.phat[j] = 1./(1+exp(-a.vector[j]))
end
end
end
function test6(a, b)
@time for i = 1:1000
for j = 1:8000
a[j] = 1./(1+exp(-b[j]))
end
end
end
test6(ml)
test6(ml.phat, ml.vector)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment