Beispiel #1
0
 def test_ax(self):
     np.random.seed(0)
     clf = KMeans()
     scikitplot.clustering_factory(clf)
     fig, ax = plt.subplots(1, 1)
     out_ax = clf.plot_elbow_curve(self.X)
     assert ax is not out_ax
     out_ax = clf.plot_elbow_curve(self.X, ax=ax)
     assert ax is out_ax
Beispiel #2
0
 def test_ax(self):
     np.random.seed(0)
     clf = KMeans()
     scikitplot.clustering_factory(clf)
     fig, ax = plt.subplots(1, 1)
     out_ax = clf.plot_elbow_curve(self.X)
     assert ax is not out_ax
     out_ax = clf.plot_elbow_curve(self.X, ax=ax)
     assert ax is out_ax
Beispiel #3
0
 def test_cluster_ranges(self):
     np.random.seed(0)
     clf = KMeans()
     scikitplot.clustering_factory(clf)
     ax = clf.plot_elbow_curve(self.X, cluster_ranges=range(1, 10))
     ax = clf.plot_elbow_curve(self.X)
Beispiel #4
0
 def test_cluster_ranges(self):
     np.random.seed(0)
     clf = KMeans()
     scikitplot.clustering_factory(clf)
     ax = clf.plot_elbow_curve(self.X, cluster_ranges=range(1, 10))
     ax = clf.plot_elbow_curve(self.X)