Skip to content
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

Move GeneralizedLinearRegressor back to _glm #909

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/glum/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
PoissonDistribution,
TweedieDistribution,
)
from ._glm import get_family, get_link
from ._glm import GeneralizedLinearRegressor, get_family, get_link
from ._glm_cv import GeneralizedLinearRegressorCV
from ._glm_regressor import GeneralizedLinearRegressor
from ._link import CloglogLink, IdentityLink, Link, LogitLink, LogLink, TweedieLink

try:
Expand Down
967 changes: 966 additions & 1 deletion src/glum/_glm.py

Large diffs are not rendered by default.

978 changes: 0 additions & 978 deletions src/glum/_glm_regressor.py

This file was deleted.

3 changes: 1 addition & 2 deletions tests/glm/test_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
PoissonDistribution,
TweedieDistribution,
)
from glum._glm import get_family
from glum._glm_regressor import GeneralizedLinearRegressor
from glum._glm import GeneralizedLinearRegressor, get_family
from glum._linalg import _safe_sandwich_dot
from glum._link import IdentityLink, LogitLink, LogLink, TweedieLink

Expand Down
2 changes: 1 addition & 1 deletion tests/glm/test_formula.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import statsmodels.formula.api as smf

from glum._formula import parse_formula
from glum._glm_regressor import GeneralizedLinearRegressor
from glum._glm import GeneralizedLinearRegressor


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/glm/test_glm_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
NormalDistribution,
PoissonDistribution,
)
from glum._glm import GeneralizedLinearRegressor
from glum._glm_cv import GeneralizedLinearRegressorCV
from glum._glm_regressor import GeneralizedLinearRegressor
from glum._linalg import is_pos_semidef
from glum._link import IdentityLink, LogitLink, LogLink

Expand Down
2 changes: 1 addition & 1 deletion tests/glm/test_glm_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
PoissonDistribution,
TweedieDistribution,
)
from glum._glm import GeneralizedLinearRegressor
from glum._glm_cv import GeneralizedLinearRegressorCV
from glum._glm_regressor import GeneralizedLinearRegressor
from glum._link import LogitLink, LogLink
from glum._utils import unstandardize

Expand Down
2 changes: 1 addition & 1 deletion tests/glm/test_golden_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from scipy import sparse

from glum._distribution import TweedieDistribution
from glum._glm import GeneralizedLinearRegressor
from glum._glm_cv import GeneralizedLinearRegressorCV
from glum._glm_regressor import GeneralizedLinearRegressor
from glum_benchmarks.data import simulate_glm_data

distributions_to_test = ["normal", "poisson", "gamma", "tweedie_p=1.5", "binomial"]
Expand Down
Loading