Skip to content

Commit a53d6a2

Browse files
fix minor typo (#147)
* fix typo * Update lodestar.py * Update lodestar.py --------- Co-authored-by: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com>
1 parent c01f17b commit a53d6a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

deeplay/applications/detection/lodestar/lodestar.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def detect(self, x, alpha=0.5, beta=0.5, cutoff=0.97, mode="quantile"):
180180
Threshold for detection
181181
mode: string
182182
Mode for thresholding. Can be either "quantile" or "ratio" or "constant". If "quantile", then
183-
`ratio` defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max
184-
score as threshhold. If constant, the cutoff is used directly as treshhold.
183+
"cutoff" defines the quantile of scores to accept. If "ratio", then "cutoff" defines the ratio of the max
184+
score as threshhold. If "constant", the "cutoff" is used directly as treshhold.
185185
"""
186186
y = self(x.to(self.device))
187187
y_pred, weights = y[:, :-1], y[:, -1:]
@@ -228,8 +228,8 @@ def detect_single(
228228
Threshold for detection
229229
mode: string
230230
Mode for thresholding. Can be either "quantile" or "ratio" or "constant". If "quantile", then
231-
`ratio` defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max
232-
score as threshhold. If constant, the cutoff is used directly as treshhold.
231+
"cutoff" defines the quantile of scores to accept. If "ratio", then "cutoff" defines the ratio of the max
232+
score as threshhold. If "constant", the "cutoff" is used directly as treshhold.
233233
"""
234234
score = self.get_detection_score(y_pred, weights, alpha, beta)
235235
return self.find_local_maxima(y_pred, score, cutoff, mode)
@@ -244,8 +244,8 @@ def find_local_maxima(pred, score, cutoff=0.9, mode="quantile"):
244244
Output from model, score-map
245245
cutoff, mode: float, string
246246
Treshholding parameters. Mode can be either "quantile" or "ratio" or "constant". If "quantile", then
247-
`ratio` defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max
248-
score as threshhold. If constant, the cutoff is used directly as treshhold.
247+
"cutoff" defines the quantile of scores to accept. If "ratio", then "cutoff" defines the ratio of the max
248+
score as threshhold. If "constant", the "cutoff" is used directly as treshhold.
249249
250250
"""
251251
score = score[3:-3, 3:-3]

0 commit comments

Comments
 (0)