Giter VIP home page Giter VIP logo

music-som's Introduction

music-som

Kohonen self organising maps for music clustering in Python

This repo contains a general implementation of Self Organising Maps in Python.

This repo also contains scripts for experimenting with the GTZAN Dataset containing 30-second music tracks categorised by genre. Download the dataset here.

demo figure

Using the dataset

To use the dataset, extract the files and use the createh5.py file to extract features using Librosa and create a .h5 file containing the training set. Usage:

python createh5.py /path/to/GTZAN filename.h5

Using the SelfOrganisingMap class

The SelfOrganisingMap class has been implemented as a general class to use in your Python experiments independantly from your data. Simply instantiate an object passing the dimension of the map and the dimension of the feature vector.

E.g. using MNIST dataset on a 16x16 Kohonen map

from som import SelfOrganisingMap
map = SelfOrgansingMap(16, 784)

The SelfOrganisingMap class is using the Gaussian function to scale neighbors.

For more info on how Kohonen Self Organising Maps work, refer to this short tutorial.

music-som's People

Contributors

odysseaskr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

music-som's Issues

Testing

Dear Friend.

This is really nice approach.
You have not shown .. the testing results.. from this trained model.
is there any script to get the model in use?

Attribute error

Dear Friend.

There is one error in creation of the .h5 file.

Traceback (most recent call last):
File "createh5.py", line 80, in
create_dataset(sys.argv[1], sys.argv[2])
File "createh5.py", line 69, in create_dataset
out_file.create_dataset(label, data=data_matrix[(data_labels == label).flatten()])
AttributeError: 'bool' object has no attribute 'flatten'

Can you help. why is it so?

Greetings.

Khawar

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.