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

Before Change


                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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: allenai/allennlp
Commit Name: 0459261c388bec72937e0268c4316b85279d0bac
Time: 2018-09-24
Author: kl2806@columbia.edu
File Name: allennlp/semparse/contexts/sql_table_context.py
Class Name: SqlTableContext
Method Name: initialize_grammar_str