mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-01-10 17:19:34 +01:00
Remove user warning from plotting function
This commit is contained in:
parent
281c4dcb8a
commit
441ccb3382
@ -156,5 +156,5 @@ def get_binned_sample(matches: List[MatchEvaluation], n_examples: int = 5):
|
|||||||
|
|
||||||
bins = pd.qcut(pred_scores, q=n_examples, labels=False, duplicates="drop")
|
bins = pd.qcut(pred_scores, q=n_examples, labels=False, duplicates="drop")
|
||||||
df = pd.DataFrame({"indices": indices, "bins": bins})
|
df = pd.DataFrame({"indices": indices, "bins": bins})
|
||||||
sample = df.groupby("bins").apply(lambda x: x.sample(1))
|
sample = df.groupby("bins").sample(1)
|
||||||
return [matches[ind] for ind in sample["indices"]]
|
return [matches[ind] for ind in sample["indices"]]
|
||||||
|
|||||||
@ -39,7 +39,6 @@ def map_detection_to_clip(
|
|||||||
) -> Detections:
|
) -> Detections:
|
||||||
duration = end_time - start_time
|
duration = end_time - start_time
|
||||||
bandwidth = max_freq - min_freq
|
bandwidth = max_freq - min_freq
|
||||||
print(f"{bandwidth=} {min_freq=} {detections.frequencies=}")
|
|
||||||
return Detections(
|
return Detections(
|
||||||
scores=detections.scores,
|
scores=detections.scores,
|
||||||
sizes=detections.sizes,
|
sizes=detections.sizes,
|
||||||
|
|||||||
@ -192,8 +192,6 @@ def test_compute_max_power_bb(max_power: int):
|
|||||||
"high_freq": high_freq,
|
"high_freq": high_freq,
|
||||||
}
|
}
|
||||||
|
|
||||||
print(prediction)
|
|
||||||
|
|
||||||
max_power_bb = feats.compute_max_power_bb(
|
max_power_bb = feats.compute_max_power_bb(
|
||||||
prediction,
|
prediction,
|
||||||
spec,
|
spec,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user