(self)
return attr_ordering
used by VizRank to evaluate attributes
used by VizRank to evaluate attributes
used by VizRank to evaluate attributes
def _compute_attr_order(self):
        """
        used by VizRank to evaluate attributes
        """
        master = self.master
        attrs = [v for v in master.primitive_variables
                 if v is not self.attr_color]
        data = self.master.data.transform(Domain(attributes=attrs, class_vars=self.attr_color))
        self.data = data
        self.valid_data = np.hstack((~np.isnan(data.X), ~np.isnan(data.Y.reshape(len(data.Y), 1))))
        relief = ReliefF if self.attr_color.is_discrete else RReliefF
        weights = relief(n_iterations=100, k_nearest=self.minK)(data)
        attrs = sorted(zip(weights, attrs), key=lambda x: (-x[0], x[1].name))
        self.attr_ordering = attr_ordering = [a for _, a in attrs]
        return attr_ordering
def _compute_attr_order ( self ) : master = self . master attrs = [ v for v in master . primitive_variables if v is not self . attr_color ] data = self . master . data . transform ( Domain ( attributes = attrs , class_vars = self . attr_color ) ) self . data = data self . valid_data = np . hstack ( ( ~ np . isnan ( data . X ) , ~ np . isnan ( data . Y . reshape ( len ( data . Y ) , 1 ) ) ) ) relief = ReliefF if self . attr_color . is_discrete else RReliefF weights = relief ( n_iterations = 100 , k_nearest = self . minK ) ( data ) attrs = sorted ( zip ( weights , attrs ) , key = lambda x : ( - x [ 0 ] , x [ 1 ] . name ) ) self . attr_ordering = attr_ordering = [ a for _ , a in attrs ] return attr_ordering