Skip to content

Fix PG-means#112

Merged
collinleiber merged 2 commits into
collinleiber:mainfrom
anripa:fix_pg_means
Jun 2, 2026
Merged

Fix PG-means#112
collinleiber merged 2 commits into
collinleiber:mainfrom
anripa:fix_pg_means

Conversation

@anripa

@anripa anripa commented May 28, 2026

Copy link
Copy Markdown
Contributor

These changes are made to fix the logic or to improve it:

  • select the largest log likelihood model when updating (instead of lowest)
  • use log likelihood for comparing models instead of the lower bound (following the original paper)
  • improve new center proposal by picking the lowest log likelihood points (the likelihood is better function to test the goodness of fit than min max probability)
  • fix possible bias in random projections by using randn instead of rand
  • scale critical value if downsampling data

- select the largest log likelihood model when updating (instead of lowest)
- use log likelihood for comparing models instead of the lower bound
- improve new center proposal by picking the lowest log likelihood points
- fix possible bias in random projections by using randn instead of rand
- scale critical value if downsampling data
Comment thread clustpy/partition/pgmeans.py Outdated
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.85%. Comparing base (4a36821) to head (90e8d67).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
+ Coverage   92.80%   92.85%   +0.04%     
==========================================
  Files          63       63              
  Lines        9135     9232      +97     
==========================================
+ Hits         8478     8572      +94     
- Misses        657      660       +3     
Files with missing lines Coverage Δ
clustpy/partition/pgmeans.py 100.00% <100.00%> (ø)

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@collinleiber collinleiber self-assigned this Jun 2, 2026
@collinleiber collinleiber self-requested a review June 2, 2026 07:28
@collinleiber collinleiber merged commit ec7145c into collinleiber:main Jun 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants