Skip to content
Snippets Groups Projects
Commit b7497dde authored by Christian Beckmann's avatar Christian Beckmann
Browse files

gcc3 changes

parent ebb6d05d
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ namespace Melodic{
Params=zeros(1,nummix);
logprobY = 1.0;
props = std::pow(nummix,-1);
props = std::pow(float(nummix),float(-1.0));
Matrix tmp1;
tmp1 = data * data.t() / numdata;
......@@ -113,7 +113,7 @@ namespace Melodic{
epsilon = eps;
if(epsilon >=0 && epsilon < 0.0000001)
{epsilon = std::log(dat.Ncols())/1000 ;}
{epsilon = std::log(float(dat.Ncols()))/1000 ;}
fixdim = fixit;
}
......@@ -511,7 +511,7 @@ namespace Melodic{
if(means.Ncols()>1){
logH = sum(log(sum(tmp0.Rows(1,nummix-1),2)),1).AsScalar();
}
logH = logH + 2*sum(log(std::sqrt(2)*numdata*props),2).AsScalar();
logH = logH + 2*sum(log(std::sqrt(2.0)*numdata*props),2).AsScalar();
logH = logH - 2*sum(props,2).AsScalar();
RowVector prob_Y__theta;
......@@ -519,9 +519,9 @@ namespace Melodic{
logprobY = log(prob_Y__theta).Sum();
MDL = -logprobY + (1.5*nummix-0.5)* std::log(numdata);
MDL = -logprobY + (1.5*nummix-0.5)* std::log(float(numdata));
Evi = -logprobY +nummix*std::log(2)-std::log(MISCMATHS::gamma(nummix))
Evi = -logprobY +nummix*std::log(2.0)-std::log(MISCMATHS::gamma(nummix))
-3*nummix/2*std::log(M_PI)+0.5*logH;
return Evi;
......@@ -734,7 +734,7 @@ namespace Melodic{
Params=zeros(1,nummix);
logprobY = 1.0;
props = std::pow(nummix,-1);
props = std::pow(float(nummix),float(-1.0));
tmp1 = data * data.t() / numdata;
vars = tmp1.AsScalar();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment