<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Defne Tunçer on Medium]]></title>
        <description><![CDATA[Stories by Defne Tunçer on Medium]]></description>
        <link>https://medium.com/@defnetuncer?source=rss-92cc2f611161------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QmRmorjvljNVA8uy9DcsBw.png</url>
            <title>Stories by Defne Tunçer on Medium</title>
            <link>https://medium.com/@defnetuncer?source=rss-92cc2f611161------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 16:09:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@defnetuncer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[Week #7 — Rock or Not? ♫]]]></title>
            <link>https://medium.com/bbm406f18/week-7-rock-or-not-40383b847ea1?source=rss-92cc2f611161------2</link>
            <guid isPermaLink="false">https://medium.com/p/40383b847ea1</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Defne Tunçer]]></dc:creator>
            <pubDate>Sun, 13 Jan 2019 20:42:44 GMT</pubDate>
            <atom:updated>2019-01-14T04:26:43.978Z</atom:updated>
            <content:encoded><![CDATA[<h3>[Week #7 — Rock or Not? ♫]</h3><h4>☞ This sure does.</h4><p>We are <a href="https://medium.com/u/92cc2f611161">Defne Tunçer</a> &amp; <a href="https://medium.com/u/7cf636a25dad">Kutay Barçin</a> and this is our sixth article of series of our Machine Learning Course Project about Music Genre Classification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/70/1*mR7SQIwgYDOVmpcMcdUinQ.png" /><figcaption><a href="https://github.com/HUbbm409/rock-or-not">GitHub</a></figcaption></figure><p>Can’t wait! Here’s our video as we promised last week.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJUi-dV562FM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJUi-dV562FM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJUi-dV562FM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/553f5e211442bfab64c83eb7d3951654/href">https://medium.com/media/553f5e211442bfab64c83eb7d3951654/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*b6YGWOMwFUmQqHiMFP-LAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*MEbOLeJ8pVpSLN4xxv34JA.jpeg" /></figure><h3>Neural Network</h3><p>Neural Network a.k.a. Multi-Layer Perceptron can learn a non-linear function approximator for either classification or regression. We have applied <strong>Cross-Entropy (Log-Loss) </strong>as loss function and <strong>Softmax</strong> as activation function for the output layer with batch size of 200. For hidden layers<strong> tanh, relu </strong>and<strong> sigmoid(logistic)</strong> are tested. We have options for solver as well: <strong>lbfgs, sgd </strong>and <strong>adam.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl3dj09hpsfuYkijDi%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fthegoldbergs--1990-the-goldbergs-l3dj09hpsfuYkijDi&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fl3dj09hpsfuYkijDi%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/165031ead1d6cf7a3976614e39dd7070/href">https://medium.com/media/165031ead1d6cf7a3976614e39dd7070/href</a></iframe><p>We already met with lbfgs and sgd. Adam, on the otherhand, is especially designed to work well on large datasets. From our observations, it converges really fast compared to other solvers and methods. Tested on all features, with logistic function as activation, and 2 hidden layers, after 10 epoch adam converges to accuracy score of <strong>66.16% </strong>while sgd converges to accuracy score of <strong>67.23% </strong>after 500 epochs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*13qrRngCES_wM1E_anV0Tw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*WcY_bfbVshRHcfEzFPgACg.png" /><figcaption>Figure 1. adam(left) , Figure 2. sgd(right)</figcaption></figure><p>For computational efficiency we are conducting our tests with adam solver.</p><p>Tested on <strong>MFCC</strong> with no hidden layer, we have obtained accuracy score of <strong>63.16%. </strong>As we add one hidden layer of 100 neurons, we were able to increase our accuracy quickly to<strong> 65.13%</strong>.</p><p>Tested on <strong>all features </strong>as input and with no hidden layer, we have immediately reach the accuracy score of <strong>65.0%. </strong>It appears, while having large feature set increases accuracy, it also overfits the training data as expected. To avoid overfitting, <strong>alpha </strong>parameter, which is L2 penalty (regularization term) parameter is tuned with k-fold cross validation. Tested on one hidden layer of size 250 neurons, we have obtained accuracy score of <strong>66.14%</strong>. Tested on one hidden layer of size 250 and a fully-connected layer we reached our highest (Figure 2.) <strong>67.23%.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F8HvCr61DGNMw8%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fteachers-partners-8HvCr61DGNMw8&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F8HvCr61DGNMw8%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="309" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9223f0faa21812758a5da5c0949d1f4/href">https://medium.com/media/d9223f0faa21812758a5da5c0949d1f4/href</a></iframe><p>As this is our last blog article, we are getting ready to say goodbye to our project.</p><h4>What we have done so far?</h4><p>As for the beginning, we were interested in <strong>predicting the genres of the music tracks</strong>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FwnoEutjol5ei4%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Ftoday-master-thesis-wnoEutjol5ei4&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FwnoEutjol5ei4%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="268" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c2faa48b770382ca42095e93775f0a0/href">https://medium.com/media/2c2faa48b770382ca42095e93775f0a0/href</a></iframe><p>In literature it appears in different names: Music Genre Recognition (Classification) and Audio Tagging.</p><p>It benefits: Content based music recommendation, automatic audio tagging and automatically generated playlists.</p><p>Task can be done with different approaches: from audio or from audio metadata. We decided to use only audio as our input.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FOo6GWyiWEDgtO%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FOo6GWyiWEDgtO&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FOo6GWyiWEDgtO%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="314" frameborder="0" scrolling="no"><a href="https://medium.com/media/7e82bfabe6750ce7bf3af713850397e3/href">https://medium.com/media/7e82bfabe6750ce7bf3af713850397e3/href</a></iframe><p>Then we choose our dataset to be a subset of the most recent published dataset: FMA, which consists of 15 genres of Rock, Electronic, Hip-Hop, Folk, Pop, Instrumental, International, Jazz, Classical, Old-Time / Historic, Country, Spoken, Soul-RnB, Blues and Easy-Listening.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F2x0Uoc6vOASGMZJ2dC%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fclass-homework-copies-2x0Uoc6vOASGMZJ2dC&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F2x0Uoc6vOASGMZJ2dC%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/07063c6ca340b24022d7d7f53fda83b3/href">https://medium.com/media/07063c6ca340b24022d7d7f53fda83b3/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*ArH_q353NvA554emgl3nQQ.gif" /></figure><p>Using features that are extracted from our dataset with librosa: Each track contains 518 attributes categorized in 11 audio features; Mel Frequency Cepstral Coefficients (mfcc), Chroma Features (chroma cens, chroma cqt, chroma stft), Spectral Features (spectral bandwidth, spectral centroid, spectral contrast, spectral rolloff), RMS Energy (rmse), Tonal Centroids (tonnetz), Zero Crossing Rate(zcr). Each of these features are stored as statics, including kurtosis, max, mean, median, min, skew and std.</p><p>We, then, implemented baseline methods for classification: <strong>Nearest Neighbors, Logistic Regression and Support Vector Machines. </strong>Additionally <strong>Ridge Classifier</strong> and <strong>Stochastic Gradient Descent Classifier</strong> are discussed. After applying feature and model selection we have reached our final scores.</p><p>Our final approach was neural network and with this last blog article we-are-done! You can find our course page on:</p><p><a href="https://web.cs.hacettepe.edu.tr/~aykut/classes/fall2018/bbm406/">BBM406: Fundamentals of Machine Learning</a></p><p>Our special thanks to Assoc. Prof. Aykut Erdem and Necva Bölücü. And thank you for staying with us till the very end!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*8I-8GhUyVlna9RX-QqeD6A.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QB_TFDObxNivWdnZkjj2Ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40383b847ea1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f18/week-7-rock-or-not-40383b847ea1">[Week #7 — Rock or Not? ♫]</a> was originally published in <a href="https://medium.com/bbm406f18">bbm406f18</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week #6 — Rock or Not? ♫]]]></title>
            <link>https://medium.com/bbm406f18/week-6-rock-or-not-c2c64fde4285?source=rss-92cc2f611161------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2c64fde4285</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Defne Tunçer]]></dc:creator>
            <pubDate>Sun, 06 Jan 2019 20:50:33 GMT</pubDate>
            <atom:updated>2019-01-07T05:25:22.275Z</atom:updated>
            <content:encoded><![CDATA[<h3>[Week #6 — Rock or Not? ♫]</h3><h4>☞ This sure does.</h4><p>We are <a href="https://medium.com/u/92cc2f611161">Defne Tunçer</a> &amp; <a href="https://medium.com/u/7cf636a25dad">Kutay Barçin</a> and this is our sixth article of series of our Machine Learning Course Project about Music Genre Classification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/70/1*mR7SQIwgYDOVmpcMcdUinQ.png" /><figcaption><a href="https://github.com/HUbbm409/rock-or-not">GitHub</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*3RAX1bfqLtU0c-luoCsjmA.png" /></figure><h4>Last week, we talked about how to improve our <strong>Support Vector Machine</strong>, <strong>Linear Regression </strong>and, as a bonus examine two methods <strong>Stochastic Gradient Descent </strong>and<strong> Ridge Classifier. </strong>This week, we’re planning to dive deeper into <strong>feature </strong>and <strong>model </strong>selection!</h4><h3>FEATURE SELECTION</h3><p>We believe that feature selection carries an importance since we have a feature set of 11 main levels; chroma-cens, chroma-cqt, chroma-stft, mfcc, rmse, spectral-bandwidth, spectral-centroid, spectral-contrast, spectral-rolloff, tonnetz, zcr which makes it a whole rich 518 dimensional set. In order to do that, we used <strong>k-fold cross validation</strong>, then the situation became that each model we select requires a different feature set.</p><p>As for <strong>Support Vector Machines</strong>, we investigated further into SVM with the<em> </em><strong>Radial Basis Function (RBF)</strong> kernel. While testing through all the features, we came to a realization that <strong>mfcc, spectral-centroid and spectral-contrast</strong> combined together work the best for <strong>SVM</strong> with <strong>RBF</strong> kernel. At the end, we reduced our feature dimension from 518 to 196.</p><p>As we move on to <strong>Logistic Regression</strong>, finding the right features was rather less time consuming than <strong>SVM</strong> approach since <strong>LR</strong> works faster. In the end, combination of chroma-cens, chroma-cqt, mfcc, spectral-contrast, spectral-rolloff and zcr fit the best for Logistic Regression approaches. Thus for LR, we reduced our feature dimension from 518 to 329.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FRmfzOLuCJTApa%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fadultswim-RmfzOLuCJTApa&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FRmfzOLuCJTApa%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/25dedfb15d8b4a5ff070069f5dea988e/href">https://medium.com/media/25dedfb15d8b4a5ff070069f5dea988e/href</a></iframe><p>Although finding the right features cost us too much time, we improved our efficiency with respect to time, and achieved slightly higher accuracy ratings for both models!</p><h3>MODEL SELECTION</h3><p>For model selection, having a subset of all features from feature selection was quite useful in minimizing the classification errors. In order to do the right selection, we chose cross validation to go with.</p><p>When training <strong>Support Vector Machine</strong> with <strong>RBF</strong> kernel, there is two parameters to be considered, <strong>C</strong> and <strong>gamma</strong>. The parameter <strong>C</strong> is common to all SVM kernels which trades off miss-classification of training examples against simplicity of the decision surface. A low <strong>C</strong> makes the decision surface smooth, while a high <strong>C</strong> aims at classifying all training examples correctly. <strong>Gamma </strong>parameter on the other hand defines how much influence a single training example has.Thus, The larger <strong>gamma</strong> is, the closer other examples must be to be affected.</p><p>After applying cross validation, we came to a conclusion that the best parameters we get for our data are <strong>C </strong>= 1.2 and <strong>gamma</strong> = 1e-1(0.1). With all these feature and model selections we achieved <strong>82.81%</strong> training accuracy and <strong>67.80% </strong>test accuracy!</p><p>As we mentioned last week, for Logistic Regression we have several parameters to tune with. For the solver <strong>A Library for Large Linear Classification </strong>(liblinear), we tuned <strong>penalty</strong> = l2,<strong> C</strong> = 0.15, and <strong>OvR scheme</strong> which resulted in <strong>70.84%</strong> training accuracy and <strong>65.96%</strong> test accuracy which has become the highest accuracy rating we achieved by using <strong>Logictic Regression. </strong>The same solver with <strong>penalty</strong> = l1, <strong>C</strong>= 0.6 with <strong>OvR scheme</strong> also achieved a smilar score that is <strong>71.00%</strong> training accuracy and <strong>65.88%</strong> test accuracy.</p><p>The solver <strong>Newton</strong> (newton-cg) gave the best results with <strong>penalty</strong> = l1, <strong>C</strong> = 0.12, and <strong>OvR scheme </strong>that is<strong> 70.96%</strong> training accuracy and <strong>65.80%</strong> test acuracy.</p><p>For <strong>Stochastic Average Gradient </strong>(sag) and (saga), <strong>solver</strong> = sag, <strong>penalty</strong> = l2, <strong>C</strong> = 0.1, and <strong>multinominal</strong> approach resulted in <strong>70.36%</strong> training accuracy and <strong>65.70%</strong> test accuracy.</p><p>The solver <strong>Limited-memory Broyden–Fletcher–Goldfarb–Shanno Algorithm </strong>(lbfgs) on the other hand was outperformed by other solvers as it is designed for small datasets. Even with the parameter tuning, it couldn’t achieve beyond the baseline score of <strong>Logistic Regression.</strong></p><p>To conclude<strong> feature</strong> and <strong>model selection</strong>, with the help of scaling, we improved all of our test accuracy ratings by <strong>1–3%</strong>, and even decreased some of our training accuracies!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FewCxZp2RmuCDaMl4pq%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fcartoonhangover-cartoon-hangover-bravest-warriors-ewCxZp2RmuCDaMl4pq&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FewCxZp2RmuCDaMl4pq%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/1d6c567f8d09a6279594607bab10e1b0/href">https://medium.com/media/1d6c567f8d09a6279594607bab10e1b0/href</a></iframe><p>As an addition to this week’s feature and model selection, we also played and altered our dataset! Since we have 15 music genres that even a human ear can’t recognize the difference between some of them, we decided to see how our models work if we simply just remove some of the genres from our dataset! We will also observe the work of our models on more balanced dataset this way.</p><p>For the beginning, we decided to remove 8 of our genres from the dataset whose numbers were too low on both training and test samples. This way, we also obtained a better balanced dataset. Thus, we ended up with <strong>88.43%</strong> training accuracy and <strong>75.82%</strong> test accuracy!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*ZnrNic3e_UfF51nGeEPhrQ.png" /><figcaption>Confusion Matrix of 8 top-genre prediction with SVM RBF kernel</figcaption></figure><p>As seen from the confusion matrix above, having a balanced dataset might really help us in the future!</p><p>As the results have gotten higher, we decided to alter our dataset one more time and use 4 top-genres of the dataset, in other words, 4 of the genres that are most occurred in both training and test samples. Looking at the results, we achieved <strong>92.65%</strong> training accuracy and <strong>88.20%</strong> test accuracy! We surely can’t achieve higher with our ears..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*iqZxqziKTrjE4f-XF-HCDA.png" /><figcaption>Confusion Matrix of 4 top-genre prediction with SVM RBF kernel</figcaption></figure><p>From these two motivating examples, we came to a conclusion that music genre classification can actually predict better and beyond the human brain with good algorithms on greater and better datasets.</p><p>For the next week, we aim to create a <strong>Neural Network, </strong>and<strong> </strong>do further feature and model selection on <strong>kNN</strong>, <strong>SVM</strong> with <strong>linear kernel</strong> and <strong>Stochastic Gradient Descent.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F555025011%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Flaurusnobilis%2Ftongue-tied&amp;image=http%3A%2F%2Fi1.sndcdn.com%2Fartworks-000468030357-p01e5u-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/d997de636d539d67b0de7e8ee1445def/href">https://medium.com/media/d997de636d539d67b0de7e8ee1445def/href</a></iframe><h4>Here is a song that we have discovered while getting lost in our dataset and classified correctly — yep, it’s rock!</h4><blockquote>P.S. As we are approaching the end of our project, a short video presentation of our project is on its way..!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*NwGocmsRm5k_B95AgkQ9Ng.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QB_TFDObxNivWdnZkjj2Ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2c64fde4285" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f18/week-6-rock-or-not-c2c64fde4285">[Week #6 — Rock or Not? ♫]</a> was originally published in <a href="https://medium.com/bbm406f18">bbm406f18</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week #5 — Rock or Not? ♫]]]></title>
            <link>https://medium.com/bbm406f18/week-5-rock-or-not-aa5e6beb6c6e?source=rss-92cc2f611161------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa5e6beb6c6e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[music]]></category>
            <dc:creator><![CDATA[Defne Tunçer]]></dc:creator>
            <pubDate>Sun, 30 Dec 2018 20:57:02 GMT</pubDate>
            <atom:updated>2019-01-06T20:58:17.617Z</atom:updated>
            <content:encoded><![CDATA[<h3>[Week #5 — Rock or Not? ♫]</h3><h4>☞ This sure does.</h4><p>We are <a href="https://medium.com/u/92cc2f611161">Defne Tunçer</a> &amp; <a href="https://medium.com/u/7cf636a25dad">Kutay Barçin</a> and this is our fifth article of series of our Machine Learning Course Project about Music Genre Classification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/70/1*mR7SQIwgYDOVmpcMcdUinQ.png" /><figcaption><a href="https://github.com/HUbbm409/rock-or-not">GitHub</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*doejcU7Pmar_SqJI9zdB4w.png" /></figure><h3>METHODS AND PARAMETER TUNING</h3><p>Last week we discussed baseline methods Nearest Neighbors, Logistic Regression and Support Vector Machines. This week we are planning to discuss on how to improve our accuracies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aIJenM3u-hSujkTJkV_mdA.png" /><figcaption>Figure 1. <a href="https://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html">Classifier Comparison</a></figcaption></figure><p>Having a high dimensional data makes it more easily separable linearly and simple classifiers are indeed a good choice to begin with.</p><p>Starting with <strong>Logistic Regression, </strong>our test accuracy obtained by applying Logistic Regression (with default settings one-versus-rest (ovr) scheme, solver=liblinear, C=1 and penalty=l2) using MFCC alone was <strong>62.55%</strong> and with all the features it was <strong>65.13%</strong>.</p><p>One of our following option is <strong>multinomial</strong> approach which minimizes the loss so that it fits across the entire probability distribution whereas <strong>ovr</strong> fits a binary problem for each label.</p><p>As for the solvers we have a couple of options:</p><ul><li><strong>A Library for Large Linear Classification </strong>(liblinear): Linear combination of the features</li><li><strong>Newton</strong> (newton-cg): Quadratic approximation</li><li><strong>Stochastic Average Gradient </strong>(sag) and (saga): ‘sag’ uses a Stochastic Average Gradient descent while ‘saga’ uses its improved, unbiased version and also supports l1 penalty. This is therefore the solver of choice for sparse multinomial logistic regression. Both methods are often faster than other solvers when data and features are large. Which is just for our case!</li><li><strong>Limited-memory Broyden–Fletcher–Goldfarb–Shanno Algorithm </strong>(lbfgs): For small datasets</li></ul><p>Overall of solvers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDv56SiBv1EHsZfgYaCqCA.png" /><figcaption>Figure 2. <a href="https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression">Logistic Regression Solvers</a></figcaption></figure><p>While testing parameters <strong>ConvergenceWarning </strong>keep occuring, which can mean one or more of: data normalization is needed, more iterations are required or data simply can’t be fitted by a logistic model! We’ve reached the test accuracy of <strong>64.87</strong>% on the solver newton-cg using <strong>l2 </strong>penalty.</p><p>As we move on to <strong>Support Vector Machines, </strong>we have fewer options to work with. Our test accuracy obtained by applying Support vector classifier(with default settings one-versus-rest (ovr) scheme, C=1, kernel=linear and penalty=l2) using MFCC alone was <strong>61.77%</strong> and with all the features it was <strong>63.35%</strong>.</p><p>Generally Linear SVC has more flexibility as for the options of penalties and loss functions. It is also expected to scale better to large numbers of samples. As appeared in the Figure 1. rbf kernel captures the non-linearities of the data better. When training an SVM with the<em> </em><strong>Radial Basis Function (RBF)</strong> kernel <strong>66.61</strong>% test accuracy is reached! Train accuracy is <strong>82.57</strong>%, that is we will need to work on overfitting problem.</p><p>Parameter tuning is a time consuming work since most parameter combinations take couple of hours to converge. Dimension reduction will be examined next week.</p><p>BONUS! :</p><p><strong>Stochastic Gradient Descent </strong>with ‘log’ loss fits logistic regression model while with ‘hinge’ loss it fits the Linear SVC. SGD is more faster, more flexible and requires less memory but more tuning. Obtained test accuracies are <strong>63.01</strong>% and <strong>62.83</strong>% respectively.</p><p><strong>Ridge Classifier</strong> appears to be the fastest method which converges to a solution in seconds with a cross validation of regularization parameter using one-versus-all approach. Test accuracy is <strong>62.47</strong>%.</p><p>Parameter C (or alpha in the case of Ridge) is the regularization strength which improves the conditioning of the problem and reduces the variance of the estimates. Both RidgeClassifier, LinearSVC and Logistic Regression requires tuning for the parameter C.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*t6fb3ugtPlbTGz1eVsA13w.gif" /></figure><p>Well.. That was all! See you next year!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*5SWCt3XRUyafx-SWTzL7xw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QB_TFDObxNivWdnZkjj2Ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa5e6beb6c6e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f18/week-5-rock-or-not-aa5e6beb6c6e">[Week #5 — Rock or Not? ♫]</a> was originally published in <a href="https://medium.com/bbm406f18">bbm406f18</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week #4— Rock or Not? ♫]]]></title>
            <link>https://medium.com/bbm406f18/week-4-rock-or-not-cbbe50c885fd?source=rss-92cc2f611161------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbbe50c885fd</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Defne Tunçer]]></dc:creator>
            <pubDate>Sun, 23 Dec 2018 19:33:00 GMT</pubDate>
            <atom:updated>2018-12-24T04:05:47.476Z</atom:updated>
            <content:encoded><![CDATA[<h4>☞ This sure does.</h4><p>We are <a href="https://medium.com/u/92cc2f611161">Defne Tunçer</a> &amp; <a href="https://medium.com/u/7cf636a25dad">Kutay Barçin</a> and this is our fourth article of series of our Machine Learning Course Project about Music Genre Classification. May the fourth be with you!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/70/1*mR7SQIwgYDOVmpcMcdUinQ.png" /><figcaption><a href="https://github.com/HUbbm409/rock-or-not">GitHub</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*2ZDvKmAZfqo_IQvJeJC44A.png" /></figure><h3>RELATED WORKS</h3><p>This week we finally dig into some related works and classification methods! We discussed and applied several models in order to figure out which approaches best suited for our problem.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FANbUhwa0vzU7m%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmen-in-black-ANbUhwa0vzU7m&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FANbUhwa0vzU7m%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="227" frameborder="0" scrolling="no"><a href="https://medium.com/media/a955bfe9b09bdcc93bae7a3ec8dc56eb/href">https://medium.com/media/a955bfe9b09bdcc93bae7a3ec8dc56eb/href</a></iframe><p><strong>K-Nearest Neighbor Classifier</strong> is a non-parametric method used for classification and regression. Although K-NN is an easy implemented algorithm and performs well in a large number of classification problems, K-NN classification suffers from the curse of dimensionality.</p><p>Our model has a dimension space of 518 features which makes K-NN vulnerable. In order to overcome this, we planned to apply Principal Component Analysis (PCA) to our matrix which reduces the input to a lower desired dimension. Below visualization is the scatter plot of two genres Rock and Classical after applying PCA to reduce the feature dimensions to three dimensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*8OiUj5hc7sOxiQ58t9J4Fg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*E4me3mG0KVDBIYElcxTTeg.png" /></figure><p><strong>Logistic regression</strong> is a technique from the statistics field and provides a probability score for observations. It is a go-to method for binary classification problems, however for our multiclass problem, we applied Multinomial Logistic Regression through the one-vs-rest (OvR) scheme with a loss function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*kRiZwdDA2vKj9kEVQbo92Q.jpeg" /><figcaption>Normalized Confusion Matrix</figcaption></figure><p><strong>Support Vector Machine</strong> is a supervised learning method that can be used for classification. SVM works efficiently with high dimensional features even if the number of dimensions is greater than the number of samples. We preprocessed the data before applying Linear SVC using standard scaler to represent standard normally distributed data. Apart from Logistic Regression, SVM uses one-against-one approach for multi-class classification. This method is consistent, which is not true for one-vs-rest classification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*ZLFWEJfJEVs_QqWgzHVy0g.jpeg" /></figure><p>Since we have an unbalanced data, we were expecting our non-normalized confusion matrix to be appeared as this. We considered that having an unbalanced training and test data as reflecting the population, we would also be able to model the probability of appearing in real life situations.</p><p>As we observe our normalized confusion matrix, we figure out that as we are trying to preserve the percentage of the population we also accidentally miss-predicted most of the minority genres. As a future work we consider building genre-specific models for minority genres.</p><p>Furthermore, we are also planning to expand our implementation with Neural Networks and improve our current models.</p><p>Linear SVM, Logistic regression and KNN appear to have difficulties in capturing the non-linearities of the data, thus they achieve less accuracy than expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*2IpEV8JwQV2ONDERlYjpiQ.png" /></figure><p>As for the related works, we view various research papers and real-word applications. Most of the studies done by exploring the timbre texture, the rhythmic content, the pitch content, or their combinations.</p><p>Among these, we have a <a href="https://www.doc.ic.ac.uk/~ipanagak/pub/conf/C3.pdf">curious report</a> on the properties of the auditory human perception system proposed as a music genre<br>classifier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/0*_7VbwKGdDN1ubhYP.png" /><figcaption><a href="http://deepsound.io/music_genre_recognition.html">DeepSound</a></figcaption></figure><p>DeepSound has done a music genre recognition system using visual representations of frequency distribution over time <em>— </em>a Convolutional Neural Network. Image processing on audio! We may also be interested in that topic in the future!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3feEiIdDKXHkC0ZSne%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2F3feEiIdDKXHkC0ZSne&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3feEiIdDKXHkC0ZSne%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="144" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc3b58b92f94c14c985475bac885721f/href">https://medium.com/media/fc3b58b92f94c14c985475bac885721f/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QB_TFDObxNivWdnZkjj2Ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbbe50c885fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f18/week-4-rock-or-not-cbbe50c885fd">[Week #4— Rock or Not? ♫]</a> was originally published in <a href="https://medium.com/bbm406f18">bbm406f18</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week #3 — Rock or Not? ♫]]]></title>
            <link>https://medium.com/bbm406f18/week-3-rock-or-not-3a7dafd5995e?source=rss-92cc2f611161------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a7dafd5995e</guid>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[music]]></category>
            <dc:creator><![CDATA[Defne Tunçer]]></dc:creator>
            <pubDate>Sat, 15 Dec 2018 10:05:30 GMT</pubDate>
            <atom:updated>2018-12-15T10:05:30.440Z</atom:updated>
            <content:encoded><![CDATA[<h3>[Week #3 — Rock or Not? ♫]</h3><h4>☞ This sure does.</h4><p>We are <a href="https://medium.com/u/92cc2f611161">Defne Tunçer</a> &amp; <a href="https://medium.com/u/7cf636a25dad">Kutay Barçin</a> and this is our third article of series of our Machine Learning Course Project about Music Genre Classification. So let’s give it a start!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/70/1*mR7SQIwgYDOVmpcMcdUinQ.png" /><figcaption><a href="https://github.com/HUbbm409/rock-or-not">GitHub</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*N7qwIW-8lcKlleEZrVe5xA.png" /></figure><h3>DATASET ANALYSIS</h3><p>Last week we introduced Zero Crossing Rate (zcr) &amp; Mel Frequency Cepstral Coefficients (mfcc) from FMA Dataset. We are continuing with Chroma Features &amp; Spectral Features.</p><h3>Chroma Features</h3><p>A chroma vector is a typically a 12-element feature vector indicating how much energy of each pitch class, {C, C#, D, D#, E, …, B}, is present in the signal.</p><h4>Short-Time Fourier Transform</h4><p>The <strong>Fourier transform</strong> is one of the most fundamental operations in applied mathematics and signal processing.</p><p>It transforms our time-domain signal into the <em>frequency domain</em>. Whereas the time domain expresses our signal as a sequence of samples, the frequency domain expresses our signal as a superposition of sinusoids of varying magnitudes, frequencies, and phase offsets.</p><p>The <strong>short-time Fourier transform (STFT)</strong> is obtained by computing the Fourier transform for successive frames in a signal.</p><p>The human perception of sound intensity is logarithmic in nature. Therefore, like the STFT-based spectrogram, we are often interested in the log amplitude.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*Lix6D-cFd5ZaKCFTZI6OOg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*qnI1bOtkcNtcAotHMO76ow.png" /><figcaption><strong>stft </strong>(left), <strong>chroma_stft</strong>(right)</figcaption></figure><h4>Constant-Q Transform</h4><p>Unlike the Fourier transform, but similar to the Mel scale, the constant-Q transform uses a logarithmically spaced frequency axis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*ugdQ-1HXzwJQYoqg1lXrPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*SHm4i7t1AK8ItREs9-wCpQ.png" /><figcaption><strong>cqt</strong> (left), <strong>chroma_cqt</strong>(right)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*86xUwIgA8ccBOPrJ8MNOrg.png" /><figcaption><strong>chroma-cens</strong></figcaption></figure><h4>Chroma Energy Normalized Statistics (cens)</h4><p>The main idea of CENS features is that taking statistics over large windows smooths local deviations in tempo, articulation, and musical ornaments such as trills and arpeggiated chords. CENS are best used for tasks such as audio matching and similarity.</p><h3>Spectral Features</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*km3dokmORZug8EXLuhJxxA.png" /><figcaption>spectral_centroid</figcaption></figure><h4>Spectral Centroid</h4><p>The spectral centroid indicates at which frequency the energy of a spectrum is centered upon. This is like a <strong>weighted mean</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*HE1fdnx0DjLppUF5DJDO1A.png" /><figcaption>spectral_bandwidth</figcaption></figure><h4>Spectral Bandwidth</h4><p>The spectral bandwidth computes the order-p spectral bandwidth. For example, when p=2, this is like a <strong>weighted standard deviation.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*djP7AdCnoN6P2niuKyePFw.png" /><figcaption>spectral_rolloff</figcaption></figure><h4>Spectral Roll-off</h4><p>The spectral roll-off is the frequency below which a specified percentage of the total spectral energy, e.g. 85%, lies.</p><h4>Spectral Contrast</h4><p>The spectral contrast considers the spectral peak, the spectral valley, and their difference in each frequency subband.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*EeH3YoFmOJefNcALM4ysHw.png" /></figure><h4>Root-Mean-Square-Energy (RMSE)</h4><p>The energy of a signal corresponds to the total magnitude of the signal. For audio signals, that roughly corresponds to how loud the signal is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*rGXLFMFzubPdJSCW3tlnEA.png" /></figure><h4>Tonal Centroids (TONNETZ)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*TtKEAKhTCs6sQIvNJq9umA.png" /><figcaption><strong>tonnetz</strong> vs. <strong>chroma_cqt</strong></figcaption></figure><p>Huh! That was some huge data to explore!</p><p>In the next weeks we will focus on building baseline models and looking through related works and their implementations.</p><p>Stay tuned! ♫</p><h3>REFERENCES</h3><ul><li><a href="https://arxiv.org/abs/1612.01840">FMA: A Dataset For Music Analysis</a></li><li><a href="https://musicinformationretrieval.com/">index</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FpPrbSHx2jMUKRdny5I%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FpPrbSHx2jMUKRdny5I&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FpPrbSHx2jMUKRdny5I%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="144" frameborder="0" scrolling="no"><a href="https://medium.com/media/b0d60557cae0d7e7607a555f89a4f374/href">https://medium.com/media/b0d60557cae0d7e7607a555f89a4f374/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QB_TFDObxNivWdnZkjj2Ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a7dafd5995e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f18/week-3-rock-or-not-3a7dafd5995e">[Week #3 — Rock or Not? ♫]</a> was originally published in <a href="https://medium.com/bbm406f18">bbm406f18</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week #2— Rock or Not? ♫]]]></title>
            <link>https://medium.com/bbm406f18/week-2-rock-or-not-e725447220cc?source=rss-92cc2f611161------2</link>
            <guid isPermaLink="false">https://medium.com/p/e725447220cc</guid>
            <category><![CDATA[music]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[genre]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Defne Tunçer]]></dc:creator>
            <pubDate>Sun, 09 Dec 2018 16:59:54 GMT</pubDate>
            <atom:updated>2018-12-09T17:25:49.695Z</atom:updated>
            <content:encoded><![CDATA[<h4>☞ This sure does.</h4><p>We are <a href="https://medium.com/u/92cc2f611161">Defne Tunçer</a> &amp; <a href="https://medium.com/u/7cf636a25dad">Kutay Barçin</a> and this is our second article of series of our Machine Learning Course Project about Music Genre Classification. So let’s give it a start!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/70/1*mR7SQIwgYDOVmpcMcdUinQ.png" /><figcaption><a href="https://github.com/HUbbm409/rock-or-not">GitHub</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*N7qwIW-8lcKlleEZrVe5xA.png" /></figure><h3>DATASET ANALYSIS</h3><p>The <strong>FMA dataset</strong>, a dump of the <strong>Free Music Archive</strong> is suitable for evaluating several tasks in <strong>MIR(Music Information Retrieval)</strong>, a field concerned with browsing, searching, and organizing large music collections. It includes 106,574 tracks from 16,341 artists and 14,854 albums, arranged in a hierarchical taxonomy of 161 genres.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*3WaYbAPTmEAM-gg5HCk6Aw.gif" /></figure><h4>25,000 tracks of 30 seconds, 16 top unbalanced genres were used in this project for computational efficiency and information integrity.</h4><p>After cleaning data (tracks with 0 second of audio and tracks with less than 30 seconds of audio dropped) we are left with total of 24,979 tracks. These tracks were splitted into training set, validation set and test set with sizes of 19983, 2498, 2498, respectively, and all data is shuffled randomly.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=%2F%2Fembed.chartblocks.com%2F1.0%2F%3Fc%3D5c0c1c9e3ba0f6c5588a89ea%26t%3D825600727683187&amp;url=https%3A%2F%2Fpublic.chartblocks.com%2Fc%2F5c0c1c9e3ba0f6c5588a89ea%3Ft%3D825600727683187&amp;image=https%3A%2F%2Fwww.gravatar.com%2Favatar%2F0ce9235d2745fd5498ecb48da0fff7ca%3Fd%3Dmm&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=chartblocks" width="500" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/7261982adef3fff448b871bb2d573c52/href">https://medium.com/media/7261982adef3fff448b871bb2d573c52/href</a></iframe><h3>FEATURE EXPLORATION</h3><p>The features are generated using <strong>LibROSA</strong> (a Python package for music and audio analysis). Each track contains 518 attributes categorized in 11 audio features:</p><p>[‘chroma_cens’, ‘chroma_cqt’, ‘chroma_stft’, ‘mfcc’, ‘rmse’, ‘spectral_bandwidth’, ‘spectral_centroid’, ‘spectral_contrast’, ‘spectral_rolloff’, ‘tonnetz’, ‘zcr’]</p><p>And stored as statics, including [‘kurtosis’, ‘max’, ‘mean’, ‘median’, ‘min’, ‘skew’, ‘std’] for each feature.</p><h4>Let’s go through the features with an example audio:</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F541951149%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Flaurusnobilis%2Frock-or-not&amp;image=http%3A%2F%2Fi1.sndcdn.com%2Fartworks-000455406891-midgwk-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/c57870522e1c4556fe1a43ed305d2435/href">https://medium.com/media/c57870522e1c4556fe1a43ed305d2435/href</a></iframe><h4>Zero Crossing Rate (zcr)</h4><p>The zero crossing rate indicates the number of times that a signal crosses the horizontal axis.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F541968132%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Flaurusnobilis%2Frock-segmented&amp;image=http%3A%2F%2Fi1.sndcdn.com%2Fartworks-000455409102-esrz53-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/528dfd9d50c43244491b9f1acd0e5e17/href">https://medium.com/media/528dfd9d50c43244491b9f1acd0e5e17/href</a></iframe><p>We detect onsets [0.279, 0.766, 1.277, 1.533, 1.765] in seconds and sort the 100-ms segments beginning at each onset by zero crossing rate, then concatenate the sorted segments.</p><h4>Mel Frequency Cepstral Coefficients (mfcc)</h4><p>The mel frequency cepstral coefficients of a signal are a small set of features (usually about 10–20) which concisely describe the overall shape of a spectral envelope. In MIR, it is often used to describe timbre.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*06r-MQ7dTZohIWiMEuIMAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*FiAgwImvZ3bDX399RVel8w.png" /><figcaption><strong>mfcc</strong> (left), <strong>scaled-mfcc </strong>(right)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMgk4EE1SM3WFSfd3z51-w.jpeg" /></figure><blockquote>Next week to be continued with Chroma Features &amp; Spectral Features.. Stay with us!</blockquote><h3>REFERENCES</h3><ul><li><a href="https://arxiv.org/abs/1612.01840">FMA: A Dataset For Music Analysis</a></li><li><a href="https://musicinformationretrieval.com/">index</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FAEdHcgp1zNKxNb4yHg%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FAEdHcgp1zNKxNb4yHg%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FAEdHcgp1zNKxNb4yHg%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="144" frameborder="0" scrolling="no"><a href="https://medium.com/media/12b86d0be06cd6203d3f756e33fa74df/href">https://medium.com/media/12b86d0be06cd6203d3f756e33fa74df/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QB_TFDObxNivWdnZkjj2Ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e725447220cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f18/week-2-rock-or-not-e725447220cc">[Week #2— Rock or Not? ♫]</a> was originally published in <a href="https://medium.com/bbm406f18">bbm406f18</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Week #1 — Rock or Not?]]]></title>
            <link>https://medium.com/bbm406f18/week-1-rock-or-not-f099972afd8?source=rss-92cc2f611161------2</link>
            <guid isPermaLink="false">https://medium.com/p/f099972afd8</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[music]]></category>
            <dc:creator><![CDATA[Defne Tunçer]]></dc:creator>
            <pubDate>Mon, 03 Dec 2018 12:37:35 GMT</pubDate>
            <atom:updated>2018-12-09T17:07:46.026Z</atom:updated>
            <content:encoded><![CDATA[<h3>[Week #1 — Rock or Not? ♫]</h3><h4>☞ This sure does.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwGior0bRxNTWs6PGP80XA.png" /></figure><p>We are <a href="https://medium.com/u/92cc2f611161">Defne Tunçer</a> &amp; <a href="https://medium.com/u/7cf636a25dad">Kutay Barçin</a> and this is our first article of series of our Machine Learning Course Project about Music Genre Classification, we are going to post our progress till the end of our term periodically. So let’s give it a start!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*lOJDogG6nxor0rYmi5rffw.png" /></figure><h3>INTRODUCTION</h3><p>When there is people, there is music. In the history of music, it has found different forms.</p><p>Some rocked the world:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*QxOs71V_igQKT9dRzjgb8w.gif" /><figcaption>Queen — Live Aid Concert</figcaption></figure><p>Some brought peace:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ofg1dytqs_J76h1xPEr-GQ.gif" /><figcaption>John Lennon — Imagine</figcaption></figure><p>Some took us to a galaxy far, far away…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*5sAYw-hD_LOfek-BSGuN2A.gif" /><figcaption>da da da dum<strong> </strong>DA DA dum DA DA ♫</figcaption></figure><p>In today’s world, technology has changed the way music reaches us. During ’50s Jazz was the most popular, while ’70s rock’n roll ruled the world. Nowadays, music is evolved into hundreds of genres — and is just one click away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IrD_smEl9-l972S5WFOMLQ.png" /><figcaption><a href="http://research.google.com/bigpicture/music/">research.google.com/bigpicture/music/</a></figcaption></figure><p>Currently, one of the lead music streaming platform Spotify with 180 million active users, has used a complex algorithm to analyze and categorize upwards of 60 million songs on a molecular level — and the micro-classifications now number 1,387 sub-genres in total.</p><h3>seth troxler on Twitter</h3><p>3 hours of my life to this! an algorithmically-generated scatter-plot of 1387 music genres https://t.co/dvvzQTNsEx</p><p>On every Monday Spotify recommends a playlist for every user according to their tastes — which makes Mondays less sufferable.</p><h3>Amanda Whitbred on Twitter</h3><p>At this point @Spotify&#39;s discover weekly knows me so well that if it proposed I&#39;d say yes</p><p>The dramatic increase in the size of music collections created two challenges: the need to automatically classify a collection, and the need to automatically recommend new songs to a user knowing his/her listening habits. An underlying task in both those challenges is to be able to group songs in semantic categories. In this work we are to classify music genres given input features from music tracks using machine learning techniques.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FXQ1FwjRKun4nS%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fstar-wars-XQ1FwjRKun4nS&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FXQ1FwjRKun4nS%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="325" frameborder="0" scrolling="no"><a href="https://medium.com/media/474e0b423196ea67b0b8957a04eb2cb6/href">https://medium.com/media/474e0b423196ea67b0b8957a04eb2cb6/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QB_TFDObxNivWdnZkjj2Ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f099972afd8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bbm406f18/week-1-rock-or-not-f099972afd8">[Week #1 — Rock or Not?]</a> was originally published in <a href="https://medium.com/bbm406f18">bbm406f18</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>