Changeset 10140:5803cc112b09 in orange
 Timestamp:
 02/08/12 18:47:26 (2 years ago)
 Branch:
 default
 rebase_source:
 1c85ed9b0c7630a775315d1c070cc265dd139426
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Orange/regression/earth.py
r10131 r10140 175 175 176 176 def __call__(self, instances, weight_id=None): 177 original_domain = instances.domain # Needed by classifier and evimp178 177 instances = self.preproc(instances) 179 178 expanded_class = None … … 505 504 """ Do earth forward pass. 506 505 """ 507 import ctypes, orange508 506 x = numpy.asfortranarray(x, dtype=ctypes.c_double) 509 507 y = numpy.asfortranarray(y, dtype=ctypes.c_double) … … 624 622 Y = numpy.asarray(Y) 625 623 626 var_count = X.shape[1]624 var_count = X.shape[1] 627 625 rss_vec = numpy.zeros(var_count) 628 626 working_set = range(var_count) … … 720 718 """ Return a formated string representation of the earth model. 721 719 """ 722 mask = model.label_mask723 720 if model.multi_flag: 724 721 r_vars = [v for v, m in zip(model.domain.variables, … … 901 898 imp = numpy.array(imp) 902 899 X = range(len(attrs)) 903 l1 = axes1.plot(X, imp[:, 0], "b",)900 l1 = axes1.plot(X, imp[:, 0], "b",) 904 901 axes2 = axes1.twinx() 905 902 906 l2 = axes2.plot(X, imp[:, 1], "g",)907 l3 = axes2.plot(X, imp[:, 2], "r",)903 l2 = axes2.plot(X, imp[:, 1], "g",) 904 l3 = axes2.plot(X, imp[:, 2], "r",) 908 905 909 906 x_axis = axes1.xaxis … … 932 929 if not isinstance(object, class_): 933 930 raise TypeError("Instance of %r expected." % (class_)) 934 from collections import defaultdict931 935 932 from Orange.ensemble.bagging import BaggedClassifier 936 933 … … 950 947 951 948 952 bagged_imp = sorted(bagged_imp.items(), key=lambda t: (t[1][0],t[1][1]), 949 bagged_imp = sorted(bagged_imp.items(), 950 key=lambda t: (t[1][0], t[1][1]), 953 951 reverse=True) 954 952 … … 1016 1014 self.cached = cached 1017 1015 self._cache_ref = None 1016 self._cached_evimp = None 1018 1017 1019 1018 def __call__(self, attr, data, weight_id=None):
Note: See TracChangeset
for help on using the changeset viewer.