def get_distinct_class_values(self): """ Return (sorted) list of all occuring classes. """ if self.class_dvalues == None: self.class_dvalues = pylib_basics.uniq(self.get_class_values()) return self.class_dvalues
def get_distinct_feature_values(self, feature): """ Return (sorted) list of all distinct values for a given feature. """ if not self.feature_no: return None if not self.feature_dvalues: self.feature_dvalues = [None] * self.feature_no if not self.feature_dvalues[feature]: self.feature_dvalues[feature] =\ pylib_basics.uniq(self.get_feature_values(feature)) return self.feature_dvalues[feature]