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()]

After Change


                filters = [f.to_sql() for f in data.row_filters]
                filters = [f for f in filters if f]
                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:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: 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