Skip to content

Commit a187c66

Browse files
authored
DOC add example to combine penatly and datafit (#11)
1 parent 382bb52 commit a187c66

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.github/workflows/circleci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: circleci-redirector
2+
on: [status]
3+
jobs:
4+
circleci_artifacts_redirector_job:
5+
runs-on: ubuntu-latest
6+
name: Run CircleCI artifacts redirector
7+
steps:
8+
- name: GitHub Action step
9+
uses: larsoner/circleci-artifacts-redirector-action@master
10+
with:
11+
repo-token: ${{ secrets.GITHUB_TOKEN }}
12+
artifact-path: 0/dev/index.html
13+
circleci-jobs: build_docs

doc/add.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44

55
With skglm, you can solve any custom Generalized Linear Model with arbitrary smooth datafit and arbitrary proximable penalty, by defining two classes: a ``Penalty`` and a ``Datafit``.
66

7+
They can then be passed to a :class:`~skglm.GeneralizedLinearEstimator`, using ``is_classif`` to specify if the task is classification or regression.
8+
9+
10+
.. code-block:: python
11+
12+
clf = GeneralizedLinearEstimator(
13+
MyDatafit(), MyPenalty(), is_classif=True
14+
)
15+
716
817
How to add a custom penalty
918
~~~~~~~~~~~~~~~~~~~~~~~~~~~

doc/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Estimators
1414
.. autosummary::
1515
:toctree: generated/
1616

17+
GeneralizedLinearEstimator
1718
ElasticNet
1819
Lasso
1920
LinearSVC

doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@
331331
}
332332

333333
sphinx_gallery_conf = {
334-
'backreferences_dir': 'gen_modules/backreferences',
334+
# 'backreferences_dir': 'gen_modules/backreferences',
335+
'backreferences_dir': 'generated',
335336
'doc_module': ('skglm', 'sklearn', 'benchopt'),
336337
'examples_dirs': '../examples',
337338
'gallery_dirs': 'auto_examples',

0 commit comments

Comments
 (0)