Skip to content

Commit 24de61a

Browse files
Merge branch 'main' of https://github.com/scikit-learn-contrib/skglm into documentation-update
2 parents 4bb7258 + 5efeb8f commit 24de61a

31 files changed

+212
-146
lines changed

.circleci/config.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build_docs:
44
docker:
5-
- image: circleci/python:3.8.1-buster
5+
- image: cimg/python:3.10
66
steps:
77
- checkout
88
- run:
@@ -32,6 +32,13 @@ jobs:
3232
keys:
3333
- pip-cache
3434

35+
# Install Xvfb and related dependencies
36+
- run:
37+
name: Install Xvfb and dependencies
38+
command: |
39+
sudo apt-get update
40+
sudo apt-get install -y xvfb
41+
3542
- run:
3643
name: Spin up Xvfb
3744
command: |

.github/workflows/flake8.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
- name: Check doc style with pydocstyle
3131
run: |
3232
pip install pydocstyle
33-
pydocstyle skglm --ignore='D100',D102,'D104','D107','D203','D213','D413'
33+
pydocstyle skglm --ignore='D100',D102,'D104','D105','D107','D203','D213','D413',

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ jobs:
2525
- name: Install other dependencies
2626
run: |
2727
conda install rpy2 -c conda-forge
28-
pip install celer
2928
pip install statsmodels cvxopt
30-
pip install git+https://github.com/jolars/sortedl1.git
29+
pip install sortedl1
3130
# for testing Cox estimator
3231
pip install lifelines
3332
pip install pandas

doc/changes/0.4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _changes_0_4:
22

3-
Version 0.4 (in progress)
3+
Version 0.4 (2023/04/08)
44
-------------------------
55
- Add :ref:`GroupLasso Estimator <skglm.GroupLasso>` (PR: :gh:`228`)
66
- Add support and tutorial for positive coefficients to :ref:`Group Lasso Penalty <skglm.penalties.WeightedGroupL2>` (PR: :gh:`221`)

doc/changes/0.5.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.. _changes_0_5:
2+
3+
Version 0.5 (in progress)
4+
-------------------------

doc/changes/whats_new.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ What's new
55

66
.. currentmodule:: skglm
77

8+
.. include:: 0.5.rst
9+
810
.. include:: 0.4.rst
911

1012
.. include:: 0.3.rst

examples/plot_sparse_recovery.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from skglm.utils.data import make_correlated_data
1919
from skglm.solvers import AndersonCD
2020
from skglm.datafits import Quadratic
21-
from skglm.utils.jit_compilation import compiled_clone
2221
from skglm.penalties import L1, MCPenalty, L0_5, L2_3, SCAD
2322

2423
cmap = plt.get_cmap('tab10')
@@ -74,7 +73,7 @@
7473
for idx, estimator in enumerate(penalties.keys()):
7574
print(f'Running {estimator}...')
7675
estimator_path = solver.path(
77-
X, y, compiled_clone(datafit), compiled_clone(penalties[estimator]),
76+
X, y, datafit, penalties[estimator],
7877
alphas=alphas)
7978

8079
f1_temp = np.zeros(n_alphas)

examples/plot_survival_analysis.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# Let's first generate synthetic data on which to run the Cox estimator,
1616
# using ``skglm`` data utils.
1717
#
18+
1819
from skglm.utils.data import make_dummy_survival_data
1920

2021
n_samples, n_features = 500, 100
@@ -59,18 +60,16 @@
5960
# Todo so, we need to combine a Cox datafit and a :math:`\ell_1` penalty
6061
# and solve the resulting problem using skglm Proximal Newton solver ``ProxNewton``.
6162
# We set the intensity of the :math:`\ell_1` regularization to ``alpha=1e-2``.
62-
from skglm.datafits import Cox
6363
from skglm.penalties import L1
64+
from skglm.datafits import Cox
6465
from skglm.solvers import ProxNewton
6566

66-
from skglm.utils.jit_compilation import compiled_clone
67-
6867
# regularization intensity
6968
alpha = 1e-2
7069

7170
# skglm internals: init datafit and penalty
72-
datafit = compiled_clone(Cox())
73-
penalty = compiled_clone(L1(alpha))
71+
datafit = Cox()
72+
penalty = L1(alpha)
7473

7574
datafit.initialize(X, y)
7675

@@ -230,7 +229,7 @@
230229
# We only need to pass in ``use_efron=True`` to the ``Cox`` datafit.
231230

232231
# ensure using Efron estimate
233-
datafit = compiled_clone(Cox(use_efron=True))
232+
datafit = Cox(use_efron=True)
234233
datafit.initialize(X, y)
235234

236235
# solve the problem

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ dependencies = [
2222
]
2323
dynamic = ["version"]
2424

25+
requires-python = ">=3.9"
26+
27+
classifiers = [
28+
"Programming Language :: Python :: 3 :: Only",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: 3.13",
34+
]
2535

2636
[tool.setuptools.dynamic]
2737
version = {attr = "skglm.__version__"}
@@ -38,6 +48,7 @@ test = [
3848
"flake8",
3949
"coverage",
4050
"numpydoc",
51+
"celer",
4152
]
4253

4354
doc = [
@@ -56,3 +67,7 @@ doc = [
5667
"lifelines",
5768
"pydata_sphinx_theme",
5869
]
70+
71+
72+
[tool.setuptools]
73+
license-files = []

skglm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.4dev'
1+
__version__ = '0.5dev'
22

33
from skglm.estimators import ( # noqa F401
44
Lasso, WeightedLasso, ElasticNet, MCPRegression, MultiTaskLasso, LinearSVC,

0 commit comments

Comments
 (0)