Skip to content

Instantly share code, notes, and snippets.

@alfard
Created April 10, 2013 00:35
Show Gist options
  • Save alfard/5350711 to your computer and use it in GitHub Desktop.
Save alfard/5350711 to your computer and use it in GitHub Desktop.
X=readcsv("e4.csv");
y2=readcsv("comparaisonY2.csv");
y3=readcsv("comparaisonY3.csv");
Result=rand(156849,1);
Result3=rand(156849,1);
tic();
for i= 1:156849
ensemblefity2=expm1( ( y2[:,1]*X[i,1] + y2[:,2]*X[i,2] + y2[:,3]*X[i,3] + y2[:,4]*X[i,4] )/100)
T=[y2 ensemblefity2 ]
Result[i,:]=sqrt( (1/size(T,1)) * sum(( log( T[:,6] +1 ) - log( T[:,5]+1 ) ).^2))
ensemblefity3=expm1( ( y3[:,1]*X[i,1] + y3[:,2]*X[i,2] + y3[:,3]*X[i,3] + y3[:,4]*X[i,4] )/100)
T3=[y3 ensemblefity3 ]
Result3[i,:]=sqrt( (1/size(T3,1)) * sum(( log( T3[:,6] +1 ) - log( T3[:,5]+1 ) ).^2))
println(i);
end;
toc();
tic();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment