03c4b0c6e6f8f19514d46defcde14688251f313c,Orange/widgets/unsupervised/owmds.py,OWMDSGraph,compute_sizes,#OWMDSGraph#,58

Before Change


        if self.attr_size is None:
            size_data = np.full((self.n_points,), self.point_width,
                                dtype=float)
        elif self.attr_size == "Stress":
            size_data = scale(stress(self.master.embedding, self.master.effective_matrix))
            size_data = self.MinShapeSize + size_data * self.point_width
        else:
            size_data = \
                self.MinShapeSize + \
                self.scaled_data.get_column_view(self.attr_size)[0][self.valid_data] * \
                self.point_width
        nans = np.isnan(size_data)
        if np.any(nans):
            size_data[nans] = self.MinShapeSize - 2
            self.master.Information.missing_size(self.attr_size)

After Change


        Handle "Stress" size option.
        Everything else is passed to Scatterplot"s compute_sizes

        if self.attr_size != "Stress":
            return super().compute_sizes()

        def scale(a):
            dmin, dmax = np.nanmin(a), np.nanmax(a)
            if dmax - dmin > 0:
                return (a - dmin) / (dmax - dmin)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: biolab/orange3
Commit Name: 03c4b0c6e6f8f19514d46defcde14688251f313c
Time: 2018-08-24
Author: tomaz.hocevar@fri.uni-lj.si
File Name: Orange/widgets/unsupervised/owmds.py
Class Name: OWMDSGraph
Method Name: compute_sizes


Project Name: biolab/orange3
Commit Name: 959f696b68e68ab67ea44b49dd1070c217ee62b1
Time: 2016-09-13
Author: marko.toplak@gmail.com
File Name: Orange/preprocess/transformation.py
Class Name: Transformation
Method Name: __call__


Project Name: biolab/orange3
Commit Name: 1bfc00fa651e0f13e5bbb27953dcacc7288108bf
Time: 2013-02-01
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/statistics/basic_stats.py
Class Name: BasicStats
Method Name: __init__