f66d5ef4c6fd35b1a7d099e0c93cbdfdbdbc7902,Orange/feature/discretization.py,EqualWidth,__call__,#EqualWidth#Any#Any#Any#,107

Before Change


                filters = [f for f in filters if f]

                sql = "select EqualWidth((%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 = _split_eq_width(d, n=self.n)

After Change


                att = attribute.to_sql()
                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)
                points = _split_eq_width(d, n=self.n)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

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: EqualWidth
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: EqualFreq
Method Name: __call__


Project Name: probcomp/bayeslite
Commit Name: cafe7cc9cd3678163cf50ac554b723ce226f268f
Time: 2017-02-04
Author: fsaad@mit.edu
File Name: src/bql.py
Class Name:
Method Name: _create_population