Skip to content

Commit 16cbe7e

Browse files
authored
Update constraint.rst
Corrected the labeling error in the tutorials regarding the constraint being incorrectly marked as loss
1 parent a3ac53f commit 16cbe7e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/source/tutorials/constraint.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Usage
99
.. code:: python
1010
1111
# list of
12-
# name (str): name of the custom loss function
13-
# loss_kwargs: more keys and values for loss parameters
14-
constraint = [{'name': <loss_name>, <**loss_kwargs>}, ...]
12+
# name (str): name of the custom linear constraints
13+
# loss_kwargs: more keys and values for constraint parameters
14+
constraint = [{'name': <constraint_name>, <**constraint_kwargs>}, ...]
1515
1616
.. list-table::
1717
:align: left
@@ -24,19 +24,19 @@ Usage
2424

2525
* - **nonnegative**
2626
- | ``name``: 'nonnegative' or '>=0'
27-
- | ``loss={'name': '>=0'}``
27+
- | ``constraint=[{'name': '>=0'}]``
2828

2929
* - **fair**
3030
- | ``name``: 'fair' or 'fairness'
3131
| ``X_sen``: 2d array [n x p] for sensitive attributes
3232
| ``tol_sen``: 1d array [p] of tolerance for fairness
33-
- | ``loss={'name': 'fair', 'X_sen': X_sen, 'tol_sen': tol_sen}``
33+
- | ``constraint=[{'name': 'fair', 'X_sen': X_sen, 'tol_sen': tol_sen}]``
3434

3535
* - **custom**
3636
- | ``name``: 'custom'
3737
| ``A``: 2d array [K x d] for linear constraint coefficients
3838
| ``b``: 1d array [K] of constraint intercepts
39-
- | ``loss={'name': 'custom', 'A': A, 'b': b}``
39+
- | ``constraint=[{'name': 'custom', 'A': A, 'b': b}]``
4040

4141
Related Examples
4242
----------------

0 commit comments

Comments
 (0)