f66d5ef4c6fd35b1a7d099e0c93cbdfdbdbc7902,Orange/feature/discretization.py,EqualFreq,__call__,#EqualFreq#Any#Any#,80
Before Change
filters = [f.to_sql() for f in data.row_filters]
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.to_sql() for f in data.row_filters]
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)
return _discretized_var(data, attribute, points)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
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: tensorflow/tensorboard
Commit Name: b70a477198c4b602b98417c6dacdf3988ef8b2ff
Time: 2018-03-09
Author: nfelt@users.noreply.github.com
File Name: tensorboard/plugins/histogram/histograms_plugin.py
Class Name: HistogramsPlugin
Method Name: histograms_impl