diff --git a/vd b/vd index 7df977d..7894c17 100755 --- a/vd +++ b/vd @@ -68,7 +68,7 @@ if __name__ == "__main__": traces = traces_path else: - app = Process(program, envs, timeout, ["libcairo"], [], True) + app = Process(program, envs, timeout, [], [], True) prt = TypePrinter(traces_path, program, 0) traces = [] all_files = [] @@ -101,6 +101,5 @@ if __name__ == "__main__": clustered_traces = ClusterScikit(vectorizer, traces, None, "dynamic", None) else: clustered_traces = ClusterConv(vectorizer, traces, None, "dynamic", None, None) - - cluster_sampler(clustered_traces,1) - #print clusters + cluster_sampler(clustered_traces,1) + #print clusters diff --git a/vdiscover/Cluster.py b/vdiscover/Cluster.py index 43dff09..e28106c 100644 --- a/vdiscover/Cluster.py +++ b/vdiscover/Cluster.py @@ -26,7 +26,7 @@ import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl -import pylab as plb +#import pylab as plb from Utils import * from Pipeline import * @@ -269,7 +269,7 @@ def ClusterScikit(model_file, train_file, valid_file, ftype, nsamples): model = make_cluster_pipeline_bow(ftype) X_red = model.fit_transform(train_dict) - mpl.rcParams.update({'font.size': 10}) + #mpl.rcParams.update({'font.size': 10}) plt.figure() colors = 'brgcmykbgrcmykbgrcmykbgrcmyk' diff --git a/vpredictor b/vpredictor index 406e784..2812e3a 100755 --- a/vpredictor +++ b/vpredictor @@ -30,7 +30,6 @@ sys.setrecursionlimit(1024*1024*1024) from vdiscover.Pipeline import * from vdiscover.Recall import Recall from vdiscover.Train import Train -from vdiscover.Cluster import ClusterScikit, ClusterConv if __name__ == "__main__": @@ -128,9 +127,13 @@ if __name__ == "__main__": #elif training_mode_: # Train(out_file, in_file, valid_file, "lstm", ftype, nsamples) elif training_mode_cluster_bow: + from vdiscover.Cluster import ClusterScikit + #Cluster(in_file, valid_file, ftype, nsamples) ClusterScikit(None, in_file, valid_file, ftype, nsamples) elif training_mode_cluster_conv: + from vdiscover.Cluster import ClusterConv + #Cluster(in_file, valid_file, ftype, nsamples) if (model_file is None): print "Clustering using a convolutional model requires a pre-trained model"