[Scipy-svn] r3151 - trunk/Lib/sandbox/svm/examples

scipy-svn@scip... scipy-svn@scip...
Mon Jul 9 07:39:23 CDT 2007


Author: cdavid
Date: 2007-07-09 07:39:18 -0500 (Mon, 09 Jul 2007)
New Revision: 3151

Modified:
   trunk/Lib/sandbox/svm/examples/classification2.py
Log:
Add labels to contour for 2nd classification example

Modified: trunk/Lib/sandbox/svm/examples/classification2.py
===================================================================
--- trunk/Lib/sandbox/svm/examples/classification2.py	2007-07-09 11:15:15 UTC (rev 3150)
+++ trunk/Lib/sandbox/svm/examples/classification2.py	2007-07-09 12:39:18 UTC (rev 3151)
@@ -46,5 +46,7 @@
     print "=============== iteration %d / %d ============" % (i, cv.size)
     cv[i] = train_svm(c[i], g[i])
 
-v = P.contour(gr[0], gr[1], cv.reshape(g_range.size, c_range.size), 8)
+v = P.contourf(N.log2(gr[0]), N.log2(gr[1]), cv.reshape(g_range.size, c_range.size), 10)
+v = P.contour(N.log2(gr[0]), N.log2(gr[1]), cv.reshape(g_range.size, c_range.size), 10)
+P.clabel(v, inline = 1, fontsize = 10)
 P.show()



More information about the Scipy-svn mailing list