Skip to content

Commit

Permalink
Rewire likelihood & entropy
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Dec 15, 2023
1 parent 44f8775 commit ae6f784
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions lib/src/MixtureFactory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,10 @@ OT::Mixture MixtureFactory::buildAsMixture(const OT::Sample & sample,
for (OT::UnsignedInteger i = 0; i < sampleSize; ++i) labels[i] = tabLabels[i] - 1;
delete [] tabLabels;

BICLogLikelihood = OT::Point(3);
// old version: BICLogLikelihood[0] = param->getModel()->getLogLikelihood(false);
BICLogLikelihood.resize(3);
BICLogLikelihood[0] = clusteringModelOutput->getLikelihood();
// old version: BICLogLikelihood[1] = param->getModel()->getCompletedLogLikelihood();
// old version: BICLogLikelihood[2] = param->getModel()->getEntropy();
BICLogLikelihood[1] = clusteringModelOutput->getCompletedLikelihood();
BICLogLikelihood[2] = clusteringModelOutput->getEntropy();
return OT::Mixture(coll);
}

Expand Down
8 changes: 4 additions & 4 deletions lib/test/t_MixtureFactory_std.expout
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
nb clusters=1
nb clusters=3
point=class=Point name=Unnamed dimension=2 values=[-1.66667,-1.66667]
reference pdf=0.0345418
reference cdf=0.456312
reference quantile(0.75)=class=Point name=Unnamed dimension=2 values=[2.06331,2.06331]
estimated pdf=0.0314941
estimated cdf=0.412686
estimated quantile(0.75)=class=Point name=Unnamed dimension=2 values=[1.03894,1.10747]
estimated pdf=0.0349052
estimated cdf=0.448466
estimated quantile(0.75)=class=Point name=Unnamed dimension=2 values=[2.03067,2.10481]
done

0 comments on commit ae6f784

Please sign in to comment.