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)

After Change


            if type(data) == Orange.data.sql.table.SqlTable:
                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:
                // TODO: why is the whole distribution computed instead of just min/max
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

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


Project Name: numerai/submission-criteria
Commit Name: 3bf5f2de89807642dcd1e030e45226ff3944779b
Time: 2017-11-10
Author: xander@numer.ai
File Name: common.py
Class Name:
Method Name: get_filename