Skip to content

Comments

Add tests#37

Merged
jonathan-taylor merged 17 commits intomainfrom
add_tests
Feb 3, 2026
Merged

Add tests#37
jonathan-taylor merged 17 commits intomainfrom
add_tests

Conversation

@jonathan-taylor
Copy link
Collaborator

Title: build: Switch to setuptools_scm, add tests, and update docs

Description:

This PR includes several updates to the build system, testing, and documentation.

  • Build:

    • The versioning has been switched from versioneer to setuptools_scm. This removes the vendored _version.py file and simplifies the packaging configuration in pyproject.toml.
  • Fixes:

    • The _calc_score function in ISLP/models/generic_selector.py has been updated to use the params argument instead of fit_params to align with the latest scikit-learn API.
    • In ISLP/survival.py, .x.item() is now used to extract the scalar value from the root finding result.
  • Testing:

    • New tests have been added for the cluster, pygam, and svm modules to improve code coverage and ensure correctness.
  • Documentation:

    • The installation guide in docs/source/installation.myst has been updated to include instructions for using uv as an alternative to conda for environment management.
    • The ISLP_labs submodule has been updated to the latest commit.

Adds the `__sklearn_tags__` method to the `sklearn_sm` and `sklearn_selected` wrappers. This allows scikit-learn to correctly identify the estimator type (regressor or classifier) based on the statsmodels model.

This change enables the use of scikit-learn's cross-validation and model selection tools with these wrappers.

Tests have been added to verify that OLS and GLM Binomial models are correctly identified.
@jonathan-taylor jonathan-taylor mentioned this pull request Feb 3, 2026
@jonathan-taylor jonathan-taylor merged commit bf1816e into main Feb 3, 2026
3 checks passed
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.

1 participant