Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions doc/source/tutorials/constraint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Usage
-----

.. code:: python
# list of

# list of
# name (str): name of the custom linear constraints
# loss_kwargs: more keys and values for constraint parameters
constraint = [{'name': <constraint_name>, <**constraint_kwargs>}, ...]
Expand All @@ -20,7 +20,7 @@ Usage

* - constraint
- | args
- | Example
- | Example

* - **nonnegative**
- | ``name``: 'nonnegative' or '>=0'
Expand All @@ -32,6 +32,11 @@ Usage
| ``tol_sen``: 1d array [p] of tolerance for fairness
- | ``constraint=[{'name': 'fair', 'sen_idx': sen_idx, 'tol_sen': tol_sen}]``

* - **monotonic**
- | ``name``: 'monotonic' or 'monotonicity'
| ``decreasing`` (*bool*): False (default)
- | ``constraint=[{'name': 'monotonic', 'decreasing': True}]``

* - **custom**
- | ``name``: 'custom'
| ``A``: 2d array [K x d] for linear constraint coefficients
Expand Down
9 changes: 5 additions & 4 deletions doc/source/tutorials/loss.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Usage
-----

.. code:: python

# name (str): name of the custom loss function
# loss_kwargs: more keys and values for loss parameters
loss = {'name': <loss_name>, <**loss_kwargs>}
Expand All @@ -24,7 +24,7 @@ Classification loss

* - loss
- | args
- | Example
- | Example

* - **SVM**
- | ``name``: 'hinge' / 'svm' / 'SVM'
Expand All @@ -48,7 +48,7 @@ Regression loss

* - loss
- | args
- | Example
- | Example

* - **Quantile Reg**
- | ``name``: 'check' / 'quantile' / 'QR'
Expand All @@ -57,7 +57,8 @@ Regression loss

* - **Huber**
- | ``name``: 'huber' / 'Huber'
- | ``loss={'name': 'huber'}``
| ``tau`` (*float*): 1.0 (default)
- | ``loss={'name': 'huber', 'tau': 1.0}``

* - **SVR**
- | ``name``: 'SVR' / 'svr'
Expand Down
Loading