Skip to content

Commit

Permalink
update exampls in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
statmlben committed Aug 22, 2024
1 parent 831938f commit bf71128
Show file tree
Hide file tree
Showing 7 changed files with 246 additions and 20 deletions.
10 changes: 6 additions & 4 deletions .ipynb_checkpoints/SVM-checkpoint.ipynb

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions doc/source/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Example Gallery
:caption: A few links
:name: rst-link-gallery

examples/ReHLine_QR
examples/ReHLine_SVM_FairSVM
examples/QR.ipynb
examples/SVM.ipynb
examples/FairSVM.ipynb

List of Examples
----------------

.. toctree::
:maxdepth: 0

examples/ReHLine_QR.ipynb
examples/ReHLine_SVM_FairSVM.ipynb

:maxdepth: 1

examples/QR.ipynb
examples/SVM.ipynb
examples/FairSVM.ipynb
224 changes: 224 additions & 0 deletions doc/source/examples/.ipynb_checkpoints/FairSVM-checkpoint.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/source/examples/FairSVM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"* $\\mathbf{\\rho} \\in \\mathbb{R}_+^{d_0}$ is a vector of constants that trade-off predictive accuracy and fairness\n",
"\n",
"The constraints limit the correlation between the sensitive features and the decision function, ensuring fairness in the predictions.\n",
"\n",
"> **Note.** Since the hinge loss is a plq function, and fairness constraints are linear, thus we can solve it by `rehline.plqERM_Ridge`."
]
},
Expand Down
10 changes: 6 additions & 4 deletions doc/source/examples/SVM.ipynb

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
- Paper: `NeurIPS | 2023 <https://openreview.net/pdf?id=3pEBW2UPAD>`_
.. - Open Source: `MIT license <https://opensource.org/licenses/MIT>`_
`ReHLine` is designed to be a computationally efficient
and practically useful software package for large-scale regularized ERMs.

The proposed **ReHLine** solver has appealing exhibits appealing properties:

.. list-table::
Expand Down Expand Up @@ -78,6 +75,5 @@ If you use this code please star 🌟 the repository and cite the following pape
:maxdepth: 2
:hidden:

tutorials
example
benchmark
3 changes: 2 additions & 1 deletion rehline/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Import from internal C++ module
from ._base import ReHLine_solver, _BaseReHLine, _make_loss_rehline_param
from ._base import (ReHLine_solver, _BaseReHLine,
_make_constraint_rehline_param, _make_loss_rehline_param)
from ._class import ReHLine, plqERM_Ridge
from ._data import make_fair_classification
from ._internal import rehline_internal, rehline_result
Expand Down

0 comments on commit bf71128

Please sign in to comment.