Skip to content

V4 - #3

Merged
tmonk merged 6 commits into
masterfrom
v4
Nov 24, 2025
Merged

V4#3
tmonk merged 6 commits into
masterfrom
v4

Conversation

@tmonk

@tmonk tmonk commented Nov 24, 2025

Copy link
Copy Markdown
Owner

Testing improvements:

  • Added new tests to tests/test_model.py to verify that non-binary entries in y_single and y_dual raise ValueError, and that dual choices on the diagonal are properly rejected. This strengthens input validation and ensures correct model behavior. [1] [2]

Simulation and reproducibility enhancements:

  • Updated multe/simulate.py to support explicit random number generator (rng) and data type (dtype) arguments in simulate_data, improving reproducibility and flexibility. Also added type hints and clarified docstrings for better developer experience. [1] [2] [3] [4] [5]

Code formatting and readability:

  • Reformatted print statements and dictionary definitions in examples/basic_example.py, examples/benchmark.py, examples/csv_example.py, and examples/simple_fit_example.py for improved readability and consistency, including multi-line formatting and standardized string quotes. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Documentation and citation:

  • Added a citation section to README.md with BibTeX entry, providing clear instructions for users on how to cite the package in academic work.

Pre-commit configuration:

  • Fixed the new .pre-commit-config.yaml file to enable automated code quality checks and formatting using pre-commit hooks, supporting consistent code style and reducing manual errors.

  - Reuse normalized dual indices across fit/likelihood/gradient/SEs to avoid double sparse conversion; support cached indices in _prepare_data.
  - Accept sparse/index dual inputs with stronger validation (binary, upper triangle) and document sparse flattening order (s*J+t); remove redundant diagonal check.
  - Add predict_proba and per-observation log-likelihood helpers; expose log_likelihood wrapper; extend simulate_data with rng/dtype controls.
  - Expand tests for validation edge cases, sparse equivalence, helpers, and reproducibility.
  - Keep dual gradient comments aligned with the vectorized implementation; all tests pass.

This comment was marked as outdated.

… parameter transformation, introduce a dedicated data validation and index preparation method, and update examples to reflect these changes and the `compute_standard_errors` signature.
…rm_params`, `calculate_utilities`, and `neg_log_likelihood`.
  - Drop compatibility wrappers for transform_params/calculate_utilities/neg_log_likelihood and update examples/tests to use internal APIs with cached indices.
  - Document sparse dual flattening order (s*J+t), keep validation tight, remove redundant diagonal check.
  - Fix lint nits in examples (unused vars, bare except) and keep benchmark timing using internal nll/grad.
  - Refresh README API list to match current public surface; tests now pass with new signatures.
@tmonk
tmonk merged commit efa317c into master Nov 24, 2025
0 of 15 checks passed
@tmonk
tmonk deleted the v4 branch November 25, 2025 01:46
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