Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
musicinformationretrieval-com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
A.S.
musicinformationretrieval-com
Commits
d50b58ce
Commit
d50b58ce
authored
Aug 17, 2016
by
Steve Tjoa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more knn; stanford_mir.get_features
parent
476892c0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12881 additions
and
614 deletions
+12881
-614
knn.html
knn.html
+12548
-586
knn.ipynb
knn.ipynb
+328
-25
core.py
stanford_mir/core.py
+5
-3
No files found.
knn.html
View file @
d50b58ce
This diff is collapsed.
Click to expand it.
knn.ipynb
View file @
d50b58ce
This diff is collapsed.
Click to expand it.
stanford_mir/core.py
View file @
d50b58ce
...
...
@@ -17,9 +17,11 @@ def extract_features(signal, features):
def
get_features
(
collection
=
'drum_samples_train'
,
features
=
(
'zero_crossing_rate'
,
'spectral_centroid'
),
scaler
=
None
):
scaler
=
None
,
download
=
True
):
if
collection
==
'drum_samples_train'
:
kick_filepaths
,
snare_filepaths
=
download_samples
(
'drum_samples_train'
)
kick_filepaths
,
snare_filepaths
=
download_samples
(
'drum_samples_train'
,
download
=
download
)
kick_signals
=
[
librosa
.
load
(
p
)[
0
]
for
p
in
kick_filepaths
]
...
...
@@ -42,7 +44,7 @@ def get_features(collection='drum_samples_train',
return
training_features
,
training_labels
,
scaler
elif
collection
==
'drum_samples_test'
:
kick_filepaths
,
snare_filepaths
=
download_samples
(
'drum_samples_test'
)
kick_filepaths
,
snare_filepaths
=
download_samples
(
'drum_samples_test'
,
download
=
download
)
kick_signals
=
[
librosa
.
load
(
p
)[
0
]
for
p
in
kick_filepaths
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment