Skip to content

Commit

Permalink
add multidb tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
bagustris committed Apr 19, 2024
1 parent deaf681 commit d3fc1f7
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
Binary file added docs/source/images/heatmap-multidb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions docs/source/multidb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Multidb module for database comparison

With nkululeko since version 0.77.7 there is a new interface named multidb, which lets you compare several databases.

You can state their names in the [EXP] section and they will then be processed one after each other and against each other; the results are stored in a file called heatmap.png in the experiment folder.

>> YOU NEED TO OMIT THE PROJECT NAME!
Here is an example of such an INI file

```ini
[EXP]
root = ./experiments/emodbs/
# DON'T give it a name,
# this will be the combination
# of the two databases:
# traindb_vs_testdb
epochs = 1
databases = ['emodb', 'polish']
[DATA]
root_folders = ./experiments/emodbs/data_roots.ini
target = emotion
labels = ['neutral', 'happy', 'sad', 'angry']
[FEATS]
type = ['os']
[MODEL]
type = xgb
```
You can (but don't have to) state the specific dataset values in an external file like above.

```ini
[DATA]
emodb = ./data/emodb/emodb
emodb.split_strategy = specified
emodb.test_tables = ['emotion.categories.test.gold_standard']
emodb.train_tables = ['emotion.categories.train.gold_standard']
emodb.mapping = {'anger':'angry', 'happiness':'happy', 'sadness':'sad', 'neutral':'neutral'}
polish = ./data/polish_emo
polish.mapping = {'anger':'angry', 'joy':'happy', 'sadness':'sad', 'neutral':'neutral'}
polish.split_strategy = speaker_split
polish.test_size = 30
```

Finally, you can run the experiment with the following command:

```bash
python -m nkululeko.multidb --config my_conf.ini
```

Here's a result with two databases.

![heatmap](./images/heatmap-multidb.png)

Source: http://blog.syntheticspeech.de/2024/01/02/nkululeko-compare-several-databases/

0 comments on commit d3fc1f7

Please sign in to comment.