Coder Social home page Coder Social logo

minoue-xx / classical-music-composers-classification Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 34.05 MB

This contribution provides the code to train the winning model (2nd place) of the competition "Classical music composers classification" (https://www.nishika.com/competitions/8/summary)

License: MIT License

MATLAB 100.00%

classical-music-composers-classification's Introduction

クラシック音楽の作曲家分類

Copyright 2020 Michio Inoue

実行内容(前処理、学習、予測)については MusicComposerClassification_full.md を確認ください。

環境

  • OS: Microsoft Windows 10 Enterprise Version 10.0 (Build 19042)
  • CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz 2.11 GHz
  • RAM: 16.0 GB

使用ツール

  • MATLAB R2020b (9.9.0.1467703)
  • Audio Toolbox
  • Signal Processing Toolbox
  • Machine Learning and Statistics Toolbox
  • Parallel Computing Toolbox (Recommended)

乱数シードなどの設定値の情報。

MusingComposerClassification_preprocess.mlx 内の以下のコードで

rng(100); % 乱数シード固定(再現用)

で設定しています。

モデルの学習から予測まで行う際のソースコードの実行手順

詳細は entry_points.md を確認。 カレントディレクトリをスクリプトがある ./code に移動した上で実行ください。

run('DataExploration.mlx')
run('DivideTestFiles.mlx')
run('DivideTrainFiles.mlx')
run('MusicComposerClassification_preprocess.mlx')
run('MusicComposerClassification_train.mlx')
run('MusicComposerClassification_predict.mlx')

学習済みモデルを使用して予測のみ行う場合のソースコードの実行手順

上の手順で生成されるファイルはそれぞれ

  • ファイル名・作曲家情報などのデータ(trainDataSummary.mat)は PROCESSED_DATA_DIR
  • トレーニングデータの特徴量 trainFeatures.matPROCESSED_DATA_DIR
  • テストデータの特徴量 testFeatures.matPROCESSED_DATA_DIR
  • 予測モデル modelknn.matMODEL_DIR

に事前に保存していますので、以下のスクリプトを実行することで予測のみを実施可能です。 カレントディレクトリをスクリプトがある ./code に移動した上で実行ください。

run('MusicComposerClassification_predict.mlx')

詳細は entry_points.md を確認

コードが実行時に前提とする条件

RAW_DATA_DIR(settings.jsonで指定)に test.csvtrain.csv 、 そして RAW_DATA_DIR 以下の /train/ にトレーニングデータ、/test/ にテストデータがあることを想定しています。

コードの重要な副作用

run('DataExploration.mlx')
run('DivideTestFiles.mlx')
run('DivideTrainFiles.mlx')
run('MusicComposerClassification_preprocess.mlx')
run('MusicComposerClassification_train.mlx')

は事前に保存している以下のファイルを上書きします。

  • ファイル名・作曲家情報などのデータ(trainDataSummary.mat)in PROCESSED_DATA_DIR
  • トレーニングデータの特徴量 trainFeatures.mat in PROCESSED_DATA_DIR
  • テストデータの特徴量 testFeatures.mat in PROCESSED_DATA_DIR
  • 予測モデル modelknn.mat in MODEL_DIR

classical-music-composers-classification's People

Contributors

minoue-xx avatar

Watchers

 avatar  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.