Permalink
Browse files

Added graphviz shit

  • Loading branch information...
nblumenfeld committed Nov 14, 2017
1 parent f6e6abd commit e6a2579fd9ae82a95b7caa96515e0599b60a5c2f
Showing with 9 additions and 13 deletions.
  1. +7 −12 .idea/workspace.xml
  2. +2 −1 starCraftProject.py
View
@@ -2,6 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="201d121a-25d8-4c5d-a2b4-70ace26e305f" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/starCraftProject.py" afterPath="$PROJECT_DIR$/starCraftProject.py" />
</list>
<ignored path="Data-Mining-Project.iws" />
@@ -37,8 +38,8 @@
<file leaf-file-name="starCraftProject.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/starCraftProject.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="14" column="11" selection-start-line="14" selection-start-column="11" selection-end-line="14" selection-end-column="11" />
<state relative-caret-position="415">
<caret line="72" column="317" selection-start-line="72" selection-start-column="317" selection-end-line="72" selection-end-column="317" />
<folding>
<element signature="e#107#126#0" expanded="true" />
</folding>
@@ -325,7 +326,7 @@
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3287483" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.26350605" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.26019844" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
@@ -370,13 +371,7 @@
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/starCraftProject.py</url>
<line>11</line>
</line-breakpoint>
</breakpoints>
<option name="time" value="1" />
<option name="time" value="2" />
</breakpoint-manager>
<watches-manager />
</component>
@@ -471,8 +466,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/starCraftProject.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="14" column="11" selection-start-line="14" selection-start-column="11" selection-end-line="14" selection-end-column="11" />
<state relative-caret-position="415">
<caret line="72" column="317" selection-start-line="72" selection-start-column="317" selection-end-line="72" selection-end-column="317" />
<folding>
<element signature="e#107#126#0" expanded="true" />
</folding>
View
@@ -68,8 +68,9 @@
clf = clf.fit(data,build_data_labels)
print clf.predict(test)
midBuild_set = set(test_data_labels)
sc_data = tree.export_graphviz(clf, out_file=None)
sc_data = tree.export_graphviz(clf, out_file=None, feature_names=['ProtossPylon','ProtossSecondPylon','ProtossFirstGas','ProtossSecondGas','ProtossFirstExpansion','ProtossGateway','ProtossGroundWeapons1','ProtossShields1','ProtossCitadel'], class_names=midBuild_set, filled=True, rounded=True, special_characters=True)
graph = graphviz.Source(sc_data)
graph.render("StarCraft")

0 comments on commit e6a2579

Please sign in to comment.