Node experiment for training an online classification model to learn individual music tastes using user feedback to 30-second Spotify previews.
Clone this repo
git clone https://github.com/shunr/orpheus.git
cd code-curator
Install dependencies
npm install
Orpheus uses @ikegami-yukino's python implementation of OLL
pip install -r requirements.txt
Create configuration file
cp config.example.json config.json
npm start
Configuration is done through the objects found in /config.json
Option | Description |
---|---|
clientId |
Client id used to access Spotify API |
clientSecret |
Client secret used to authenticate with Spotify API |
Option | Description |
---|---|
firstInitialization |
Orpheus generates a database of song metadata retrieved from Spotify to overcome rate limits. Required to be true on the first time running Orpheus, then should be set to false to improve startup speed. |
storagePath |
Path to persistent JSON database |
modelDirectory |
Directory used to store classification models for each user session |
Option | Description |
---|---|
minPopularity |
Integer from 1 to 100 representing minimum popularity of a song to be used as a training case. |
tracksPerGenre |
Integer from 1 to 100 of tracks to fetch per genre. A higher number is recommended for accurate training results but will take longer to initialize |
maxQueuedTracks |
Maximum number of tracks to play to a user |
ignoredGenres |
Array of genre names to not include on initialization |
These represent training hyperparameters used by the oll library. Tweak for possibly better results. CW
should be optimal.
Features need to be normalized from the data retrieved from Spotify API.
Optimization cab be done with feature objects in /feature_mapping.json. Generally, mean values should correspond to zero. For example, while loudness
can range for -60
to 0
dB, the mean value is -8 and the feature should be normalized with this in mind.
"loudness": {
"min": -16,
"max": 0,
"key": 5,
"icon": "volume up",
"extremes": [
"quiet",
"loud"
]
}