-
Notifications
You must be signed in to change notification settings - Fork 8
Add deprecation and gce integration for Conditional Entropy #48
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
base: v1.0
Are you sure you want to change the base?
Conversation
Following best practices for acknowledging a superior implementation: 1. Updated cuvarbase CE documentation to transparently acknowledge that the gce package (Katz et al. 2020) implements a more efficient algorithm 2. Added detailed explanation in docstrings about the performance difference 3. Created optional wrapper (cuvarbase.ce_gce) for API compatibility 4. Updated README with clear guidance on when to use each implementation Changes: - cuvarbase/ce.py: Added comprehensive warning and performance notes to ConditionalEntropyAsyncProcess docstring - cuvarbase/ce_gce.py: NEW - Optional wrapper for gce with full attribution - README.md: Added "Conditional Entropy Note" section explaining the situation - cuvarbase/tests/test_ce_gce.py: Tests for gce wrapper (run when gce available) Key points: - No plagiarism: wrapper requires gce to be installed separately - Full attribution: All credit given to Katz et al. 2020 in docs and code - Backward compatibility: cuvarbase CE remains available for legacy workflows - User benefit: Clear guidance helps users choose the best tool References: Katz, M. L., Larson, S. L., Cohn, J., Vallisneri, M., & Graff, P. B. (2020). arXiv:2006.06866 https://github.com/mikekatz04/gce 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds professional deprecation warnings and integration support for the gce package's Conditional Entropy implementation. The changes acknowledge that gce (Katz et al. 2020) provides a more efficient algorithm while maintaining backward compatibility with cuvarbase's existing CE implementation.
Key Changes:
- Added comprehensive documentation explaining performance differences between implementations
- Created optional wrapper module for gce with full attribution
- Updated cuvarbase CE docstrings with warnings about efficiency limitations
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cuvarbase/ce.py | Added warning and detailed performance notes to ConditionalEntropyAsyncProcess docstring |
| cuvarbase/ce_gce.py | New optional wrapper providing cuvarbase-compatible API for gce package |
| cuvarbase/tests/test_ce_gce.py | Comprehensive test suite for gce wrapper (conditional on gce availability) |
| README.md | Added "Conditional Entropy Note" section with usage guidance and performance comparison |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if fdots is not None: | ||
| # Convert fdot to pdot: pdot = -fdot / f^2 | ||
| pdots = -fdots / (freqs[:, None] ** 2) | ||
| pdots = pdots[0, :] # Extract 1D pdot array |
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pdot calculation on line 181 creates a 2D array by broadcasting freqs, but line 182 only extracts the first row. This appears incorrect as it will only use pdot values calculated with the first frequency. The pdot conversion should likely use a single representative frequency or be computed differently for the gce API.
| pdots = pdots[0, :] # Extract 1D pdot array |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Following best practices for acknowledging a superior implementation:
Changes:
Key points:
References:
Katz, M. L., Larson, S. L., Cohn, J., Vallisneri, M., & Graff, P. B. (2020). arXiv:2006.06866
https://github.com/mikekatz04/gce
🤖 Generated with Claude Code