diff options
Diffstat (limited to 'evaluate.py')
-rwxr-xr-x | evaluate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/evaluate.py b/evaluate.py index be6e940..321e792 100755 --- a/evaluate.py +++ b/evaluate.py @@ -19,7 +19,7 @@ import time parser = argparse.ArgumentParser() parser.add_argument("-d", "--data", help="Data path", action='store_true', default='data.npz') parser.add_argument("-c", "--conf_mat", help="Show visual confusion matrix", action='store_true') -parser.add_argument("-k", "--kmean", help="Perform kmean clustering with --kmean cluster centers", type=int, default=0) +parser.add_argument("-k", "--kmean", help="Perform kmean clustering with KMEAN cluster centers", type=int, default=0) parser.add_argument("-l", "--leaves", help="Maximum leaf nodes for RF classifier", type=int, default=256) parser.add_argument("-e", "--estimators", help="number of estimators to be used", type=int, default=100) parser.add_argument("-D", "--treedepth", help="depth of trees", type=int, default=5) @@ -49,6 +49,11 @@ def make_histogram(data, model, args): leaves = model.apply(data[i][j].T) leaves = np.apply_along_axis(np.bincount, axis=0, arr=leaves, minlength=args.leaves) histogram[i][j] = leaves.reshape(hist_size) + + print(histogram[0][0].shape) + plt.bar(np.arange(100), histogram[0][0].flatten()) + plt.show() + return histogram def run_model (data, train, test, train_part, args): |