changeset 19:08f6c2948349

update readme now crossvalidating
author Dan Stowell <danstowell@users.sourceforge.net>
date Fri, 07 Dec 2012 12:13:56 +0000
parents 6a34565c8a74
children 7d6a647a2d44
files README.md smacpy.py
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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:
 
--- 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):