param = (data.table_name, attribute.name, filters if filters else None, self.n)
cur = data._execute_sql_query(sql, param)
points = [a for a, in cur.fetchall()]
else:
d = Orange.statistics.distribution.get_distribution(data, attribute)
points = _split_eq_width(d, n=self.n)
return _discretized_var(data, attribute, points)
After Change
cur = data._sql_query(["min(%s)" % att, "max(%s)" % att], filters)
min, max = cur.fetchone()
dif = (max - min) / self.n
points = [min + (i + 1) * dif for i in range(self.n - 1)]
else:
// TODO: why is the whole distribution computed instead of just min/max
d = Orange.statistics.distribution.get_distribution(data, attribute)