# HG changeset patch # User Dan Stowell # Date 1354882436 0 # Node ID 08f6c29483496656c540bd35efa9611f3a8a26ed # Parent 6a34565c8a748b24758fd0172ca446822424c8c2 update readme now crossvalidating diff -r 6a34565c8a74 -r 08f6c2948349 README.md --- a/README.md Fri Dec 07 12:02:00 2012 +0000 +++ b/README.md Fri Dec 07 12:13:56 2012 +0000 @@ -30,9 +30,7 @@ If you invoke the script from the commandline (e.g. "python smacpy.py") it will assume there is a folder called "wavs" and inside that folder are multiple WAV files, each of which has an underscore in the filename, and the class label is the text BEFORE the underscore. -It will train a model using the wavs, and then test it on the same wavs. -This can be a useful test that the script is working; -however, remember that for proper evaluation you must test using files independent from the training files. +It will train a model using the wavs, and then test it on the same wavs (dividing the collection up so it can do a "crossvalidated" test). To train and test on different folders, you can run it like this: diff -r 6a34565c8a74 -r 08f6c2948349 smacpy.py --- a/smacpy.py Fri Dec 07 12:02:00 2012 +0000 +++ b/smacpy.py Fri Dec 07 12:13:56 2012 +0000 @@ -200,6 +200,7 @@ totcorrect, tottotal = (0,0) # Then we go through, each time training on all-but-one and testing on the one left out for index in range(numfolds): + print("Fold %i of %i" % (index+1, numfolds)) chosenfold = folds[index] alltherest = {} for whichfold, otherfold in enumerate(folds):