Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces Yao's accelerated versions for UoI-VAR (Union of Intersections for Vector Autoregressive models), implementing significant enhancements to support VAR model fitting with Poisson GLM and ADMM-based distributed optimization.
Key Changes:
- Replaced mean-based log-likelihood calculation with sum-based calculation for consistency with Poisson loss function in VAR case
- Added FDR (False Discovery Rate) based edge selection method as an alternative to frequency-based intersection
- Implemented ADMM (Alternating Direction Method of Multipliers) MPI solver for distributed Lasso and Poisson regression
- Added comprehensive VAR model support including vectorization utilities and parameter packing/unpacking functions
Reviewed changes
Copilot reviewed 98 out of 100 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/pyuoi/utils.py | Modified log-likelihood calculation to use sum instead of mean for VAR consistency |
| src/pyuoi/mpi_utils.py | Added explicit int64 casting for array sizes and displacements in MPI operations |
| src/pyuoi/linear_model/utils.py | Added magnitude thresholding, FDR-based intersection, and VAR parameter utilities |
| src/pyuoi/linear_model/sparse_comm_util.py | New utility for sparse matrix MPI communication |
| src/pyuoi/linear_model/poisson.py | Major refactor: added ADMM support, feature weights, time step parameter, and vectorized coefficient handling |
| src/pyuoi/linear_model/logistic.py | Replaced deprecated log_logistic with stable_log_logistic implementation |
| src/pyuoi/linear_model/lasso.py | Added ADMM solver support and timing instrumentation |
| src/pyuoi/linear_model/base.py | Major refactor: added VAR model support, vectorization functions, and FDR-based selection |
| src/pyuoi/linear_model/admm_mpi_poisson.py | New ADMM solver implementation for Poisson regression with MPI support |
| src/pyuoi/linear_model/admm_mpi_dale.py | New ADMM solver for Dale's principle constrained models |
| src/pyuoi/linear_model/admm_mpi.py | New ADMM solver for standard Lasso with MPI support |
| src/pyuoi/lbfgs/_lowlevel.pyx | Replaced deprecated np.product with np.prod |
| examples/* | New example scripts and utilities for VAR model simulation and evaluation |
| causal_net/* | New causal network analysis tools and visualization utilities |
Comments suppressed due to low confidence (6)
src/pyuoi/linear_model/poisson.py:1
- Hardcoded value of 20 for
pshould be calculated from the inputcoefficientsarray. The correct value should bep = int((-1 + np.sqrt(1 + 4 * len(coefficients))) / 2)based on the relationshiplen(coefficients) = p * (p + 1).
examples/uoi_var_poisson_test.py:1 - Invalid syntax:
uoi_poisson.self.l1_support_countshould beuoi_poisson.l1_support_count. Theselfkeyword is unnecessary and causes an attribute error.
src/pyuoi/linear_model/utils.py:1 - Documentation states default is 0.05, but the function signature shows
min_w=0.01. Update documentation to match the actual default value of 0.01.
examples/var_utils.py:1 - Malformed header decoration contains 'r[i]' which appears to be a typo. Should be a consistent line of '=' characters.
src/pyuoi/linear_model/poisson.py:1 - Corrected extraneous 'f' in docstring comment.
src/pyuoi/linear_model/lasso.py:1 - Corrected spelling of 'default' in docstring.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is Yao's recent accelerated versions.