f66d5ef4c6fd35b1a7d099e0c93cbdfdbdbc7902,Orange/feature/discretization.py,EqualFreq,__call__,#EqualFreq#Any#Any#,80
Before Change
filters = [f for f in filters if f]
sql = "select EqualFreq((%s), (%s), (%s), (%s));"
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 = _discretization.split_eq_freq(d, n=self.n)
return _discretized_var(data, attribute, points)
After Change
filters = [f for f in filters if f]
att = attribute.to_sql()
quantiles = [(i + 1) / self.n for i in range(self.n - 1)]
cur = data._sql_query(["quantile(%s, ARRAY%s)" % (att, str(quantiles))], filters)
points = cur.fetchone()[0]
else:
d = Orange.statistics.distribution.get_distribution(data, attribute)
points = _discretization.split_eq_freq(d, n=self.n)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: biolab/orange3
Commit Name: f66d5ef4c6fd35b1a7d099e0c93cbdfdbdbc7902
Time: 2014-06-18
Author: lan.zagar@fri.uni-lj.si
File Name: Orange/feature/discretization.py
Class Name: EqualFreq
Method Name: __call__
Project Name: biolab/orange3
Commit Name: f66d5ef4c6fd35b1a7d099e0c93cbdfdbdbc7902
Time: 2014-06-18
Author: lan.zagar@fri.uni-lj.si
File Name: Orange/feature/discretization.py
Class Name: EqualWidth
Method Name: __call__
Project Name: biolab/orange3
Commit Name: c9465aece8b604f05c56467076806eafbe0ceef3
Time: 2013-08-20
Author: anze.staric@gmail.com
File Name: Orange/data/sql/table.py
Class Name: SqlTable
Method Name: _query