Skip to content

Commit

Permalink
bumpy min numpy version, redoing transscription velocity fixture 2
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Mar 22, 2024
1 parent 6589a98 commit 037d890
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/environment-minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- defaults
dependencies:
- pip
- numpy ==1.7.0
- numpy ==1.14.0
- scipy ==1.0.0
- matplotlib==2.1.0
- pytest
Expand Down
2 changes: 1 addition & 1 deletion .github/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- defaults
dependencies:
- pip
- numpy >=1.7.0
- numpy >=1.14.0
- scipy >=1.0.0
- matplotlib>=2.1.0
- pytest
Expand Down
1 change: 1 addition & 0 deletions mir_eval/transcription_velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def match_notes(
slope, intercept = np.linalg.lstsq(
np.vstack([est_matched_velocities, np.ones(len(est_matched_velocities))]).T,
ref_matched_velocities,
rcond=None
)[0]
# Re-scale est velocities to match ref
est_matched_velocities = slope * est_matched_velocities + intercept
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ classifiers =
packages = find:
keywords = audio music mir dsp
install_requires =
numpy >= 1.7.0
numpy >= 1.14.0
scipy >= 1.0.0

[options.extras_require]
Expand Down
2 changes: 1 addition & 1 deletion tests/data/transcription_velocity/output2.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Precision": 0.1761055081458495, "Recall": 0.15655172413793103, "F-measure": 0.16575392479006937, "Average_Overlap_Ratio": 0.6339212298653343, "Precision_no_offset": 0.5865011636927852, "Recall_no_offset": 0.5213793103448275, "F-measure_no_offset": 0.552026286966046, "Average_Overlap_Ratio_no_offset": 0.4720752936805029}
{"Precision": 0.17532971295577968, "Recall": 0.15586206896551724, "F-measure": 0.16502373128879153, "Average_Overlap_Ratio": 0.6346439422322657, "Precision_no_offset": 0.5865011636927852, "Recall_no_offset": 0.5213793103448275, "F-measure_no_offset": 0.552026286966046, "Average_Overlap_Ratio_no_offset": 0.4720752936805029}
2 changes: 2 additions & 0 deletions tests/test_transcription_velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def test_precision_recall_f1_overlap():
assert np.allclose((p, r, f, o), (1.0, 1.0, 1.0, 1.0))


# Suppressing this warning. We know the notes are empty, that's not the point.
@pytest.mark.filterwarnings("ignore:.*notes are empty")
def test_precision_recall_f1_overlap_empty():
good_i, good_p, good_v = np.array([[0, 1]]), np.array([100]), np.array([1])
bad_i, bad_p, bad_v = np.empty((0, 2)), np.array([]), np.array([])
Expand Down

0 comments on commit 037d890

Please sign in to comment.