def csv_test(): csv_file = os.path.join(os.path.split(H.__file__)[0],'test','csv_test.csv') data = H.csv2hyperdatabase(csv_file) # data.filter_all_null() for name in data.column_names: data.add_filter(name, H.filtering.notnull(name= 'notnull_' + name)) H.hyperscatter(data, x=('poolingfactors', H.get_el(0,0)), y=('poolingfactors', H.get_el(1,0)), c = 'bestkendall', title='csv1') # data.filter('bestkendall', filter_lt(.66)) data.add_filter('poolingfactors', H.filtering.outside(2,8, parse_func=H.get_el(0,0))) data.add_filter('poolingfactors', H.filtering.between(4,5, parse_func=H.get_el(1,0))) print data H.hyperscatter(data, x=('poolingfactors', H.get_el(0,0)), y=('poolingfactors', H.get_el(1,0)), c = 'bestkendall', title='csv2')
import os import pylab import hyperplot as H ## Fetching the database on the sql server. #user = '******' #host = 'gershwin.iro.umontreal.ca' #db = 'hamelphi_db' #table = 'agg_feat2_view' #data = H.sql2hyperdatabase(user=user,host=host,table=table,db=db) # Loading from CSV instead (Because of permissions) csv_file = os.path.join(os.path.split(H.__file__)[0],'demo','pfc_data.csv') data = H.csv2hyperdatabase(csv_file) # Applying a couple of filters. data.add_filter('jobman_status', H.filtering.eq(2)) data.add_filter('pcadim', H.filtering.eq(120)) data.add_filter('overlap', H.filtering.eq(2)) data.add_filter('agglen', H.filtering.between(100,200)) data.add_filter('validaucroctag', H.filtering.gt(0.5)) data.add_filter('time', H.filtering.between(1000,20000)) data.add_filter('dataset',H.filtering.notfind('mfcc')) # Filtering categories, and changing some category names. black_list=[] #box_names={} black_list = ['skew','kurt','moments','moments_max','moments_max_min'] box_names = {'skew':'3rd moment', 'kurt':'4th moment',