-
Notifications
You must be signed in to change notification settings - Fork 1
UoI Var #2
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: main
Are you sure you want to change the base?
UoI Var #2
Conversation
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 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 is Yao's recent accelerated versions.