Coder Social home page Coder Social logo

safp's Introduction

SAFP

Signal Analysis Final Project

The idea of this project is to do song classification using machine learning. We are using a custom dataset of 30 different songs, each 5 seconds long. Noise is added to the songs to make them more realistic. The training set contains 2,400 samples and the test set contains 600 samples.

Goal

The goal is to have two models that can classify songs with an accuracy of 90% or higher.

Getting Started

  1. Install the requirements:

     pip install -r requirements.txt
    
  2. Train the models:

     python train.py
    
  3. Test the models:

     python test.py
    

Note

The training may take 10-30 minutes depending on your machine. This is because the training step will tune parameters for each model using GridSeach and cross validation. To skip the training step download the model weights in the releases section of this repo.

Models Tested

  • K-Nearst Neighbors
  • Gaussian Naive Bayes
  • Decision Tree
  • Random Forest
  • AdaBoost + Decision Tree

Methods

We are using two different feature extraction methods: Spectrogram and Power Spectrum Density. For more details see the docs/report.pdf.

Results

Results for Spectrogram feature extraction:

Model Accuracy F1 Score
RF 0.998 0.998
DT 0.962 0.961

Results for Power Spectrum Density feature extraction:

Model Accuracy F1 Score
RF 0.977 0.977
DT 0.952 0.951

Confusion Matrices

Spectrogram feature extraction with Random Forest:

Spectrogram feature extraction:

Power Spectrum Density feature extraction:

Power Spectrum Density feature extraction:

safp's People

Contributors

jjsuperpower avatar protocol66 avatar wrbeebe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.