Skip to content

Conversation

@johnh2o2
Copy link
Owner

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

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>
@johnh2o2 johnh2o2 requested a review from Copilot October 25, 2025 20:04
Copy link
Contributor

Copilot AI left a 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
Copy link

Copilot AI Oct 25, 2025

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.

Suggested change
pdots = pdots[0, :] # Extract 1D pdot array

Copilot uses AI. Check for mistakes.
@johnh2o2 johnh2o2 changed the title Add professional deprecation and gce integration for Conditional Entropy Add deprecation and gce integration for Conditional Entropy Oct 25, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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