From 8477b81deec04d4c4e87cef5668f6160d6a8fa1b Mon Sep 17 00:00:00 2001
From: Abdullah Shah <abdullahshah2018@gmail.com>
Date: Sun, 24 Apr 2022 15:32:18 -0400
Subject: [PATCH] made edit to allow visual for numpy arrays

---
 .DS_Store                                     | Bin 0 -> 6148 bytes
 examples/.DS_Store                            | Bin 0 -> 6148 bytes
 examples/decision_tree/Iris.csv               | 151 ++++++++++++++++++
 examples/decision_tree/main.html              |  86 ++++++++++
 examples/decision_tree/main.py                |  69 ++++++--
 src/.DS_Store                                 | Bin 0 -> 6148 bytes
 src/Iris2.csv                                 | 151 ++++++++++++++++++
 src/WHY.egg-info/PKG-INFO                     |  85 ++++++++++
 src/WHY.egg-info/SOURCES.txt                  |   8 +
 src/WHY.egg-info/dependency_links.txt         |   1 +
 src/WHY.egg-info/not-zip-safe                 |   1 +
 src/WHY.egg-info/requires.txt                 |  32 ++++
 src/WHY.egg-info/top_level.txt                |   1 +
 src/__pycache__/config.cpython-38.pyc         | Bin 0 -> 1237 bytes
 src/__pycache__/data_vis.cpython-38.pyc       | Bin 0 -> 1551 bytes
 .../decisionTreeVisuals.cpython-38.pyc        | Bin 0 -> 2857 bytes
 src/__pycache__/synthetic.cpython-38.pyc      | Bin 0 -> 5305 bytes
 src/config.py                                 |  20 ++-
 src/data_vis.py                               |  93 ++++++++++-
 src/decisionTreeVisuals.py                    | 135 ++++++++++++++++
 20 files changed, 821 insertions(+), 12 deletions(-)
 create mode 100644 .DS_Store
 create mode 100644 examples/.DS_Store
 create mode 100644 examples/decision_tree/Iris.csv
 create mode 100644 examples/decision_tree/main.html
 create mode 100644 src/.DS_Store
 create mode 100644 src/Iris2.csv
 create mode 100644 src/WHY.egg-info/PKG-INFO
 create mode 100644 src/WHY.egg-info/SOURCES.txt
 create mode 100644 src/WHY.egg-info/dependency_links.txt
 create mode 100644 src/WHY.egg-info/not-zip-safe
 create mode 100644 src/WHY.egg-info/requires.txt
 create mode 100644 src/WHY.egg-info/top_level.txt
 create mode 100644 src/__pycache__/config.cpython-38.pyc
 create mode 100644 src/__pycache__/data_vis.cpython-38.pyc
 create mode 100644 src/__pycache__/decisionTreeVisuals.cpython-38.pyc
 create mode 100644 src/__pycache__/synthetic.cpython-38.pyc
 create mode 100644 src/decisionTreeVisuals.py

diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..be2d180de32ed15adc756d6e4a389994b4fc3c8e
GIT binary patch
literal 6148
zcmZQzU|@7AO)+F(5MW?n;9!8zEL;p&0Z1N%F(jFwB5WY@z-AOM<S?W%6epDz7eM7k
zsnHM^4S~TM0-(Ih!H~*O!H~$1%Yc-BlXCKt7#J8%CKcpl7MB<pTxVorW?^Mx=iuPt
z;Ns<q4bI3f4=zb8DJ^zNEQ$v40uoCylA!F6{QMj^J25FNGqpTkK*TveuOu-uFSQ7y
zJUBBYH7T(uCOk7QCBNJ$zceqU7;Fwyf`fyTgEL-0qPp6|#6m~G*ut<@N1@u>+(1Xc
z#MrF1mXkwV)zH>6A-A%sx~8^nCM1j*86h+SKa_@1v%n=CnnzQLlXH^t^K(F&FhZd$
zxF|0tKQA3px-l>_6f+btB!kMf;TSeh?;(c>R0u5`U;#Qx5A_fLrFu}V;2!E88Fl|?
z2#kgR)k6SOJ}5wIKL;q?0HHxr42%p6;4T0o0|N`paz=1JfB_^2(h8zMT0t~OD+42l
z1vUe$m4Okel@Z(x0qFyENkBAMI|CyFSUUqF16Vr)tbS*NXlG!A+RO;;p)f+UGcZE5
zGcZE5!<;utkA}c#2tY%C8A1zy>VH=T23-Arh^kR?Gz3ONU|5C#Ba2J0ixap~#_m5*
zT??vD6QI(d+8<OMGlJ@Ah(3@Kuq+c~Kv4qBfyjZhf~tLRRm{i$smVth0<aJorAI@6
H{viMW`1zne

literal 0
HcmV?d00001

diff --git a/examples/.DS_Store b/examples/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..e5a5d06f6fd3335cce658fa3ef6c0ea9d1163943
GIT binary patch
literal 6148
zcmZQzU|@7AO)+F(5MW?n;9!8zOq>i@0Z1N%F(jFwBFrH3z-AOPWHRJ4<T1oEltAT1
zslgorpt$2@NMT52NM^`nK#sp6hE#^sr1Ii|q@4UD1_p+cNd-BX#U%y?*BP0ZSy<WF
zIXJjDxOll@gER8WgG&-iN{gKmi=siifW(rFBq%#1KR*Y~PD~2ROf8QW5OL1WD@n}E
zODzH^56(<UO-d|^3D3++$uD=xFU?CS2Aczw;Nalo;EWfLsIE3KFw;>mwlJ*KQK&XI
zH_%ZqF*d8M<>U}oHMI3i$gQlZuBok?2?=pVMhMNo52az$ECvP!JYG&IPR>cn&(8sA
z$D^z)xF|0tKQA4U_F-m^(xV|T8UmvsFeE|%RKkJkf9@gS+EGW2hQMeD&@%);<%0sW
zed7S78z3}Dih+@V0o(;(WME){xr-6p4`2YvfwY2XkX8^4(#pUHVu8&7Yh_@BYGnj>
zLqPgKT@nxt*3Q7l0M^dH$N<*P0BhATLbNk5LTzS*_D~oh+8G!j+8G!j+F{NcrAI?x
zGz6d_0P6dJ`u?E$-<5#@SN|WXdXyRsfzc2cjv>Iv;u7rQ1g?~^dk<9Cg6h)*s5Ged
w2UW+6pn4i12Cj;kAOngLP+?GY57G*v!BsIM1EeM&Z3w_ZXp|le0s4mk0Gt?KNB{r;

literal 0
HcmV?d00001

diff --git a/examples/decision_tree/Iris.csv b/examples/decision_tree/Iris.csv
new file mode 100644
index 0000000..1bf42f2
--- /dev/null
+++ b/examples/decision_tree/Iris.csv
@@ -0,0 +1,151 @@
+Id,SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species
+1,5.1,3.5,1.4,0.2,Iris-setosa
+2,4.9,3.0,1.4,0.2,Iris-setosa
+3,4.7,3.2,1.3,0.2,Iris-setosa
+4,4.6,3.1,1.5,0.2,Iris-setosa
+5,5.0,3.6,1.4,0.2,Iris-setosa
+6,5.4,3.9,1.7,0.4,Iris-setosa
+7,4.6,3.4,1.4,0.3,Iris-setosa
+8,5.0,3.4,1.5,0.2,Iris-setosa
+9,4.4,2.9,1.4,0.2,Iris-setosa
+10,4.9,3.1,1.5,0.1,Iris-setosa
+11,5.4,3.7,1.5,0.2,Iris-setosa
+12,4.8,3.4,1.6,0.2,Iris-setosa
+13,4.8,3.0,1.4,0.1,Iris-setosa
+14,4.3,3.0,1.1,0.1,Iris-setosa
+15,5.8,4.0,1.2,0.2,Iris-setosa
+16,5.7,4.4,1.5,0.4,Iris-setosa
+17,5.4,3.9,1.3,0.4,Iris-setosa
+18,5.1,3.5,1.4,0.3,Iris-setosa
+19,5.7,3.8,1.7,0.3,Iris-setosa
+20,5.1,3.8,1.5,0.3,Iris-setosa
+21,5.4,3.4,1.7,0.2,Iris-setosa
+22,5.1,3.7,1.5,0.4,Iris-setosa
+23,4.6,3.6,1.0,0.2,Iris-setosa
+24,5.1,3.3,1.7,0.5,Iris-setosa
+25,4.8,3.4,1.9,0.2,Iris-setosa
+26,5.0,3.0,1.6,0.2,Iris-setosa
+27,5.0,3.4,1.6,0.4,Iris-setosa
+28,5.2,3.5,1.5,0.2,Iris-setosa
+29,5.2,3.4,1.4,0.2,Iris-setosa
+30,4.7,3.2,1.6,0.2,Iris-setosa
+31,4.8,3.1,1.6,0.2,Iris-setosa
+32,5.4,3.4,1.5,0.4,Iris-setosa
+33,5.2,4.1,1.5,0.1,Iris-setosa
+34,5.5,4.2,1.4,0.2,Iris-setosa
+35,4.9,3.1,1.5,0.1,Iris-setosa
+36,5.0,3.2,1.2,0.2,Iris-setosa
+37,5.5,3.5,1.3,0.2,Iris-setosa
+38,4.9,3.1,1.5,0.1,Iris-setosa
+39,4.4,3.0,1.3,0.2,Iris-setosa
+40,5.1,3.4,1.5,0.2,Iris-setosa
+41,5.0,3.5,1.3,0.3,Iris-setosa
+42,4.5,2.3,1.3,0.3,Iris-setosa
+43,4.4,3.2,1.3,0.2,Iris-setosa
+44,5.0,3.5,1.6,0.6,Iris-setosa
+45,5.1,3.8,1.9,0.4,Iris-setosa
+46,4.8,3.0,1.4,0.3,Iris-setosa
+47,5.1,3.8,1.6,0.2,Iris-setosa
+48,4.6,3.2,1.4,0.2,Iris-setosa
+49,5.3,3.7,1.5,0.2,Iris-setosa
+50,5.0,3.3,1.4,0.2,Iris-setosa
+51,7.0,3.2,4.7,1.4,Iris-versicolor
+52,6.4,3.2,4.5,1.5,Iris-versicolor
+53,6.9,3.1,4.9,1.5,Iris-versicolor
+54,5.5,2.3,4.0,1.3,Iris-versicolor
+55,6.5,2.8,4.6,1.5,Iris-versicolor
+56,5.7,2.8,4.5,1.3,Iris-versicolor
+57,6.3,3.3,4.7,1.6,Iris-versicolor
+58,4.9,2.4,3.3,1.0,Iris-versicolor
+59,6.6,2.9,4.6,1.3,Iris-versicolor
+60,5.2,2.7,3.9,1.4,Iris-versicolor
+61,5.0,2.0,3.5,1.0,Iris-versicolor
+62,5.9,3.0,4.2,1.5,Iris-versicolor
+63,6.0,2.2,4.0,1.0,Iris-versicolor
+64,6.1,2.9,4.7,1.4,Iris-versicolor
+65,5.6,2.9,3.6,1.3,Iris-versicolor
+66,6.7,3.1,4.4,1.4,Iris-versicolor
+67,5.6,3.0,4.5,1.5,Iris-versicolor
+68,5.8,2.7,4.1,1.0,Iris-versicolor
+69,6.2,2.2,4.5,1.5,Iris-versicolor
+70,5.6,2.5,3.9,1.1,Iris-versicolor
+71,5.9,3.2,4.8,1.8,Iris-versicolor
+72,6.1,2.8,4.0,1.3,Iris-versicolor
+73,6.3,2.5,4.9,1.5,Iris-versicolor
+74,6.1,2.8,4.7,1.2,Iris-versicolor
+75,6.4,2.9,4.3,1.3,Iris-versicolor
+76,6.6,3.0,4.4,1.4,Iris-versicolor
+77,6.8,2.8,4.8,1.4,Iris-versicolor
+78,6.7,3.0,5.0,1.7,Iris-versicolor
+79,6.0,2.9,4.5,1.5,Iris-versicolor
+80,5.7,2.6,3.5,1.0,Iris-versicolor
+81,5.5,2.4,3.8,1.1,Iris-versicolor
+82,5.5,2.4,3.7,1.0,Iris-versicolor
+83,5.8,2.7,3.9,1.2,Iris-versicolor
+84,6.0,2.7,5.1,1.6,Iris-versicolor
+85,5.4,3.0,4.5,1.5,Iris-versicolor
+86,6.0,3.4,4.5,1.6,Iris-versicolor
+87,6.7,3.1,4.7,1.5,Iris-versicolor
+88,6.3,2.3,4.4,1.3,Iris-versicolor
+89,5.6,3.0,4.1,1.3,Iris-versicolor
+90,5.5,2.5,4.0,1.3,Iris-versicolor
+91,5.5,2.6,4.4,1.2,Iris-versicolor
+92,6.1,3.0,4.6,1.4,Iris-versicolor
+93,5.8,2.6,4.0,1.2,Iris-versicolor
+94,5.0,2.3,3.3,1.0,Iris-versicolor
+95,5.6,2.7,4.2,1.3,Iris-versicolor
+96,5.7,3.0,4.2,1.2,Iris-versicolor
+97,5.7,2.9,4.2,1.3,Iris-versicolor
+98,6.2,2.9,4.3,1.3,Iris-versicolor
+99,5.1,2.5,3.0,1.1,Iris-versicolor
+100,5.7,2.8,4.1,1.3,Iris-versicolor
+101,6.3,3.3,6.0,2.5,Iris-virginica
+102,5.8,2.7,5.1,1.9,Iris-virginica
+103,7.1,3.0,5.9,2.1,Iris-virginica
+104,6.3,2.9,5.6,1.8,Iris-virginica
+105,6.5,3.0,5.8,2.2,Iris-virginica
+106,7.6,3.0,6.6,2.1,Iris-virginica
+107,4.9,2.5,4.5,1.7,Iris-virginica
+108,7.3,2.9,6.3,1.8,Iris-virginica
+109,6.7,2.5,5.8,1.8,Iris-virginica
+110,7.2,3.6,6.1,2.5,Iris-virginica
+111,6.5,3.2,5.1,2.0,Iris-virginica
+112,6.4,2.7,5.3,1.9,Iris-virginica
+113,6.8,3.0,5.5,2.1,Iris-virginica
+114,5.7,2.5,5.0,2.0,Iris-virginica
+115,5.8,2.8,5.1,2.4,Iris-virginica
+116,6.4,3.2,5.3,2.3,Iris-virginica
+117,6.5,3.0,5.5,1.8,Iris-virginica
+118,7.7,3.8,6.7,2.2,Iris-virginica
+119,7.7,2.6,6.9,2.3,Iris-virginica
+120,6.0,2.2,5.0,1.5,Iris-virginica
+121,6.9,3.2,5.7,2.3,Iris-virginica
+122,5.6,2.8,4.9,2.0,Iris-virginica
+123,7.7,2.8,6.7,2.0,Iris-virginica
+124,6.3,2.7,4.9,1.8,Iris-virginica
+125,6.7,3.3,5.7,2.1,Iris-virginica
+126,7.2,3.2,6.0,1.8,Iris-virginica
+127,6.2,2.8,4.8,1.8,Iris-virginica
+128,6.1,3.0,4.9,1.8,Iris-virginica
+129,6.4,2.8,5.6,2.1,Iris-virginica
+130,7.2,3.0,5.8,1.6,Iris-virginica
+131,7.4,2.8,6.1,1.9,Iris-virginica
+132,7.9,3.8,6.4,2.0,Iris-virginica
+133,6.4,2.8,5.6,2.2,Iris-virginica
+134,6.3,2.8,5.1,1.5,Iris-virginica
+135,6.1,2.6,5.6,1.4,Iris-virginica
+136,7.7,3.0,6.1,2.3,Iris-virginica
+137,6.3,3.4,5.6,2.4,Iris-virginica
+138,6.4,3.1,5.5,1.8,Iris-virginica
+139,6.0,3.0,4.8,1.8,Iris-virginica
+140,6.9,3.1,5.4,2.1,Iris-virginica
+141,6.7,3.1,5.6,2.4,Iris-virginica
+142,6.9,3.1,5.1,2.3,Iris-virginica
+143,5.8,2.7,5.1,1.9,Iris-virginica
+144,6.8,3.2,5.9,2.3,Iris-virginica
+145,6.7,3.3,5.7,2.5,Iris-virginica
+146,6.7,3.0,5.2,2.3,Iris-virginica
+147,6.3,2.5,5.0,1.9,Iris-virginica
+148,6.5,3.0,5.2,2.0,Iris-virginica
+149,6.2,3.4,5.4,2.3,Iris-virginica
+150,5.9,3.0,5.1,1.8,Iris-virginica
diff --git a/examples/decision_tree/main.html b/examples/decision_tree/main.html
new file mode 100644
index 0000000..143151d
--- /dev/null
+++ b/examples/decision_tree/main.html
@@ -0,0 +1,86 @@
+
+
+
+
+<!DOCTYPE html>
+<html lang="en">
+  
+  <head>
+    
+      <meta charset="utf-8">
+      <title>Bokeh Plot</title>
+      
+      
+        
+          
+        
+        
+          
+        <script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js"></script>
+        <script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js"></script>
+        <script type="text/javascript">
+            Bokeh.set_log_level("info");
+        </script>
+        
+      
+      
+    
+  </head>
+  
+  
+  <body>
+    
+      
+        
+          
+          
+            
+              <div class="bk-root" id="beff73e3-3f8e-418c-883d-a74c6af6e68b" data-root-id="1083"></div>
+            
+          
+        
+      
+      
+        <script type="application/json" id="1268">
+          {"74e96afd-87a4-44e0-9b4d-be3f8e2c99a0":{"defs":[],"roots":{"references":[{"attributes":{},"id":"1103","type":"WheelZoomTool"},{"attributes":{},"id":"1092","type":"LinearScale"},{"attributes":{},"id":"1131","type":"UnionRenderers"},{"attributes":{"axis_label":"Feature Importance Score","coordinates":null,"formatter":{"id":"1127"},"group":null,"major_label_policy":{"id":"1128"},"ticker":{"id":"1099"}},"id":"1098","type":"LinearAxis"},{"attributes":{"coordinates":null,"data_source":{"id":"1082"},"glyph":{"id":"1120"},"group":null,"hover_glyph":null,"muted_glyph":{"id":"1122"},"nonselection_glyph":{"id":"1121"},"view":{"id":"1124"}},"id":"1123","type":"GlyphRenderer"},{"attributes":{"axis":{"id":"1098"},"coordinates":null,"dimension":1,"group":null,"ticker":null},"id":"1101","type":"Grid"},{"attributes":{},"id":"1099","type":"BasicTicker"},{"attributes":{"ticks":[0,1,2,3]},"id":"1138","type":"FixedTicker"},{"attributes":{"label":{"value":" FeatureNumbers"},"renderers":[{"id":"1123"}]},"id":"1135","type":"LegendItem"},{"attributes":{"source":{"id":"1082"}},"id":"1124","type":"CDSView"},{"attributes":{"active_scroll":{"id":"1103"},"tools":[{"id":"1102"},{"id":"1103"},{"id":"1104"},{"id":"1105"},{"id":"1106"},{"id":"1107"},{"id":"1136"}]},"id":"1109","type":"Toolbar"},{"attributes":{},"id":"1090","type":"LinearScale"},{"attributes":{},"id":"1107","type":"HelpTool"},{"attributes":{},"id":"1132","type":"Selection"},{"attributes":{},"id":"1102","type":"PanTool"},{"attributes":{"overlay":{"id":"1108"}},"id":"1104","type":"BoxZoomTool"},{"attributes":{},"id":"1105","type":"SaveTool"},{"attributes":{},"id":"1106","type":"ResetTool"},{"attributes":{"fill_alpha":{"value":0.6},"fill_color":{"value":"#1f77b4"},"hatch_alpha":{"value":0.6},"hatch_color":{"value":"#1f77b4"},"line_alpha":{"value":0.6},"line_color":{"value":"#1f77b4"},"line_width":{"value":2},"top":{"field":"FeatureNumbers"},"width":{"value":0.7},"x":{"field":"__x__values","transform":{"id":"1118"}}},"id":"1120","type":"VBar"},{"attributes":{"bottom_units":"screen","coordinates":null,"fill_alpha":0.5,"fill_color":"lightgrey","group":null,"left_units":"screen","level":"overlay","line_alpha":1.0,"line_color":"black","line_dash":[4,4],"line_width":2,"right_units":"screen","syncable":false,"top_units":"screen"},"id":"1108","type":"BoxAnnotation"},{"attributes":{"below":[{"id":"1094"}],"center":[{"id":"1097"},{"id":"1101"},{"id":"1134"}],"height":400,"left":[{"id":"1098"}],"output_backend":"webgl","renderers":[{"id":"1123"}],"sizing_mode":"fixed","title":{"id":"1084"},"toolbar":{"id":"1109"},"x_range":{"id":"1086"},"x_scale":{"id":"1090"},"y_range":{"id":"1088"},"y_scale":{"id":"1092"}},"id":"1083","subtype":"Figure","type":"Plot"},{"attributes":{"callback":null,"mode":"vline","renderers":[{"id":"1123"}],"tooltips":[["Features","@__x__values_original"],["FeatureNumbers","@{FeatureNumbers}"]]},"id":"1136","type":"HoverTool"},{"attributes":{"click_policy":"hide","coordinates":null,"group":null,"items":[{"id":"1135"}]},"id":"1134","type":"Legend"},{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"#1f77b4"},"hatch_alpha":{"value":0.2},"hatch_color":{"value":"#1f77b4"},"line_alpha":{"value":0.2},"line_color":{"value":"#1f77b4"},"line_width":{"value":2},"top":{"field":"FeatureNumbers"},"width":{"value":0.7},"x":{"field":"__x__values","transform":{"id":"1118"}}},"id":"1122","type":"VBar"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"hatch_alpha":{"value":0.1},"hatch_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"line_width":{"value":2},"top":{"field":"FeatureNumbers"},"width":{"value":0.7},"x":{"field":"__x__values","transform":{"id":"1118"}}},"id":"1121","type":"VBar"},{"attributes":{"code":"\n                                    var labels = {0: '-1.08 &lt; 1 &lt;= -0.82', 1: '1 &gt; 0.64', 2: '1 &lt;= -0.65', 3: '-1.38 &lt; 2 &lt;= -0.28'};\n                                    return labels[tick];\n                                    "},"id":"1116","type":"FuncTickFormatter"},{"attributes":{"axis":{"id":"1094"},"coordinates":null,"group":null,"ticker":null},"id":"1097","type":"Grid"},{"attributes":{"data":{"FeatureNumbers":{"__ndarray__":"Pgd6/cVz2r8VX23t+H+Ov4So0GaymnS/Rjk6zTSrb78=","dtype":"float64","order":"little","shape":[4]},"__x__values":[0,1,2,3],"__x__values_original":["-1.08 &lt; 1 &lt;= -0.82","1 &gt; 0.64","1 &lt;= -0.65","-1.38 &lt; 2 &lt;= -0.28"]},"selected":{"id":"1132"},"selection_policy":{"id":"1131"}},"id":"1082","type":"ColumnDataSource"},{"attributes":{},"id":"1128","type":"AllLabels"},{"attributes":{},"id":"1088","type":"DataRange1d"},{"attributes":{},"id":"1086","type":"DataRange1d"},{"attributes":{},"id":"1130","type":"AllLabels"},{"attributes":{"range":{"id":"1086"}},"id":"1118","type":"Dodge"},{"attributes":{"axis_label":"Features","coordinates":null,"formatter":{"id":"1116"},"group":null,"major_label_orientation":0.7853981633974483,"major_label_policy":{"id":"1130"},"ticker":{"id":"1138"}},"id":"1094","type":"LinearAxis"},{"attributes":{"coordinates":null,"group":null,"text":"Feature Importance Chart"},"id":"1084","type":"Title"},{"attributes":{},"id":"1127","type":"BasicTickFormatter"}],"root_ids":["1083"]},"title":"Bokeh Application","version":"2.4.2"}}
+        </script>
+        <script type="text/javascript">
+          (function() {
+            const fn = function() {
+              Bokeh.safely(function() {
+                (function(root) {
+                  function embed_document(root) {
+                    
+                  const docs_json = document.getElementById('1268').textContent;
+                  const render_items = [{"docid":"74e96afd-87a4-44e0-9b4d-be3f8e2c99a0","root_ids":["1083"],"roots":{"1083":"beff73e3-3f8e-418c-883d-a74c6af6e68b"}}];
+                  root.Bokeh.embed.embed_items(docs_json, render_items);
+                
+                  }
+                  if (root.Bokeh !== undefined) {
+                    embed_document(root);
+                  } else {
+                    let attempts = 0;
+                    const timer = setInterval(function(root) {
+                      if (root.Bokeh !== undefined) {
+                        clearInterval(timer);
+                        embed_document(root);
+                      } else {
+                        attempts++;
+                        if (attempts > 100) {
+                          clearInterval(timer);
+                          console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");
+                        }
+                      }
+                    }, 10, root)
+                  }
+                })(window);
+              });
+            };
+            if (document.readyState != "loading") fn();
+            else document.addEventListener("DOMContentLoaded", fn);
+          })();
+        </script>
+    
+  </body>
+  
+</html>
\ No newline at end of file
diff --git a/examples/decision_tree/main.py b/examples/decision_tree/main.py
index 3ca1536..9b8f366 100644
--- a/examples/decision_tree/main.py
+++ b/examples/decision_tree/main.py
@@ -1,22 +1,33 @@
 import numpy as np
+import pandas as pd
 
 from sklearn.tree import export_graphviz
 from subprocess import call
 
 from synthetic import *
 from data_vis import *
+#from data_vis import decisionTreemodel
 import config as config
+from decisionTreeVisuals import *
 
 from bokeh.io import curdoc
 from bokeh.models import ColumnDataSource, Select, Slider, Plot, Scatter, Row, Column
 from bokeh.palettes import Spectral6
 
+import pandas_bokeh
+pandas_bokeh.output_notebook()
+pd.set_option('plotting.backend', 'pandas_bokeh')
+# Create Bokeh-Table with DataFrame:
+from bokeh.models.widgets import DataTable, TableColumn
+from bokeh.models import ColumnDataSource
+
 np.random.seed(0)
 
 data = SyntheticData()
 
 config.x, config.y = data.generator()
 
+
 config.spectral = np.hstack([Spectral6] * 20)
 
 colors = [config.spectral[i] for i in config.y]
@@ -25,17 +36,57 @@ config.source = ColumnDataSource(dict(x=config.x[:,0], y=config.x[:,1], colors=c
 
 b = vis_synthetic()
 
-clf_algorithms = [
-    'Decision Tree'
-]
+#decisionTreemodel(config.x, config.y)
+'''
+df = pd.read_csv("/Users/abdullahshah/documents/Spring Term 2021-2022/ci493/NewProject/why-senior-project/examples/decision_tree/Iris.csv")
+
+# data split to features matrix and target vector
+# df stands for the dataframe
+
+# feature matrix
+X = df.iloc[:,0:-1]
+# target vector 
+Y = df.iloc[:,-1:] 
+'''
+test = decisionTreemodel(config.x, config.y)
+#text_output2 = Paragraph(text=test, width=200, height=100)
+
+
+
+#show(p_bar)
+#plots = layout([p_bar])
 
-algorithm_select = Select(value = 'Decision Tree',
-                          title='Select Algorithm:',
-                          width=200,
-                          options=clf_algorithms
-                          )
+fig = figure(x_range=test[0], height=250, title='Feature Importance Scores',
+           toolbar_location=None, tools="")
+# define some data
+x = [1,2,3,4,5]
+y = [4,6,3,7,9]
+# plot a line graph
+fig.vbar( x = test[0], top=test[1], width=0.9)
 
+
+#plot = gridplot(p3, ncols=2, sizing_mode='stretch_both')
+
+#tupleTest = decisionTreemodel()
+# add to document
+
+#tupleTest = decisionTreemodel()
 # add to document
-curdoc().add_root(Row(config.inputs, b))
+curdoc().add_root(Row(config.inputs, b, fig)) #, text_output2))
 curdoc().title = "Decision Tree"
 
+#print(config.x)
+#print(config.y)
+print(test[0])
+print(test[1])
+
+'''
+
+p_bar = test.plot_bokeh.bar(
+    y = 'FeatureNumbers',
+    x = 'Features',
+    ylabel="Feature Importance Score", 
+    title="Feature Importance Chart",
+    alpha=0.6)
+p_bar.xaxis.major_label_orientation = np.pi / 4
+'''
\ No newline at end of file
diff --git a/src/.DS_Store b/src/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..dbb4114a479af11d9b93b8899626c20655c4038c
GIT binary patch
literal 6148
zcmZQzU|@7AO)+F(5MW?n;9!8z3~dZp0Z1N%F(jFwB8(vOz-FW}q%)*5=rUw7<U!>K
zQ6RlM4B-qO43P|a49NP^81hq!lXH^t^K%FpGAchB0;3@?8UmvsFd71*AwYBpfa+dQ
z{m)Ibj!}i9Aut*OBP9et<%0sGZO`BUr5hkLNQ!}xfdSkFU}RumfrSYpxF5g(k^^Z4
z(IBlL8l;th5yS$U0oKaE2-V66?uLN$fx09h8mygx5o|Mv57y4W2)3Dlff1sefe~sm
zBeaLY2+_{K2+_{K2(}&Ox>0&G1V%#u76Qx=h5)GkcV%F})&Ga68YM?VU^E1VWe6~`
zxCFa6fh%R~{sYyup!zfcs^$Px86&7(hKPZbfU0(Ib<6}ARFr@!1BrvQgJ^Jd%*en1
TuFXdq1F#SprAI@6z99erC!-Zr

literal 0
HcmV?d00001

diff --git a/src/Iris2.csv b/src/Iris2.csv
new file mode 100644
index 0000000..1bf42f2
--- /dev/null
+++ b/src/Iris2.csv
@@ -0,0 +1,151 @@
+Id,SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species
+1,5.1,3.5,1.4,0.2,Iris-setosa
+2,4.9,3.0,1.4,0.2,Iris-setosa
+3,4.7,3.2,1.3,0.2,Iris-setosa
+4,4.6,3.1,1.5,0.2,Iris-setosa
+5,5.0,3.6,1.4,0.2,Iris-setosa
+6,5.4,3.9,1.7,0.4,Iris-setosa
+7,4.6,3.4,1.4,0.3,Iris-setosa
+8,5.0,3.4,1.5,0.2,Iris-setosa
+9,4.4,2.9,1.4,0.2,Iris-setosa
+10,4.9,3.1,1.5,0.1,Iris-setosa
+11,5.4,3.7,1.5,0.2,Iris-setosa
+12,4.8,3.4,1.6,0.2,Iris-setosa
+13,4.8,3.0,1.4,0.1,Iris-setosa
+14,4.3,3.0,1.1,0.1,Iris-setosa
+15,5.8,4.0,1.2,0.2,Iris-setosa
+16,5.7,4.4,1.5,0.4,Iris-setosa
+17,5.4,3.9,1.3,0.4,Iris-setosa
+18,5.1,3.5,1.4,0.3,Iris-setosa
+19,5.7,3.8,1.7,0.3,Iris-setosa
+20,5.1,3.8,1.5,0.3,Iris-setosa
+21,5.4,3.4,1.7,0.2,Iris-setosa
+22,5.1,3.7,1.5,0.4,Iris-setosa
+23,4.6,3.6,1.0,0.2,Iris-setosa
+24,5.1,3.3,1.7,0.5,Iris-setosa
+25,4.8,3.4,1.9,0.2,Iris-setosa
+26,5.0,3.0,1.6,0.2,Iris-setosa
+27,5.0,3.4,1.6,0.4,Iris-setosa
+28,5.2,3.5,1.5,0.2,Iris-setosa
+29,5.2,3.4,1.4,0.2,Iris-setosa
+30,4.7,3.2,1.6,0.2,Iris-setosa
+31,4.8,3.1,1.6,0.2,Iris-setosa
+32,5.4,3.4,1.5,0.4,Iris-setosa
+33,5.2,4.1,1.5,0.1,Iris-setosa
+34,5.5,4.2,1.4,0.2,Iris-setosa
+35,4.9,3.1,1.5,0.1,Iris-setosa
+36,5.0,3.2,1.2,0.2,Iris-setosa
+37,5.5,3.5,1.3,0.2,Iris-setosa
+38,4.9,3.1,1.5,0.1,Iris-setosa
+39,4.4,3.0,1.3,0.2,Iris-setosa
+40,5.1,3.4,1.5,0.2,Iris-setosa
+41,5.0,3.5,1.3,0.3,Iris-setosa
+42,4.5,2.3,1.3,0.3,Iris-setosa
+43,4.4,3.2,1.3,0.2,Iris-setosa
+44,5.0,3.5,1.6,0.6,Iris-setosa
+45,5.1,3.8,1.9,0.4,Iris-setosa
+46,4.8,3.0,1.4,0.3,Iris-setosa
+47,5.1,3.8,1.6,0.2,Iris-setosa
+48,4.6,3.2,1.4,0.2,Iris-setosa
+49,5.3,3.7,1.5,0.2,Iris-setosa
+50,5.0,3.3,1.4,0.2,Iris-setosa
+51,7.0,3.2,4.7,1.4,Iris-versicolor
+52,6.4,3.2,4.5,1.5,Iris-versicolor
+53,6.9,3.1,4.9,1.5,Iris-versicolor
+54,5.5,2.3,4.0,1.3,Iris-versicolor
+55,6.5,2.8,4.6,1.5,Iris-versicolor
+56,5.7,2.8,4.5,1.3,Iris-versicolor
+57,6.3,3.3,4.7,1.6,Iris-versicolor
+58,4.9,2.4,3.3,1.0,Iris-versicolor
+59,6.6,2.9,4.6,1.3,Iris-versicolor
+60,5.2,2.7,3.9,1.4,Iris-versicolor
+61,5.0,2.0,3.5,1.0,Iris-versicolor
+62,5.9,3.0,4.2,1.5,Iris-versicolor
+63,6.0,2.2,4.0,1.0,Iris-versicolor
+64,6.1,2.9,4.7,1.4,Iris-versicolor
+65,5.6,2.9,3.6,1.3,Iris-versicolor
+66,6.7,3.1,4.4,1.4,Iris-versicolor
+67,5.6,3.0,4.5,1.5,Iris-versicolor
+68,5.8,2.7,4.1,1.0,Iris-versicolor
+69,6.2,2.2,4.5,1.5,Iris-versicolor
+70,5.6,2.5,3.9,1.1,Iris-versicolor
+71,5.9,3.2,4.8,1.8,Iris-versicolor
+72,6.1,2.8,4.0,1.3,Iris-versicolor
+73,6.3,2.5,4.9,1.5,Iris-versicolor
+74,6.1,2.8,4.7,1.2,Iris-versicolor
+75,6.4,2.9,4.3,1.3,Iris-versicolor
+76,6.6,3.0,4.4,1.4,Iris-versicolor
+77,6.8,2.8,4.8,1.4,Iris-versicolor
+78,6.7,3.0,5.0,1.7,Iris-versicolor
+79,6.0,2.9,4.5,1.5,Iris-versicolor
+80,5.7,2.6,3.5,1.0,Iris-versicolor
+81,5.5,2.4,3.8,1.1,Iris-versicolor
+82,5.5,2.4,3.7,1.0,Iris-versicolor
+83,5.8,2.7,3.9,1.2,Iris-versicolor
+84,6.0,2.7,5.1,1.6,Iris-versicolor
+85,5.4,3.0,4.5,1.5,Iris-versicolor
+86,6.0,3.4,4.5,1.6,Iris-versicolor
+87,6.7,3.1,4.7,1.5,Iris-versicolor
+88,6.3,2.3,4.4,1.3,Iris-versicolor
+89,5.6,3.0,4.1,1.3,Iris-versicolor
+90,5.5,2.5,4.0,1.3,Iris-versicolor
+91,5.5,2.6,4.4,1.2,Iris-versicolor
+92,6.1,3.0,4.6,1.4,Iris-versicolor
+93,5.8,2.6,4.0,1.2,Iris-versicolor
+94,5.0,2.3,3.3,1.0,Iris-versicolor
+95,5.6,2.7,4.2,1.3,Iris-versicolor
+96,5.7,3.0,4.2,1.2,Iris-versicolor
+97,5.7,2.9,4.2,1.3,Iris-versicolor
+98,6.2,2.9,4.3,1.3,Iris-versicolor
+99,5.1,2.5,3.0,1.1,Iris-versicolor
+100,5.7,2.8,4.1,1.3,Iris-versicolor
+101,6.3,3.3,6.0,2.5,Iris-virginica
+102,5.8,2.7,5.1,1.9,Iris-virginica
+103,7.1,3.0,5.9,2.1,Iris-virginica
+104,6.3,2.9,5.6,1.8,Iris-virginica
+105,6.5,3.0,5.8,2.2,Iris-virginica
+106,7.6,3.0,6.6,2.1,Iris-virginica
+107,4.9,2.5,4.5,1.7,Iris-virginica
+108,7.3,2.9,6.3,1.8,Iris-virginica
+109,6.7,2.5,5.8,1.8,Iris-virginica
+110,7.2,3.6,6.1,2.5,Iris-virginica
+111,6.5,3.2,5.1,2.0,Iris-virginica
+112,6.4,2.7,5.3,1.9,Iris-virginica
+113,6.8,3.0,5.5,2.1,Iris-virginica
+114,5.7,2.5,5.0,2.0,Iris-virginica
+115,5.8,2.8,5.1,2.4,Iris-virginica
+116,6.4,3.2,5.3,2.3,Iris-virginica
+117,6.5,3.0,5.5,1.8,Iris-virginica
+118,7.7,3.8,6.7,2.2,Iris-virginica
+119,7.7,2.6,6.9,2.3,Iris-virginica
+120,6.0,2.2,5.0,1.5,Iris-virginica
+121,6.9,3.2,5.7,2.3,Iris-virginica
+122,5.6,2.8,4.9,2.0,Iris-virginica
+123,7.7,2.8,6.7,2.0,Iris-virginica
+124,6.3,2.7,4.9,1.8,Iris-virginica
+125,6.7,3.3,5.7,2.1,Iris-virginica
+126,7.2,3.2,6.0,1.8,Iris-virginica
+127,6.2,2.8,4.8,1.8,Iris-virginica
+128,6.1,3.0,4.9,1.8,Iris-virginica
+129,6.4,2.8,5.6,2.1,Iris-virginica
+130,7.2,3.0,5.8,1.6,Iris-virginica
+131,7.4,2.8,6.1,1.9,Iris-virginica
+132,7.9,3.8,6.4,2.0,Iris-virginica
+133,6.4,2.8,5.6,2.2,Iris-virginica
+134,6.3,2.8,5.1,1.5,Iris-virginica
+135,6.1,2.6,5.6,1.4,Iris-virginica
+136,7.7,3.0,6.1,2.3,Iris-virginica
+137,6.3,3.4,5.6,2.4,Iris-virginica
+138,6.4,3.1,5.5,1.8,Iris-virginica
+139,6.0,3.0,4.8,1.8,Iris-virginica
+140,6.9,3.1,5.4,2.1,Iris-virginica
+141,6.7,3.1,5.6,2.4,Iris-virginica
+142,6.9,3.1,5.1,2.3,Iris-virginica
+143,5.8,2.7,5.1,1.9,Iris-virginica
+144,6.8,3.2,5.9,2.3,Iris-virginica
+145,6.7,3.3,5.7,2.5,Iris-virginica
+146,6.7,3.0,5.2,2.3,Iris-virginica
+147,6.3,2.5,5.0,1.9,Iris-virginica
+148,6.5,3.0,5.2,2.0,Iris-virginica
+149,6.2,3.4,5.4,2.3,Iris-virginica
+150,5.9,3.0,5.1,1.8,Iris-virginica
diff --git a/src/WHY.egg-info/PKG-INFO b/src/WHY.egg-info/PKG-INFO
new file mode 100644
index 0000000..966ca3b
--- /dev/null
+++ b/src/WHY.egg-info/PKG-INFO
@@ -0,0 +1,85 @@
+Metadata-Version: 2.1
+Name: WHY
+Version: 0.0.1.dev0+a83d626
+Summary: Explainable AI system
+Home-page: https://gitlab.cci.drexel.edu/pjm363/why-senior-project
+Author: Philip Monaco, Abdullah Shah, Ibrahim Elsaid, Jashanpreet Singh, William Lu, Songheng Li
+License: LICENSE.md
+Platform: UNKNOWN
+Requires-Python: >=3.8
+Description-Content-Type: text/markdown
+Provides-Extra: lint
+Provides-Extra: docs
+Provides-Extra: all
+
+# WHY Senior Project
+
+## Installing WHY
+
+There are two way in which the `WHY` package can be installed.
+First, follow the [prerequisite](#prerequisites) instructions.
+IF you do not need to rebuild documentation or make modifications to the library, follow the instructions under [User Installation](#user-installation).
+Otherwise, follow the instructions under [Developer Installation](#developer-installation).
+
+### Prerequisites
+
+The `WHY` requires at least `python3.8` and makes use of a number of third-party libraries. The bare minimum packages are automatically installed when you install `WHY` using `pip`. Additional dependencies for developers are contained in `requirements.txt` file. See the
+
+It's recommended that you use `WHY` within a python virtual environment. 
+Virtual environments are now included natively with Python 3 using `venv`. Instructions to create a virtual environment can be found [here](https://docs.python.org/3/library/venv.html).  
+
+API documentation requires the use of `sphinx` which will require installing `Cmake`.  Installation instructions can be found [here](https://cmake.org/install/).
+
+### User Installation
+
+First you must clone the repository using the following bash command.
+```bash
+pip clone git@gitlab.cci.drexel.edu:pjm363/why-senior-project.git
+```
+
+From the root path of the repository (the folder where `setup.py` is located) `WHY` can be installed using `pip` using the following command. 
+
+```bash
+pip install .
+```
+
+### Developer Installation
+Developers need an additional tool, `clang-format` in order to run the precommit script. 
+
+Install via Ubuntu.
+```bash 
+apt-get install clang-format
+```
+Install via MacOSX with homebrew.
+```bash
+brew install clang-format
+```
+Install via [installer](https://llvm.org/builds/) or using chocolatey via.
+```bash
+choco install llvm
+```
+Install WHY using pip:
+```bash
+pip install -e .
+```
+## Running examples
+From the `examples` directory
+```bash
+bokeh serve --show <name of app folder>
+```
+For a developer option the `--dev` flag can be used to auto refresh server from IDE.
+```bash
+bokeh serve --show <name of app folder> --dev
+```
+## Building API Documentation
+
+To build the API Documentation in HTML format for local browsing, execute the following from the root of the repository.
+```
+cd docs/
+make html
+```
+
+This will also cause any examples contained in `examples` to be generated in the example gallery.  
+All documentation is also built automatically when the `./precommit.sh` script is run.
+
+
diff --git a/src/WHY.egg-info/SOURCES.txt b/src/WHY.egg-info/SOURCES.txt
new file mode 100644
index 0000000..5983488
--- /dev/null
+++ b/src/WHY.egg-info/SOURCES.txt
@@ -0,0 +1,8 @@
+README.md
+setup.py
+src/WHY.egg-info/PKG-INFO
+src/WHY.egg-info/SOURCES.txt
+src/WHY.egg-info/dependency_links.txt
+src/WHY.egg-info/not-zip-safe
+src/WHY.egg-info/requires.txt
+src/WHY.egg-info/top_level.txt
\ No newline at end of file
diff --git a/src/WHY.egg-info/dependency_links.txt b/src/WHY.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/WHY.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/src/WHY.egg-info/not-zip-safe b/src/WHY.egg-info/not-zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/WHY.egg-info/not-zip-safe
@@ -0,0 +1 @@
+
diff --git a/src/WHY.egg-info/requires.txt b/src/WHY.egg-info/requires.txt
new file mode 100644
index 0000000..e0c87a2
--- /dev/null
+++ b/src/WHY.egg-info/requires.txt
@@ -0,0 +1,32 @@
+numpy>=1.21
+pandas>=1.3.5
+bokeh>=2.4.2
+matplotlib>=3.5.0
+scikit-learn>=1.0.2
+
+[all]
+numpy>=1.21
+pandas>=1.3.5
+bokeh>=2.4.2
+matplotlib>=3.5.0
+scikit-learn>=1.0.2
+black==21.12b0
+isort==5.10.1
+flake8==4.0.1
+mypy
+Sphinx
+sphinx-gallery
+sphinx-rtd-theme
+m2r2
+
+[docs]
+Sphinx
+sphinx-gallery
+sphinx-rtd-theme
+m2r2
+
+[lint]
+black==21.12b0
+isort==5.10.1
+flake8==4.0.1
+mypy
diff --git a/src/WHY.egg-info/top_level.txt b/src/WHY.egg-info/top_level.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/src/WHY.egg-info/top_level.txt
@@ -0,0 +1 @@
+
diff --git a/src/__pycache__/config.cpython-38.pyc b/src/__pycache__/config.cpython-38.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6a3ce5baa7c74ff19e7faeabff7c6b7887aba51e
GIT binary patch
literal 1237
zcmWIL<>g{vU|=Y<icXrs&cN^(#6iX!3=9ko3=9m#PZ$^&QW&BbQW#U1au{=&qL^}-
zqnLA9qF8cSqgZp<qS$iTqu3ci^2|9Lxtvj)xm;0PAbu2g3S$&c3S$&+3S$&s3QG!W
z3R?<$3P(C?6n`pH3QG!S3RfzB3U@C{lt3zT3Qr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J8>
um=zcWm{}NEm{=HDn3))%@HYzw3xxfbjTOoQ@qe?i6V2mdVdP`xVFUpAl43;w

literal 0
HcmV?d00001

diff --git a/src/__pycache__/data_vis.cpython-38.pyc b/src/__pycache__/data_vis.cpython-38.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2d43249251217d88e6c75c69c399d8e53f0901eb
GIT binary patch
literal 1551
zcmWIL<>g{vU|{I7icVU<!@%$u#6iYP3=9ko3=9m#0*nj{DGX5zDU2yhIgGhXQB1ka
zQOvn4Q7pNvQLMRaQEa*FQS7-KQ5=jQHOx7jxm;0PU^Yt*cNBLDV+u<SPZTeh=8NJ7
z(*jWfU|KL&C`uTrRwPO^g)xOSM=V!7N*pZ4mLriX86^p3v*$?VN=He9*&I1Cxw28R
zU^ZutT&{eSe6B*20+`R0qnN7{r37Yk=P2i@M5%z;JUPm_s!^(7HgAq{u3D5Dn9Y}?
zo~se10cNx0s7I-%FsAV5Xy$4~X@SKM@&YM>EeuiGDJ;PZnnG1dTp<~m#R{3l3W*9S
z`N_p4MVWc&#R_TpMG7g2C5dI3#au5z;i<`fOTallr!+UuC9xziIKQ+gIrSD>aB5C!
za>*^W;GE2q)S_D~0Xg|4x7dS|6H7``i*7Lo<(J=LgXq#^yv3H5nO<6y>Zi$gi?^UC
zwV)_JIkmVrGcR3}@s^lNYI0_AW`15sQEIAlPGWI!W?E)yktX9UzQp9@(xSxV%J|~s
z{GwD%##;g<MTwbt@g=FnCGo`tIhiGzOt-l6OG^q$OXAZqb5d`y6ldg@Yck&AEYD0y
zPc2Exuh3+?#q5$<1`-QMEJ{o-N-W6GWW2>5P?Q>yT2Z3Oc#FTdG$}Vfr8Fn8D83*w
zIa`zQmWWSgZfZzk5=hLoq97+RGcUC$859^W3`$&V3=9m;paf>bz`#%fN;*s_OexGM
zEWIqX3?+;ytSM|M>?s^6oV_fyj5Q1km`a$lSZWv-GBGmLFa$Gba#aOji2;-d;8IXf
zPzXvbDJ{w?wgPiN0`Vo41*!2?3h^na#mPmP1tppJdGTP`TkN1XDo!oQoWRJyP{hc<
zz@W);i?t-PBq#M2Yk6i$NyaU<jMU8ZjFMYixtV$KN%=*f=wqz7#aQ{0m4Sib7F%+D
zPJU6bCQFet0|P^m3`mTnII}AC7FSwkPEI^nT9dVi6C?`?f?J%4DJk*kIh6$&AkBGc
znd!IKiowZ5lj#;?(k)i7+)9QbH3kNTU+Max#i>Qb`iV&?r8zl?8O0fi8Tu~y$)&le
zc_qdA!3CgXs1TA`l&fH5U}UIkWME{Z@9b$}X{_&;S{_i8pOu<iqF<g-sau?ymziIr
zTL2X*E=tx1CEWP3%woNQ%3Hi;nZ@zNm3bu@sU?}oN}z}m0!1Gi6C)D?82)Et7GUCI
zD$)Q2lg=&n`1q9k<oNhoJW2W4sTq2?`6;P6#YLc~E@B4xmIXwB0;ve(?;>^(mje_&
zd=L!<Ir$|enR)4uumRb4i>)9rFD0?~7E?jWE!Mo!+=9wmOnC*jSaK6fGHwaxCYFHo
z<YXr46;y&)x7eUGb3sl?6nk-MVp4ulUKDe2UhysV;_RH%#G<?+P_cK52g=hcDN0Q(
z;$~oAh~kF{<))StWhNIF@qk3d;i4e##216}ZDxL65iiK)91xdh<`?mSe8UeC<AsRj
zBv$5^mJ}BWfJ_mAh(Urx50blziv&S>K!I8$4ARJwlbM@ZBmz<|2x97ii1-pnJ}MFg
zDFy{KI2|An>L9%wHsCy%Y6nWQ#d-`33@pqlj694SOdO0L$iv9N%)<zV%mR!&Ob`|i
LBL_%~iGv>i649{j

literal 0
HcmV?d00001

diff --git a/src/__pycache__/decisionTreeVisuals.cpython-38.pyc b/src/__pycache__/decisionTreeVisuals.cpython-38.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f7866c1875e2cdc23d9ceb9d9f4acae09a1f2275
GIT binary patch
literal 2857
zcmWIL<>g{vU|{&VAT>!^fPvvLh=Yuo7#J8F7#J9eA22X5q%cG=q%fv1<uFDufobL_
z7BI~k#R{g`a@nIe7$IsnqqtHSQ<!t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)$SJwSUYweklwXv0i@7+j_!fI{c1~(yQC<<KxWB~%
z<>{3arKT2vQbiO$Oei<Cq$o4FxCoRvqQv2%pn^2MI5j6V8C0)<lhZAZBv7d6W#$)w
zN{b>;<#vk~B9@a_nO|B`Tm-7nZizs|z!6%k2WjFI7jc48B&cy(#0_HUg9sjwR|P?7
zQ4d6*CP=pA{JgZxbZ|I9vI#hIfC*3zxy4}vZV#o}fihCD76StV3kxW8IT(2uIhc7E
X!H`*ik%tMw;sJ#`BM%b?6Gt=v!5Gm$

literal 0
HcmV?d00001

diff --git a/src/__pycache__/synthetic.cpython-38.pyc b/src/__pycache__/synthetic.cpython-38.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..05a587ef03062c5b844db75cce461eb51378dd81
GIT binary patch
literal 5305
zcmWIL<>g{vU|<lGh)&uk&%p2)#6iX^3=9ko3=9m#uNW8@QW&BbQW#U1au}nSQW#U1
zbC`2kqF5L~Vk|kVxolBvx$IHwxg1d(xtvj)U~$$Qu3YXYZZMlIhbNaeiZ_=piVw_Z
z%HfaVPhm`9&k@KKj1q*32}KE|Fs5+i2<M7Ki7+y_Go)~)aJ4X`a5XbUiKcL;@U$>Q
ziKXzS@U<{RiKhx>Ni2{|;ZGG?$i&EyDwHL)Kr%%D&XY#r$)Ko|Md3kA5eJ!)!W7J)
zDOlyg6<nEDl95`HnXHhKSdyrao|>0hlvt9PpQn(VlUQ7=qfnk%lA(~Cn3I!~n4Dd#
zkeHXEP?lL-nwXPW1y)zg^%4}8ewvK8I6y`er<N3JvfN?|PR&V8F1f`PoRgW7T6Bv!
zD8Kv`n{$3nX>Oh-<1M!2(xR07WKE`9Y{_7;Tg*lI<(iDQID-pPlS_&cbIdduZ}FC8
z7RMLET$l{92N|=%;!TNxfgzP4iZO)&6lYP)DLg6cDI6_~Q7n*fjbcsV4rb8gy~PXn
zu1jJ`VwHz8$d3wX`9%uJMX8A;nR)37i3)HFAwiO#l$DxX0tttd)U?FXoDzkC#G=I9
z)RNSqV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b3NHFp+3V@3O4n`g(K35K34k<oRAppWm09CRBlmGw#

literal 0
HcmV?d00001

diff --git a/src/config.py b/src/config.py
index d31dec3..6ced33f 100644
--- a/src/config.py
+++ b/src/config.py
@@ -1,8 +1,9 @@
 """
 This is a docstring for config.
 """
-from bokeh.models import Select, Slider, Row, Column
+from bokeh.models import Select, Slider, Row, Column, Dropdown, Paragraph
 from bokeh.layouts import column, row
+#from src.data_vis import *t
 
 x = 0 
 y = 0
@@ -52,5 +53,22 @@ inf_slider = Slider(title='Informative Classes',
                     width=400)
 
 
+#tupleTest = decisionTreemodel()
+
+myMessage = 'You have entered nothing yet: (none)'
+text_output = Paragraph(text=myMessage, width=200, height=100)
+
+
 selects = Row(dataset_select, width=420)
 inputs = Column(selects, samples_slider, classes_slider, inf_slider, features_slider)
+
+
+#menu = [("Item 1", "item_1"), ("Item 2", "item_2"), None, ("Item 3", "item_3")]
+
+#clf_algorithms = [
+ #   'Decision Tree'
+#]
+
+#algorithm_select = Dropdown(label="Dropdown button", button_type="warning", menu=menu)
+                        
+    
\ No newline at end of file
diff --git a/src/data_vis.py b/src/data_vis.py
index c8ac781..771bac5 100644
--- a/src/data_vis.py
+++ b/src/data_vis.py
@@ -3,7 +3,33 @@ This is a docstrings for datavis
 """
 from bokeh.models import ColumnDataSource, Select, Slider, Plot, Scatter, Row, Column
 from bokeh.plotting import figure
-import config as config
+import config as config 
+
+import pandas as pd
+import numpy as np
+import math
+import matplotlib.pyplot as plt
+import seaborn as sns
+
+# sklearn ML libraries/modules
+from sklearn import preprocessing
+from sklearn.tree import DecisionTreeClassifier
+from sklearn.metrics import accuracy_score
+from sklearn.model_selection import train_test_split
+
+# bokeh libraries/modules
+from bokeh.io import output_file, show
+from bokeh.layouts import widgetbox
+#from bokeh.models.Column import widgetbox
+from bokeh.models.widgets import Div
+from bokeh.models.widgets import Paragraph
+from bokeh.models.widgets import PreText
+
+# lime modules
+from lime import submodular_pick
+import lime
+from lime.lime_tabular import LimeTabularExplainer
+from lime import submodular_pick
 
 def vis_synthetic():
     """This is a docstring for datavis
@@ -18,4 +44,67 @@ def vis_synthetic():
 
     b.add_glyph(config.source, glyph)
     
-    return b
\ No newline at end of file
+    return b
+
+'''
+def decisionTreemodel():
+    """This is a docstring for decisionTreeVisuals
+
+    Returns:
+        _type_: _description_
+    """
+    # loading data
+    df = pd.read_csv("src/Iris.csv")
+
+    # data split to features matrix and target vector
+    # df stands for the dataframe
+    # feature matrix
+    X = df.iloc[:,0:-1]
+    # target vector 
+    Y = df.iloc[:,-1:]
+
+    # splitting data into training and test sets
+    X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.30, random_state=7)
+
+    # instantiating model
+    model_logreg = DecisionTreeClassifier(max_depth=8, random_state=0)
+
+    # fit model on training set
+    model_logreg.fit(X_train, Y_train)
+
+    # grabbing unique class names
+    class_names=model_logreg.classes_
+
+    # grabbing specific row for model to use to make prediction
+    ex_specie = np.array(X_test.iloc[3]).reshape(1,-1)
+
+    # lime_tabular is a module that contains functions that explain classifiers which use tabular data (matrices).
+    # LimeTabularExplainer is a function that explains predictions of tabular (matrix) data.
+
+    explainer = lime.lime_tabular.LimeTabularExplainer(X_train.values, feature_names=X_train.columns, 
+                                                    class_names=class_names, discretize_continuous=True)
+
+    # grab count of columns from feature matrix
+    featureCount = len(X.columns)
+
+    # explain_instance is a function that generates explanations for a prediction after using LimeTabularExplainer.
+    exp = explainer.explain_instance(X_test.iloc[3],model_logreg.predict_proba,num_features=featureCount,top_labels=1)
+
+    # converting explainations as list
+    tupleTest = exp.as_list()
+
+    # converting tuples to list
+    NewList = [list(x) for x in tupleTest]
+    # converting all elements in list to strings
+    doubleStrList = [[str(s) for s in sublist] for sublist in NewList]
+
+   
+   # print(doubleStrList[0][0])
+    return doubleStrList[0][0]
+
+    
+
+#df = pd.read_csv("src/Iris.csv")
+decisionTreemodel()
+
+'''
diff --git a/src/decisionTreeVisuals.py b/src/decisionTreeVisuals.py
new file mode 100644
index 0000000..b3114ed
--- /dev/null
+++ b/src/decisionTreeVisuals.py
@@ -0,0 +1,135 @@
+"""
+This is a docstrings for decisionTreeVisuals
+"""
+
+import pandas as pd
+import numpy as np
+import math
+import matplotlib.pyplot as plt
+import seaborn as sns
+
+# sklearn ML libraries/modules
+from sklearn import preprocessing
+from sklearn.tree import DecisionTreeClassifier
+from sklearn.metrics import accuracy_score
+from sklearn.model_selection import train_test_split
+
+# bokeh libraries/modules
+from bokeh.io import output_file, show
+from bokeh.layouts import widgetbox
+#from bokeh.models.Column import widgetbox
+from bokeh.models.widgets import Div
+from bokeh.models.widgets import Paragraph
+from bokeh.models.widgets import PreText
+
+# lime modules
+from lime import submodular_pick
+import lime
+from lime.lime_tabular import LimeTabularExplainer
+from lime import submodular_pick
+
+import config as config
+
+def decisionTreemodel(X, Y):
+    """This is a docstring for decisionTreeVisuals
+
+    Returns:
+        _type_: _description_
+    """
+    # loading data
+    #df = pd.read_csv("Iris.csv")
+
+    # data split to features matrix and target vector
+    # df stands for the dataframe
+    # feature matrix
+    #X = df.iloc[:,0:-1]
+    # target vector 
+    #Y = df.iloc[:,-1:]
+
+    # splitting data into training and test sets
+    X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.30, random_state=7)
+
+    # instantiating model
+    model_logreg = DecisionTreeClassifier(max_depth=8, random_state=0)
+
+    # fit model on training set
+    model_logreg.fit(X_train, Y_train)
+
+    # grabbing unique class names
+    class_names=model_logreg.classes_
+
+    # grabbing specific row for model to use to make prediction
+    #ex_specie = X_test[3, ]
+
+    # lime_tabular is a module that contains functions that explain classifiers which use tabular data (matrices).
+    # LimeTabularExplainer is a function that explains predictions of tabular (matrix) data.
+
+    explainer = lime.lime_tabular.LimeTabularExplainer(X_train, feature_names=Y, 
+                                                    class_names=class_names, discretize_continuous=True)
+
+    # grab count of columns from feature matrix
+    featureCount = len(X)
+
+    # explain_instance is a function that generates explanations for a prediction after using LimeTabularExplainer.
+    exp = explainer.explain_instance(X_test[3],model_logreg.predict_proba,num_features=featureCount)
+
+    # converting explainations as list
+    tupleTest = exp.as_list()
+
+    # converting tuples to list
+    NewList = [list(x) for x in tupleTest]
+    # converting all elements in list to strings
+    doubleStrList = [[str(s) for s in sublist] for sublist in NewList]
+
+    doublestring = ",\n ".join([' '.join([str(c) for c in lst]) for lst in NewList])
+
+    # separating comparisons from feature scores
+    Labels1 = [item[0] for item in NewList]
+   # outlst = " ".join([' '.join([str(c) for c in lst]) for lst in doubleStrList])
+
+   # separating feature scores from comparisons
+    featureNums = [item[1] for item in NewList]
+
+    # grabbing count of number of features to determing number of x axis ticks in the chart
+    count = 0
+    newList = []
+    for i in featureNums:
+        count += 1
+        newList.append(count)
+    #p = figure(width=400, height=400)
+
+
+    #fig = plt.bar(newList, featureNums, align='center')
+    #plt.xticks(newList, Labels1)
+    #plt.xticks(rotation=60, ha='right')
+    #plt.title("Feature Importance graph")
+    #plt.show()
+   
+    #print(doubleStrList[0][0])
+    #return Labels1#, doubleStrList[0][1], doubleStrList[0][2], doubleStrList[0][3]
+    #test = ', \n'.join([i for i in Labels1[0:]])
+
+    dfBokehChart = pd.DataFrame(list(zip(Labels1, featureNums)), columns =['Features', 'FeatureNumbers'])
+
+    return (Labels1, featureNums)
+    #return dfBokehChart
+  #  return p
+
+    
+
+#df = pd.read_csv("src/Iris.csv")
+#decisionTreemodel()
+
+# put the below in config
+'''
+clf_algorithms = [
+    'Decision Tree'
+]
+
+algorithm_select = Select(value = 'Decision Tree',
+                        title='Select Algorithm:',
+                        width=200,
+                        options=clf_algorithms
+                        )
+                        
+'''
\ No newline at end of file
-- 
GitLab