Skip to content

Commit 0de43d1

Browse files
authored
Fix docs metrics formatting (#5077)
* fix functional f1 fbeta formatting * Update f_beta.py * remove line breaks * Update f_beta.py add line breaks and pad * pad linea breaks with 2 spaces instead of tab
1 parent d38e4d1 commit 0de43d1

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

pytorch_lightning/metrics/classification/f_beta.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ class FBeta(Metric):
5252
Threshold value for binary or multi-label logits. default: 0.5
5353
5454
average:
55-
* `'micro'` computes metric globally
56-
* `'macro'` computes metric for each class and uniformly averages them
57-
* `'weighted'` computes metric for each class and does a weighted-average,
58-
where each class is weighted by their support (accounts for class imbalance)
59-
* `None` computes and returns the metric per class
55+
- ``'micro'`` computes metric globally
56+
- ``'macro'`` computes metric for each class and uniformly averages them
57+
- ``'weighted'`` computes metric for each class and does a weighted-average,
58+
where each class is weighted by their support (accounts for class imbalance)
59+
- ``'none'`` computes and returns the metric per class
6060
6161
multilabel: If predictions are from multilabel classification.
6262
compute_on_step:
@@ -185,11 +185,11 @@ class F1(FBeta):
185185
Threshold value for binary or multi-label logits. default: 0.5
186186
187187
average:
188-
* `'micro'` computes metric globally
189-
* `'macro'` computes metric for each class and uniformly averages them
190-
* `'weighted'` computes metric for each class and does a weighted-average,
191-
where each class is weighted by their support (accounts for class imbalance)
192-
* `None` computes and returns the metric per class
188+
- ``'micro'`` computes metric globally
189+
- ``'macro'`` computes metric for each class and uniformly averages them
190+
- ``'weighted'`` computes metric for each class and does a weighted-average,
191+
where each class is weighted by their support (accounts for class imbalance)
192+
- ``'none'`` computes and returns the metric per class
193193
194194
multilabel: If predictions are from multilabel classification.
195195
compute_on_step:

pytorch_lightning/metrics/functional/f_beta.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ def fbeta(
8383
Threshold value for binary or multi-label logits. default: 0.5
8484
8585
average:
86-
* `'micro'` computes metric globally
87-
* `'macro'` computes metric for each class and uniformly averages them
88-
* `'weighted'` computes metric for each class and does a weighted-average,
89-
where each class is weighted by their support (accounts for class imbalance)
90-
* `None` computes and returns the metric per class
86+
- ``'micro'`` computes metric globally
87+
- ``'macro'`` computes metric for each class and uniformly averages them
88+
- ``'weighted'`` computes metric for each class and does a weighted-average,
89+
where each class is weighted by their support (accounts for class imbalance)
90+
- ``'none'`` computes and returns the metric per class
9191
9292
multilabel: If predictions are from multilabel classification.
9393
@@ -136,11 +136,11 @@ def f1(
136136
Threshold value for binary or multi-label logits. default: 0.5
137137
138138
average:
139-
* `'micro'` computes metric globally
140-
* `'macro'` computes metric for each class and uniformly averages them
141-
* `'weighted'` computes metric for each class and does a weighted-average,
142-
where each class is weighted by their support (accounts for class imbalance)
143-
* `None` computes and returns the metric per class
139+
- ``'micro'`` computes metric globally
140+
- ``'macro'`` computes metric for each class and uniformly averages them
141+
- ``'weighted'`` computes metric for each class and does a weighted-average,
142+
where each class is weighted by their support (accounts for class imbalance)
143+
- ``'none'`` computes and returns the metric per class
144144
145145
multilabel: If predictions are from multilabel classification.
146146

0 commit comments

Comments
 (0)