Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewire likelihood & entropy #17

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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