Miha Stajdohar avatar Miha Stajdohar committed 0e7bdd3

Bug fixes.

Comments (0)

Files changed (3)


     build_map = mm.BuildModelMap(fname)
-    trees = 300
+    trees = 200
     depth = 1000
     print "build models..."
-    models, rf_classifier = build_map.build_rf_models(trees=trees, max_depth=depth)
+    models, models_2, rf_classifier, _ = build_map.build_rf_models(trees=trees, max_depth=depth)
     print "build model data..."
     table = build_map.build_model_data(models)
+    table_2 = build_map.build_model_data(models_2)
     print "build matrix..."
     smx = build_map.build_model_matrix(models)
-    mm.save(os.path.join(ROOT, "_ensemble_", "rf_%s_%d_depth_None_%s" % (DATASET, trees, sys.platform)), smx, table, build_map.data())
+    smx_2 = build_map.build_model_matrix(models_2)
+    mm.save(os.path.join(ROOT, "_ensemble_", "rf_%s_%d_depth_None_%s" % (DATASET, len(models), sys.platform)), smx, table, build_map.data())
+    mm.save(os.path.join(ROOT, "_ensemble_", "rf_%s_%d_depth_None_%s" % (DATASET, len(models_2), sys.platform)), smx_2, table_2, build_map.data())
+DO = ["iris", "breast-cancer-wisconsin", "voting", "zoo", "mushroom", "adult_sample", "glass", "marketing", "primary-tumor", "vehicle", "wdbc", "dermatology"]
+DO = ["marketing"]
+for d in DO:
+    build_rd_map(d)


 import matplotlib
-import os.path
+import math, os.path, random, re, sys
 import cPickle as pickle
 import matplotlib.pyplot as plt
+import numpy as np
-from Orange import data, ensemble, evaluation, utils
+from itertools import groupby
+from operator import itemgetter
+from Orange import clustering, data, distance, ensemble, evaluation, network, utils
 from Orange.classification.tree import SimpleTreeLearner
+import _modelmaps as mm
 ROOT = "/home/miha/work/res/modelmaps"
 #ROOT = "C:\\Users\\Miha\\work\\res\\modelmaps"
 #ROOT = "/Network/Servers/xgridcontroller.private/lab/mihas/modelmaps"


     cas, aucs, briers = pickle.load(open(os.path.join(ROOT, "_ensemble_", "scores_%s_%d_to_%d_depth_%s_instances_%d.pkl" % (DATASET, a, b, depth, min_instances)), "rb"))
     fig = plt.figure(figsize=(3, 6), dpi=300)
+    fig.subplots_adjust(wspace=0.3, hspace=0.6, top=0.9, bottom=0.05, left=0.1, right=0.95)
     ax = fig.add_subplot(3, 1, 1)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.