Skip to content

Commit

Permalink
Move GeneralizedLinearRegressor back to _glm (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbittarello authored Feb 7, 2025
1 parent 4f9db8f commit 4172b67
Show file tree
Hide file tree
Showing 8 changed files with 972 additions and 987 deletions.
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

0 comments on commit 4172b67

Please sign in to comment.