Mercurial > hg > chime-home-dataset-annotation-and-baseline-evaluation-code
changeset 5:b523456082ca tip
Update path to dataset and reflect modified chunk naming convention.
author | peterf |
---|---|
date | Mon, 01 Feb 2016 21:35:27 +0000 |
parents | 39258b875228 |
children | |
files | VERSION gmm_baseline_experiments/run_experiments.py |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/VERSION Tue Jul 21 14:16:58 2015 +0100 +++ b/VERSION Mon Feb 01 21:35:27 2016 +0000 @@ -1,1 +1,1 @@ -Version 0.9.1 +Version 0.9.2
--- a/gmm_baseline_experiments/run_experiments.py Tue Jul 21 14:16:58 2015 +0100 +++ b/gmm_baseline_experiments/run_experiments.py Mon Feb 01 21:35:27 2016 +0000 @@ -21,13 +21,13 @@ Settings = {'paths':{}, 'algorithms':{}} Settings['paths'] = {'chime_home': {}, 'resultsdir':'/import/c4dm-scratch/peterf/audex/results/', 'featuresdir':'/import/c4dm-scratch/peterf/audex/features/'} -Settings['paths']['chime_home'] = {'basepath':'/import/c4dm-02/people/peterf/audex/datasets/chime_home/'} +Settings['paths']['chime_home'] = {'basepath':'/import/c4dm-02/people/peterf/audex/datasets/chime_home/release/'} #Read data sets and class assignments Datasets = {'chime_home':{}} #Read in annotations -Chunks = list(Series.from_csv(Settings['paths']['chime_home']['basepath'] + 'release_chunks_refined.csv',header=None)) +Chunks = list(Series.from_csv(Settings['paths']['chime_home']['basepath'] + 'chunks_refined.csv',header=None)) Annotations = [] for chunk in Chunks: Annotations.append(Series.from_csv(Settings['paths']['chime_home']['basepath'] + 'chunks/' + chunk + '.csv')) @@ -38,18 +38,18 @@ for item in Datasets['chime_home']['dataset']['majorityvote']: for label in item: Datasets['chime_home']['labelstats'][label] += 1 -#Labels to consider for multilabel classification -- based on label set used in Stowell and Plumbley (2013) +#Labels to consider for multilabel classification Datasets['chime_home']['consideredlabels'] = ['c', 'b', 'f', 'm', 'o', 'p', 'v'] #Populate binary label assignments for label in Datasets['chime_home']['consideredlabels']: Datasets['chime_home']['dataset'][label] = [label in item for item in Datasets['chime_home']['dataset']['majorityvote']] #Obtain statistics for considered labels sum(Datasets['chime_home']['dataset'][Datasets['chime_home']['consideredlabels']]) / len(Datasets['chime_home']['dataset']) -#Create partition for 10-fold cross-validation. Shuffling ensures each fold has approximately equal proportion of label ocurrences +#Create partition for 10-fold cross-validation. Shuffling ensures each fold has approximately equal proportion of label occurrences np.random.seed(475686) Datasets['chime_home']['crossval_10fold'] = cross_validation.KFold(len(Datasets['chime_home']['dataset']), 10, shuffle=True) -Datasets['chime_home']['dataset']['wavfile'] = Datasets['chime_home']['dataset']['chunkname'].apply(lambda s: Settings['paths']['chime_home']['basepath'] + 'chunks/' + s + '.wav') +Datasets['chime_home']['dataset']['wavfile'] = Datasets['chime_home']['dataset']['chunkname'].apply(lambda s: Settings['paths']['chime_home']['basepath'] + 'chunks/' + s + '.48kHz.wav') #Extract features and assign them to Datasets structure for dataset in Datasets.keys(): @@ -132,4 +132,4 @@ autolabel(rects) plt.draw() plt.savefig('figures/predictionperformance' + EXPER['name'] +'.pdf') -plot_performance(EXPER005) \ No newline at end of file +plot_performance(EXPER005)