e0415fc3d8152110cdd6f1fd310ce77c6be62e57,yellowbrick/cluster/silhouette.py,SilhouetteVisualizer,finalize,#SilhouetteVisualizer#,183

Before Change



        // Set the X and Y limits
        // The silhouette coefficient can range from -1, 1
        self.ax.set_xlim([-1, 1])
        // The (n_clusters_+1)*10 is for inserting blank space between
        // silhouette plots of individual clusters, to demarcate them clearly.
        self.ax.set_ylim([0, self.n_samples_ + (self.n_clusters_ + 1) * 10])

After Change



        // l_xlim and u_xlim are lower and upper limits of the x-axis,
        // set according to our calculated maximum and minimum silhouette score along with necessary padding
        l_xlim = max(-1, min(-0.1, round(min(self.silhouette_samples_) - 0.1, 1)))
        u_xlim = min(1, round(max(self.silhouette_samples_) + 0.1, 1))
        self.ax.set_xlim([l_xlim, u_xlim])

        // The (n_clusters_+1)*10 is for inserting blank space between
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: DistrictDataLabs/yellowbrick
Commit Name: e0415fc3d8152110cdd6f1fd310ce77c6be62e57
Time: 2018-10-29
Author: mydigitalanjel@gmail.com
File Name: yellowbrick/cluster/silhouette.py
Class Name: SilhouetteVisualizer
Method Name: finalize


Project Name: nilmtk/nilmtk
Commit Name: 059bae1586b88f8be0e1d7f98165ec53923e975e
Time: 2014-01-16
Author: jack-list@xlk.org.uk
File Name: nilmtk/preprocessing/electricity/single.py
Class Name:
Method Name: insert_zeros


Project Name: EducationalTestingService/skll
Commit Name: a092a5612c48a8a61c7d3deadf3749338ea4b64d
Time: 2019-02-20
Author: nmadnani@ets.org
File Name: tests/test_regression.py
Class Name:
Method Name: check_linear_models