Skip to content

Conversation

@arokem
Copy link
Member

@arokem arokem commented Dec 2, 2025

This is Yao's recent accelerated versions.

@arokem arokem requested a review from Copilot December 2, 2025 17:13
Copy link

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 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 p should be calculated from the input coefficients array. The correct value should be p = int((-1 + np.sqrt(1 + 4 * len(coefficients))) / 2) based on the relationship len(coefficients) = p * (p + 1).
    examples/uoi_var_poisson_test.py:1
  • Invalid syntax: uoi_poisson.self.l1_support_count should be uoi_poisson.l1_support_count. The self keyword 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.

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.

3 participants