Commit d41ffadf authored by Steve Tjoa's avatar Steve Tjoa

removing knn

parent b92db02c
......@@ -11918,8 +11918,6 @@ div#notebook {
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<ol>
<li><a href="knn.html">K-Nearest Neighbor Classification</a> (<a href="knn.ipynb">ipynb</a>)</li>
<li><a href="knn_instrument_classification.html">Exercise: K-Nearest Neighbor Instrument Classification</a> (<a href="knn_instrument_classification.ipynb">ipynb</a>)</li>
<li><a href="kmeans.html">K-Means Clustering</a> (<a href="kmeans.ipynb">ipynb</a>)</li>
<li><a href="kmeans_instrument_classification.html">Exercise: Unsupervised Instrument Classification using K-Means</a> (<a href="kmeans_instrument_classification.ipynb">ipynb</a>)</li>
<li><a href="neural_networks.html">Neural Networks</a> (<a href="neural_networks.ipynb">ipynb</a>)</li>
......
......@@ -120,8 +120,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"1. [K-Nearest Neighbor Classification](knn.html) ([ipynb](knn.ipynb))\n",
"1. [Exercise: K-Nearest Neighbor Instrument Classification](knn_instrument_classification.html) ([ipynb](knn_instrument_classification.ipynb))\n",
"1. [K-Means Clustering](kmeans.html) ([ipynb](kmeans.ipynb))\n",
"1. [Exercise: Unsupervised Instrument Classification using K-Means](kmeans_instrument_classification.html) ([ipynb](kmeans_instrument_classification.ipynb))\n",
"1. [Neural Networks](neural_networks.html) ([ipynb](neural_networks.ipynb))\n",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import seaborn\n",
"import numpy, scipy, matplotlib.pyplot as plt, sklearn, librosa, urllib, IPython.display, stanford_mir\n",
"plt.rcParams['figure.figsize'] = (14,5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[&larr; Back to Index](index.html)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# K-Nearest Neighbor"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can appreciate why we need additional intelligence in our systems -- heuristics don't go very far in the world of complex audio signals. We'll be using scikit-learn's implementation of the k-NN algorithm for our work here. It proves be a straightforward and easy-to-use implementation. The steps and skills of working with one classifier will scale nicely to working with other, more complex classifiers."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Training Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's begin by loading some training data. We will use the following convenience function written for this workshop:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"training_features, training_labels, scaler = stanford_mir.get_features(collection=\"drum_samples_train\", download=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This function returns three outputs: a list of training feature vectors, each containing zero crossing rate and spectral centroid; the ground truth labels of the training data; and a `scaler` object of type [`sklearn.preprocessing.MinMaxScaler`](http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html). `scaler` simply scales every training feature vector such that the two features lie between -1 and 1."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Show the training labels. `0` is a kick drum, and `1` is a snare drum."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 1. 1.\n",
" 1. 1.]\n"
]
}
],
"source": [
"print training_labels"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Show the training feature vectors."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[-0.56578947 0.24904773]\n",
" [-0.92105263 -0.63084085]\n",
" [-1. -1. ]\n",
" [-1. 0.32776615]\n",
" [-0.77631579 -0.55766282]\n",
" [-0.96052632 -0.69890723]\n",
" [-0.68421053 -0.63536403]\n",
" [-0.73684211 -0.1020908 ]\n",
" [-0.82894737 -0.38692787]\n",
" [-0.69736842 -0.53651433]\n",
" [ 0.53947368 0.898375 ]\n",
" [ 0.63157895 0.55248412]\n",
" [ 1. 0.99378472]\n",
" [ 0.93421053 1. ]\n",
" [ 0.85526316 0.87392178]\n",
" [ 0.89473684 0.9679766 ]\n",
" [ 0.23684211 0.86119292]\n",
" [ 0.97368421 0.79526439]\n",
" [ 0.40789474 0.38793571]\n",
" [ 0.88157895 0.8860086 ]]\n"
]
}
],
"source": [
"print training_features"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot the training data:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.text.Text at 0x10cf71890>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0wAAAFICAYAAABjk36IAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVXW+x/HPFhCUjQKFlpNtJ4zUvI32pOV4AWOyi2dE\noQAPaM5okwdr8hLHMa8jD4qZ4+PRedScQZ1SE0XK8TRlXmbGk6kUTt7LC1pOjYUiN0VknT+Q3SAs\nthLsxeX9ep55nllr7b3XF/nOGj7791u/ZTMMwxAAAAAAoJJmVhcAAAAAAPUVgQkAAAAATBCYAAAA\nAMAEgQkAAAAATBCYAAAAAMAEgQkAAAAATFgWmA4ePKi4uLhK+1NTU/X0008rPj5e8fHxOnPmjPuL\nAwAAAABJnlac9I033lBGRoZ8fX0rHTt8+LBSUlLUpUsXCyoDAAAAgO9ZMsLkcDi0dOnSKo8dPnxY\ny5cvV2xsrFasWOHmygAAAADge5YEpvDwcHl4eFR57KmnntLs2bO1Zs0aZWZmavfu3W6uDgAAAADK\n1LtFH0aNGiV/f395enpq4MCBOnLkiMv3GIbhhsoAAAAANDWW3MNU7uagk5+fr6FDh2r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UVO\nRK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x108ad7850>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.scatter(training_features[:10,0], training_features[:10,1])\n",
"plt.scatter(training_features[10:,0], training_features[10:,1], color='r')\n",
"plt.xlabel('Zero Crossing Rate')\n",
"plt.ylabel('Spectral Centroid')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Test Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute features from a test data set of 30 kick drum samples and 30 snare drum samples. We will re-use the `MinMaxScaler` used during training."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"test_features, test_labels, _ = stanford_mir.get_features(collection=\"drum_samples_test\", scaler=scaler, download=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's see how many test examples were loaded:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(60, 2)\n"
]
}
],
"source": [
"print test_features.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Show the test labels:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1.\n",
" 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.\n",
" 1. 1. 1. 1. 1. 1.]\n"
]
}
],
"source": [
"print test_labels"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot the test feature vectors. Note that this uses the same scaling function used during training. Therefore, some test feature vectors may exceed the range [-1, 1]."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.text.Text at 0x10d254e10>"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA0gAAAFICAYAAABqeN7yAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X9AVHW+//HXAArmoEChZdlYuKZlP9a6m+WaiFqatfkD\nSlTI9Iv9sjV/JKnlr+SiY1ltV7qutVluqWUq5rqVprl7vetKFt40szKl0jIUBQbxB3C+fzhOoeAA\nMnPmDM/HP9s5Z5jzlne285rPj2MzDMMQAAAAAEAhZhcAAAAAAIGCgAQAAAAAbgQkAAAAAHAjIAEA\nAACAGwEJAAAAANwISAAAAADgZkpAqqio0KRJk5ScnKwhQ4bom2++qXR9/fr1SkxM1KBBg/TOO++Y\nUSIAAACABsiUgLR+/XrZbDYtXrxYo0eP1ty5cz3XysrKNGvWLC1cuFCLFi3S0qVLVVBQYEaZAAAA\nABoYUwJSz5499cwzz0iS9u3bp+bNm3uu7d69Ww6HQ3a7XY0aNdKNN96onJwcM8oEAAAA0MCEmXXj\nkJAQTZw4UWvXrtWf/vQnz3mXy6XIyEjPcdOmTVVcXGxGiQAAAAAaGFM3acjMzNQHH3ygp556SseO\nHZMk2e12uVwuz2tKSkrUrFmzc76PYRg+rRMAAABAw2DKCNLKlSt14MABPfjggwoPD1dISIhCQk5l\ntbi4OOXl5amoqEgRERHKycnRiBEjzvl+NptN+fmMMllVbGwk/bMoemdt9M/a6J910Ttro3/WFRsb\n6f1FMikg9e7dW08++aSGDh2qsrIyTZo0SR9++KFKS0uVlJSkiRMnavjw4TIMQ0lJSWrRooUZZQIA\nAABoYEwJSBEREXrhhReqvR4fH6/4+Hj/FQQAAAAA4kGxAAAAAOBBQAIAAAAANwISAAAAALgRkAAA\nAADAjYAEAAAAAG4EJAAAAABwIyABAAAAgBsBCQA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cv0+uuvVzqXmZmpPn36aMuWLVX+zNGjR5WSkqIHHnhAZWVlSk1N1bXXXqt27dr5slQAAAAAkM0w\nDMOMG2/ZskVLly49aw1SRUWFSktLPeuP5syZo6uuukp/+MMfzCgTAAAAQAMScLvY7dmzR4MHD5Zh\nGDp58qS2bt2qa665xuyyAAAAADQApu1id6aFCxfK4XCoe/fu6t+/v+699141atRIAwYMUFxcnNnl\nAQAAAGgATJtiBwAAAACBJuCm2AEAAACAWQhIAAAAAOBGQAIAAAAANwISAAAAALgFRUByuVx66KGH\nlJKSokGDBik3N9fsklAHa9eu1bhx48wuAzVgGIamTp2qQYMGKTU1Vd9//73ZJaGWtm3bppSUFLPL\nQC2VlZVpwoQJGjJkiO69916tX7/e7JJQCxUVFZo0aZKSk5M1ZMgQffPNN2aXhFo6dOiQ4uPjtWfP\nHrNLQS0NGDBAqampSk1N1aRJk8752oDZ5vt8vPbaa7r11luVmpqqPXv2aNy4cVq+fLnZZaEWMjIy\ntGnTJnXo0MHsUlAD69at04kTJ7RkyRJt27ZNmZmZysrKMrss1NArr7yi7OxszwO5YR2rVq1SdHS0\nnE6nCgsL1a9fPyUkJJhdFmpo/fr1stlsWrx4sbZs2aK5c+fy304LKSsr09SpUxUREWF2KailEydO\nSJLeeOONGr0+KEaQHnjgAQ0aNEjSqX95w8PDTa4ItdWpUydNmzbN7DJQQ1u3blXXrl0lSddff722\nb99uckWoDYfDoXnz5pldBuqgT58+Gj16tKRToxFhYUHxPWeD0bNnTz3zzDOSpH379ql58+YmV4Ta\nmD17tpKTk9WiRQuzS0Etffnllzp69KhGjBihYcOGadu2bed8veX+y7ps2TK9/vrrlc5lZmaqY8eO\nys/P14QJEzR58mSTqoM31fWvT58+2rJli0lVobZcLpciIyM9x2FhYaqoqFBISFB85xL0evXqpX37\n9pldBuqgSZMmkk79HRw9erTGjBljckWorZCQEE2cOFFr167Vn/70J7PLQQ0tX75cF154obp06aL/\n/u//Nrsc1FJERIRGjBihpKQk7d27V2lpafrgg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5sq699lq99957evXVVxUaGqrL\nLrtMc+bM0eHDhzV+/HiVlpYqJCRETz31lK677jpPQPn3v/+tf/7znyosLNT333+vLl26aOrUqZKk\n5557Th9++KGio6MVGxurHj16qF+/fuf8PRUUFOjYsWNq3ry5JOn555/X5s2bVVhYqOjoaL300kta\nvny5fv75Z40cOVJvvvmm8vLyNGvWLB07dkzR0dGaMWOGLr300nruIACgpghIAIBzOnTokMaNG6eM\njAxddtllkqSXX35ZHTt21KxZs+RyuZScnKzrrrtOknTgwAG9//77stlsevzxx9W5c2cNGzZM33//\nvQYPHqzs7GzFxMR43n/nzp2Kj4+vdM+QkBDdeeednuMTJ05o9erVkqSkpCQ9+OCD6tmzp7Zt26bR\no0fr/fff14svvqi3335bMTExevHFF/Xtt99q3bp16t69u4YPH64tW7Zo69atuu666ypNf8vNzdXf\n/vY32Ww29e7dW4MHD9YPP/ygzz77TGvWrFFJSYn69++vHj16nPW7MQxD/fv318mTJ3Xo0CHFxcXp\n6aef1nXXXafvvvtOe/bs0dKlSyVJ6enpWr16tUaOHKklS5ZowYIFuuCCC/T0009r/vz5uvjii/U/\n//M/euqpp/Taa6/VT/MAALVGQAIAVMswDI0fP1533323EhISPOf/93//V8ePH9eyZcskSceOHdM3\n33wjSbrmmms8AWTz5s2aOXOmJKl169a64YYbtG3bNnXv3t3zXjabTd5me19//fWSpKNHj+q7775T\nz549PeejoqK0d+9eJSQkKDk5WT169NAdd9yh9u3b6+jRo/rjH/+oHTt2KD4+XkOGDPH8uU777W9/\nqyZNmnhqLCws1KZNm9SnTx+FhoaqWbNmnvudyWazacWKFZKk119/Xe+++65uu+02SdLll1+u9PR0\nvf3229qzZ49yc3N1+eWXV/rd7t27V999950efvhhGYYhm82mkpKSc/4uAAC+xS52AIBqvfTSSyor\nK9PYsWMrna+oqNCcOXO0cuVKrVy5Um+99Za6dOkiSQoPD/e87szgU1FRofLy8krnOnbsqM8//7zS\nOcMwNGrUKBUUFFR6z4qKirNqPP2ekyZN0ksvvaSoqCg98cQTeu+999SpUyf97W9/U9euXbVmzRo9\n9NBDZ/38meupDMNQaGholfc6l/vvv1+xsbFyOp2SpO3bt2v48OEyDEO9e/dWz549z/p9lJeX6/LL\nL9eKFSu0cuVKLV++XIsWLarVfQEA9YuABACo0qZNm7Rs2TI9//zzCgmp/H8XnTt31ltvvSVJys/P\nV//+/fXTTz+d9R6dO3f2jDJ9//33+uyzz3TDDTdUes19992nf/zjH/rHP/7hOTdv3jwdPny40lQ8\nSbLb7WrdurXWrVsn6dT0uIMHD6pt27a64447FB0drZEjR+qee+7RF198oeeee04rV65Uv3799PTT\nT+uLL76o0Z/91ltv1YcffqiTJ0/K5XLp448/rvJ1ZwaeiRMnasWKFdq1a5c++eQT3Xzzzbrvvvt0\n5ZVXatOmTZ7QFRYWpvLycl155ZUqLCzUJ598IklatmyZnnjiiRrVCADwDabYAQCq9Oc//9mzAYMk\nzxSwQYMGadSoUZo2bZruvvtuVVRU6IknnlDr1q09H/RPmzx5sqZMmaJ3331XISEhysjI0EUXXVTp\nNRdddJEWLFig2bNn69lnn1VFRYWuvvpqzZs3r8q65syZoylTpujFF19UeHi45s2bp0aNGmn06NEa\nNmyYIiIi1Lx5c82aNUsVFRUaN26cVqxYodDQUE2fPl2Sqt2C+/T5bt266bPPPtOAAQPUvHlztWjR\nQhEREdW+/rS2bduqf//+cjqdyszM1KhRo9S/f39FR0erW7du+uGHHyRJ8fHxSktL06uvvqoXX3xR\nM2fO1IkTJ2S32zV79mxvrQEA+BDbfAMAcIbc3Fzt3btX/fr1U1lZme677z5lZmaqXbt2ZpcGAPAx\nAhIAAGcoLCzUuHHjlJ+fL8MwNGDAAA0bNszssgAAfkBAAgAAAAA3NmkAAAAAADcCEgAAAAC4EZAA\nAAAAwI2ABAAAAABuBCQAAAAAcPv/4dX2RmeXMlgAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x108ab9d50>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.scatter(test_features[test_labels==0,0], test_features[test_labels==0,1])\n",
"plt.scatter(test_features[test_labels==1,0], test_features[test_labels==1,1], color='r')\n",
"plt.xlabel('Zero Crossing Rate')\n",
"plt.ylabel('Spectral Centroid')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Building the K-NN Model"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Build a k-NN model for the snare drums using scikit.learn's [KNeighborsClassifier](http://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html) class."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"model = sklearn.neighbors.KNeighborsClassifier(n_neighbors=1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To train a scikit-learn classifier, use the classifier object's `fit` method:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n",
" metric_params=None, n_jobs=1, n_neighbors=1, p=2,\n",
" weights='uniform')"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.fit(training_features, training_labels)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To test the classifier on a set of (test) feature vectors, use the `predict` method:"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"predicted_labels = model.predict(test_features)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1., 1.,\n",
" 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,\n",
" 1., 1., 1., 1., 1., 1., 1., 1.])"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"predicted_labels"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Evaluating the model"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute the number of true positives, true negatives, false positives, and false negatives:"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"tp = sum((test_labels == 1) & (predicted_labels == 1))\n",
"tn = sum((test_labels == 0) & (predicted_labels == 0))\n",
"fp = sum((test_labels == 0) & (predicted_labels == 1))\n",
"fn = sum((test_labels == 1) & (predicted_labels == 0))"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"30 30 0 0\n"
]
}
],
"source": [
"print tp, tn, fp, fn"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Evaluate the model accuracy on the test data."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"1.0"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model.score(test_features, test_labels)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute the recall score, and verify it is correct:"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"1.0"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sklearn.metrics.recall_score(test_labels, predicted_labels)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.0\n"
]
}
],
"source": [
"recall = tp/float(tp+fn)\n",
"print recall"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute the precision score, and verify:"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"1.0"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sklearn.metrics.precision_score(test_labels, predicted_labels)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.0\n"
]
}
],
"source": [
"precision = tp/float(tp+fp)\n",
"print precision"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute the [F-measure](https://en.wikipedia.org/wiki/F1_score), and verify:"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"1.0"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sklearn.metrics.f1_score(test_labels, predicted_labels)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.0\n"
]
}
],
"source": [
"fmeasure = 2*recall*precision/float(recall+precision)\n",
"print fmeasure"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Bonus"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Substitute the k-NN model with a different classifer, and repeat the above classification. For example:"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#model = sklearn.svm.SVC()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[&larr; Back to Index](index.html)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import seaborn\n",
"import numpy, scipy, matplotlib.pyplot as plt, sklearn, librosa, mir_eval, urllib, IPython.display, stanford_mir\n",
"plt.rcParams['figure.figsize'] = (14,5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[&larr; Back to Index](index.html)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Exercise: Instrument Classification using K-NN"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This exercise is loosely based upon \"Lab 1\" from previous MIR workshops ([2010](https://ccrma.stanford.edu/workshops/mir2010/Lab1_2010.pdf))."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For more on K-NN, see the [notebook on K-NN](knn.ipynb)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For help from a similar exercise, [follow the steps in the feature sonification exercise](feature_sonification.ipynb#Step-1:-Retrieve-Audio) first."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Goals"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Extract spectral features from an audio signal.\n",
"2. Train a K-Nearest Neighbor classifier.\n",
"3. Use the classifier to classify beats in a drum loop."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 1: Retrieve Audio, Detect Onsets, and Segment"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Download the file `simple_loop.wav` onto your local machine."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"filename = 'simple_loop.wav'\n",
"urllib.urlretrieve?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Load the audio file:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"librosa.load?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Play the audio file:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"IPython.display.Audio?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Detect onsets:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"librosa.onset.onset_detect?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Convert onsets from frames to seconds (and samples):"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"librosa.frames_to_time?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"librosa.frames_to_samples?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Listen to a click track, with clicks located at each onset, plus the original audio:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"mir_eval.sonify.clicks?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"IPython.display.Audio?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 2: Extract Features"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For each segment, compute the zero crossing rate and spectral centroid."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"librosa.zero_crossings?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"librosa.feature.spectral_centroid?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Scale the features to be in the range [-1, 1]:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sklearn.preprocessing.MinMaxScaler?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sklearn.preprocessing.MinMaxScaler.fit_transform?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 3: Train K-NN Classifier"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Use `stanford_mir.download_drum_samples` to download ten kick drum samples and ten snare drum samples. Each audio file contains a single drum hit at the beginning of the file."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"stanford_mir.download_drum_samples?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For each audio file, extract one feature vector. Concatenate all of these feature vectors into one feature table."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"numpy.concatenate?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 4: Run the Classifier"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a K-NN classifer model object:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sklearn.neighbors.KNeighborsClassifier?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Train the classifier:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"sklearn.neighbors.KNeighborsClassifier.fit?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, run the classifier on the test input audio file:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"sklearn.neighbors.KNeighborsClassifier.predict?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 5: Sonify the Classifier Output"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Play a \"beep\" for each detected kick drum. Repeat for the snare drum."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"mir_eval.sonify.clicks?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## For Further Exploration"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In addition to the features used above, extract the following features (see librosa docs on [feature extraction](http://librosa.github.io/librosa/feature.html)):\n",
"\n",
"- spectral centroid\n",
"- spectral spread\n",
"- spectral skewness\n",
"- spectral kurtosis\n",
"- spectral rolloff\n",
"- MFCCs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Re-train the classifier, and re-run the classifier over the test audio signal. Do the results change?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Repeat the steps above for more audio files."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[&larr; Back to Index](index.html)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment