From c196a66303e8e2d9498f355ecf7eb52edfbdf45e Mon Sep 17 00:00:00 2001 From: Kai Staats Date: Thu, 11 Aug 2016 17:45:47 -0600 Subject: [PATCH] bug fix in iris_plot; version updates --- tools/karoo_iris_plot.py | 5 +++-- tools/karoo_multiclassifier.py | 3 ++- tools/karoo_normalise.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/karoo_iris_plot.py b/tools/karoo_iris_plot.py index aa72f5a..b84eb66 100644 --- a/tools/karoo_iris_plot.py +++ b/tools/karoo_iris_plot.py @@ -1,10 +1,11 @@ # Karoo Iris Plot # by Kai Staats, MSc UCT / AIMS and Arun Kumar, PhD -# version 0.9.1.3 +# version 0.9.1.4 import sys import numpy as np import matplotlib.pyplot as mpl +from mpl_toolkits.mplot3d import Axes3D np.set_printoptions(linewidth = 320) # set the terminal to print 320 characters before line-wrapping in order to view Trees @@ -60,7 +61,7 @@ b, c = np.meshgrid(b, c) a = -b + c**2 -### PLOT THE FUNCTION and DATA### +### PLOT THE FUNCTION and DATA ### fig = mpl.figure() ax = fig.add_subplot(111, projection = '3d') diff --git a/tools/karoo_multiclassifier.py b/tools/karoo_multiclassifier.py index b9c7686..40e94e3 100644 --- a/tools/karoo_multiclassifier.py +++ b/tools/karoo_multiclassifier.py @@ -27,11 +27,12 @@ while True: skew = (class_labels / 2) - 1 min_val = 0 - skew - 1 # add a data point to the left + if class_labels & 1: max_val = 0 + skew + 3 # add a data point to the right if odd number of class labels else: max_val = 0 + skew + 2 # add a data point to the right if even number of class labels print '\n\t class_labels =', range(class_labels) -print '\t solutions = [', min_val, '...', max_val - .5,']' +print '\t solutions = [', min_val, '...', max_val,']' print '\t skew =', skew, '\n' if class_type == 'i': diff --git a/tools/karoo_normalise.py b/tools/karoo_normalise.py index 7bfd7b0..fe17038 100644 --- a/tools/karoo_normalise.py +++ b/tools/karoo_normalise.py @@ -1,6 +1,6 @@ # Karoo Data Normalisation # by Kai Staats, MSc UCT -# version 0.9.1.6 +# version 0.9.1.9 import sys import numpy as np