diff --git a/tests/exp_add_learned.ini b/tests/exp_add_learned.ini index 12aa6492..49da08e4 100644 --- a/tests/exp_add_learned.ini +++ b/tests/exp_add_learned.ini @@ -6,7 +6,7 @@ epochs = 1 save = True [DATA] databases = ['emodb', 'learned'] -emodb = /home/audeering.local/fburkhardt/audb/emodb/1.1.1/135fc543/ +emodb = /home/felix/data/audb/emodb/ emodb.split_strategy = speaker_split emodb.mapping = {'anger':'angry', 'happiness':'happy', 'sadness':'sad', 'neutral':'neutral'} learned = predict_and_store_test.csv @@ -20,3 +20,4 @@ type = os type = xgb save = True [PLOT] +tsne = True \ No newline at end of file diff --git a/tests/exp_bdtg.ini b/tests/exp_bdtg.ini index f7b8d278..7dfb7b4b 100644 --- a/tests/exp_bdtg.ini +++ b/tests/exp_bdtg.ini @@ -6,7 +6,7 @@ epochs = 1 type = regression [DATA] databases = ['bdtg'] -bdtg = /home/audeering.local/fburkhardt/audb/bundestag-age/3.1.0/135fc543 +bdtg = /home/felix/data/audb/bundestag-age/3.1.0/d3b62a9b/ bdtg.files_tables = ['files'] bdtg.split_strategy = specified bdtg.test_tables = ['age.test'] diff --git a/tests/exp_bdtg_class.ini b/tests/exp_bdtg_class.ini new file mode 100644 index 00000000..2661f36a --- /dev/null +++ b/tests/exp_bdtg_class.ini @@ -0,0 +1,24 @@ +[EXP] +root = ./tests/ +name = exp_bdtg_class +runs = 1 +epochs = 1 +type = classification +[DATA] +databases = ['bdtg'] +type = continuous +bdtg = /home/felix/data/audb/bundestag-age/3.1.0/d3b62a9b/ +bdtg.files_tables = ['files'] +bdtg.split_strategy = specified +bdtg.test_tables = ['age.test'] +bdtg.train_tables = ['age.train'] +bdtg.limit = 1000 +target = age +labels = ['u40', '40ies', '50ies', '60ies', 'ΓΌ70'] +bins = [-1000, 40, 50, 60, 70, 1000] +[FEATS] +type = os +needs_feature_extraction = True +[MODEL] +type = xgb +[PLOT] diff --git a/tests/exp_bdtg_class.py b/tests/exp_bdtg_class.py new file mode 100644 index 00000000..2cfe3535 --- /dev/null +++ b/tests/exp_bdtg_class.py @@ -0,0 +1,41 @@ +# main.py +# Demonstration code to use the ML-experiment framework + +import sys +sys.path.append("./src") +import experiment as exp +import configparser +from util import Util +import constants + +def main(config_file): + # load one configuration per experiment + config = configparser.ConfigParser() + config.read(config_file) + util = Util() + + # create a new experiment + expr = exp.Experiment(config) + print(f'running {expr.name}, nkululeko version {constants.VERSION}') + + # load the data + expr.load_datasets() + + # split into train and test + expr.fill_train_and_tests() + util.debug(f'train shape : {expr.df_train.shape}, test shape:{expr.df_test.shape}') + + # extract features + expr.extract_feats() + util.debug(f'train feats shape : {expr.feats_train.df.shape}, test feats shape:{expr.feats_test.df.shape}') + + # initialize a run manager + expr.init_runmanager() + + # run the experiment + expr.run() + + print('DONE') + +if __name__ == "__main__": + main('./tests/exp_bdtg_class.ini') \ No newline at end of file diff --git a/tests/exp_cross.ini b/tests/exp_cross.ini index d7357554..76d19db9 100644 --- a/tests/exp_cross.ini +++ b/tests/exp_cross.ini @@ -10,10 +10,12 @@ trains = ['emodb'] tests = ['polish'] target = emotion strategy = cross_data -emodb = /home/audeering.local/fburkhardt/audb/emodb/1.1.1/135fc543/ +emodb = /home/felix/data/audb/emodb/ emodb.mapping = {'anger':'angry', 'happiness':'happy', 'sadness':'sad', 'neutral':'neutral'} -polish = /home/audeering.local/fburkhardt/audb/polish-emotional-speech/1.0.0/135fc543/ +emodb.value_counts = True +polish = /home/felix/data/audb/polish-emotional-speech/ polish.mapping = {'anger':'angry', 'joy':'happy', 'sadness':'sad', 'neutral':'neutral'} +polish.value_counts = True labels = ['angry', 'happy', 'neutral', 'sad'] [FEATS] type = os @@ -26,4 +28,6 @@ device = cpu save = True [PLOT] plot_epoch_progression = 1 -plot_best_model = 1 \ No newline at end of file +plot_best_model = 1 +value_counts = True +tsne = True \ No newline at end of file diff --git a/tests/exp_emodb.ini b/tests/exp_emodb.ini index 75198bcb..b4a1aff8 100644 --- a/tests/exp_emodb.ini +++ b/tests/exp_emodb.ini @@ -6,9 +6,10 @@ epochs = 1 save = True [DATA] databases = ['emodb'] -emodb = /home/audeering.local/fburkhardt/audb/emodb/1.1.1/135fc543/ +emodb = /home/felix/data/audb/emodb/ emodb.split_strategy = speaker_split emodb.mapping = {'anger':'angry', 'happiness':'happy', 'sadness':'sad', 'neutral':'neutral'} +emodb.value_counts = True target = emotion labels = ['angry', 'happy', 'neutral', 'sad'] [FEATS] @@ -17,3 +18,5 @@ type = os type = xgb save = True [PLOT] +value_counts = True +tsne = True \ No newline at end of file diff --git a/tests/exp_msp.ini b/tests/exp_msp.ini index 8da8bb8f..6d13edce 100644 --- a/tests/exp_msp.ini +++ b/tests/exp_msp.ini @@ -5,7 +5,7 @@ runs = 1 epochs = 1 [DATA] databases = ['msp'] -msp = /home/audeering.local/fburkhardt/audb/msppodcast/2.4.0/135fc543 +msp = /home/felix/data/audb/msppodcast/2.4.0/135fc543 msp.files_tables = ['files.test-1', 'files.train'] msp.target_tables = ['emotion.test-1', 'emotion.train'] msp.split_strategy = specified