plot_clustering_eval.py
Go to the documentation of this file.
00001 import numpy as np
00002 import matplotlib.pyplot as plt
00003 import os
00004 import fnmatch
00005 
00006 
00007 plt.ylim([0,1])
00008 plt.xlim([0,1])
00009 plt.xlabel('1 - Precision')
00010 plt.ylabel('Recall')
00011 
00012 l = []
00013 
00014 for file in os.listdir('.'):
00015     if fnmatch.fnmatch(file, 'res.sgf.40.*.txt'):
00016         f = file.split('.')
00017         print file
00018         data = np.loadtxt(file, dtype=np.float32)
00019         plt.plot(1-data[:,4],data[:,5])
00020         if(len(f) == 4):
00021                 l.append(f[1] + ' ' + f[2] + ' clusters')
00022         else:
00023                 l.append(f[2] + '.' + f[3])
00024 
00025 plt.legend(l, loc=2)
00026 plt.savefig('res.png')
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


furniture_classification
Author(s): Vladyslav Usenko
autogenerated on Sun Oct 6 2013 12:12:33