Skip to content

Commit c3a6827

Browse files
authored
Prepare for releasing 3.1.1 (#900)
* Prepare for release * Lint * Use local version of house data * Copy dataset for CI doctest
1 parent 3e483b9 commit c3a6827

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,7 @@ jobs:
6666
run: |
6767
mkdir ../temp
6868
cp README.md ../temp
69+
mkdir ../temp/data
70+
cp data/housing.parquet ../temp/data
6971
cd ../temp
7072
pixi run --manifest-path ../glum/pixi.toml -e ${{ matrix.environment }} python -m doctest -v README.md

CHANGELOG.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
Changelog
88
=========
99

10-
UNRELEASED
11-
----------
10+
3.1.1 - 2025-01-13
11+
------------------
1212

13-
**Bug fix:
13+
**Bug fix:**
1414

1515
- Fixed a bug where :meth:`~glum.TweedieDistribution._rowwise_gradient_hessian` and :meth:`~glum.TweedieDistribution._eta_mu_deviance` would call functions with wrong arguments in the ``p = 3`` case.
1616
- Fixed :class:`glum.InverseGaussianDistribution` not using the optimized gradient, Hessian and deviance implementations, as well as those derivatives having the wrong sign.
@@ -34,6 +34,7 @@ UNRELEASED
3434
- Fixed a bug where :meth:`glum.GeneralizedLinearRegressor.fit` would raise a ``dtype`` mismatch error if fit with ``alpha_search=True``.
3535
- Use data type (``float64`` or ``float32``) dependent precision in solvers.
3636

37+
3738
3.0.2 - 2024-06-25
3839
------------------
3940

@@ -48,6 +49,7 @@ UNRELEASED
4849
- Removed libblas MKL from the development environment.
4950
- Replaced deprecated 'oldest-supported-numpy' dependency with 'numpy' to support 2.0 release.
5051

52+
5153
3.0.1 - 2024-05-23
5254
------------------
5355

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@ Why did we choose the name `glum`? We wanted a name that had the letters GLM and
3333
# A classic example predicting housing prices
3434

3535
```python
36+
>>> import pandas as pd
3637
>>> from sklearn.datasets import fetch_openml
3738
>>> from glum import GeneralizedLinearRegressor
3839
>>>
3940
>>> # This dataset contains house sale prices for King County, which includes
4041
>>> # Seattle. It includes homes sold between May 2014 and May 2015.
41-
>>> house_data = fetch_openml(name="house_sales", version=3, as_frame=True)
42+
>>> # The full version of this dataset can be found at:
43+
>>> # https://www.openml.org/search?type=data&status=active&id=42092
44+
>>> house_data = pd.read_parquet("data/housing.parquet")
4245
>>>
4346
>>> # Use only select features
44-
>>> X = house_data.data[
47+
>>> X = house_data[
4548
... [
4649
... "bedrooms",
4750
... "bathrooms",
@@ -59,7 +62,7 @@ Why did we choose the name `glum`? We wanted a name that had the letters GLM and
5962
>>>
6063
>>> # Model whether a house had an above or below median price via a Binomial
6164
>>> # distribution. We'll be doing L1-regularized logistic regression.
62-
>>> price = house_data.target
65+
>>> price = house_data["price"]
6366
>>> y = (price < price.median()).values.astype(int)
6467
>>> model = GeneralizedLinearRegressor(
6568
... family='binomial',
@@ -88,7 +91,7 @@ n_iter
8891
... alpha=0.001,
8992
... formula="bedrooms + np.log(bathrooms + 1) + bs(sqft_living, 3) + C(waterfront)"
9093
... )
91-
>>> _ = model_formula.fit(X=house_data.data, y=y)
94+
>>> _ = model_formula.fit(X=house_data, y=y)
9295

9396
```
9497

pixi.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ store-benchmark-golden-master = "python tests/glm/test_benchmark_golden_master.p
1313

1414
[feature.docs.tasks]
1515
make-docs = "cd docs && make html"
16-
serve-docs = { cmd = "python -m http.server --directory docs/_build/html", depends_on = ["make-docs"] }
17-
readthedocs = { cmd = "rm -rf $READTHEDOCS_OUTPUT/html && cp -r docs/_build/html $READTHEDOCS_OUTPUT/html", depends_on = ["make-docs"] }
16+
serve-docs = { cmd = "python -m http.server --directory docs/_build/html", depends-on = ["make-docs"] }
17+
readthedocs = { cmd = "rm -rf $READTHEDOCS_OUTPUT/html && cp -r docs/_build/html $READTHEDOCS_OUTPUT/html", depends-on = ["make-docs"] }
1818

1919
[feature.benchmark.tasks]
2020
glm-benchmarks-run = "glm_benchmarks_run"

0 commit comments

Comments
 (0)