Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Fix/update label_smoothing description #733

Merged
merged 1 commit into from
Aug 4, 2022
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
9 changes: 4 additions & 5 deletions website/docs/api-loss.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ are expected to be in the range of `[0, 1]`. They can both represent exclusive
classes from multi-class cross-entropy (generally coming from a `softmax` layer)
or could be classwise binary decisions for multi-label cross-entropy (`sigmoid`
layer). The `truths` are most commonly provided as labels in `Ints1d`,
`List[int]` or `List[str]` format.
Alternatively, users can provide `truths` as a `Floats2d` for
example to encode label-confidences.
`List[int]` or `List[str]` format. Alternatively, users can provide `truths` as
a `Floats2d` for example to encode label-confidences.

<grid>

Expand All @@ -98,7 +97,7 @@ normalize = true
| `normalize` | <tt>bool</tt> | Normalize and divide by number of examples given. |
| `neg_prefix` | <tt>str</tt> | Prefix used to indicate that a label is negative e.g. "!sci-fi". |
| `missing_value` | <tt>Union[str, int]</tt> | Specific label that indicates the value is missing and should not be considered for training/evaluation purposes, e.g. empty string `""` or `0`. |
| `label_smoothing` | <tt>float</tt> | Smoothing-coefficient for label-smoothing in range of [0, 0.5[. |
| `label_smoothing` | <tt>float</tt> | Smoothing-coefficient for label-smoothing. |

### SequenceCategoricalCrossentropy {#sequence_categorical_crossentropy tag="class"}

Expand Down Expand Up @@ -138,7 +137,7 @@ normalize = true
| `normalize` | <tt>bool</tt> | Normalize and divide by number of examples given. |
| `neg_prefix` | <tt>str</tt> | Symbol that indicates that a label is negative e.g. "!sci-fi". |
| `missing_value` | <tt>Union[str, int]</tt> | Symbol for "missing value" among the labels. |
| `label_smoothing` | <tt>float</tt> | Smoothing-coefficient for label-smoothing in range of [0, 0.5]. |
| `label_smoothing` | <tt>float</tt> | Smoothing-coefficient for label-smoothing. |

### L2Distance {#l2distance tag="class"}

Expand Down
12 changes: 7 additions & 5 deletions website/docs/api-util.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,13 @@ element).
Converts a class vector (integers) to binary class matrix. Based on
[`keras.utils.to_categorical`](https://keras.io/utils/).

| Argument | Type | Description |
| ----------- | ---------------------- | ---------------------------------------------------------------------------------------------- |
| `Y` | <tt>IntsXd</tt> | Class vector to be converted into a matrix (integers from `0` to `n_classes`). |
| `n_classes` | <tt>Optional[int]</tt> | Total number of classes. |
| **RETURNS** |  <tt>Floats2d</tt> | A binary matrix representation of the input. The axis representing the classes is placed last. |
| Argument | Type | Description |
| ----------------- | ---------------------- | ---------------------------------------------------------------------------------------------- |
| `Y` | <tt>IntsXd</tt> | Class vector to be converted into a matrix (integers from `0` to `n_classes`). |
| `n_classes` | <tt>Optional[int]</tt> | Total number of classes. |
| _keyword-only_ | | |
| `label_smoothing` | <tt>float</tt> | Smoothing-coefficient for label-smoothing. |
| **RETURNS** | <tt>Floats2d</tt> | A binary matrix representation of the input. The axis representing the classes is placed last. |

### xp2torch {#xp2torch tag="function"}

Expand Down