Пример #1
0
 def judge(self, X, y):
     predictions = [int(i) for i in self.predict(X)]
     title = "Clustering of Kepler stars with {} mixtures".format(self._K)
     labels = ["Class: {}".format(i) for i in range(0, self._K)]
     plot_classification(y[1],
                         y[0],
                         predictions,
                         class_labels=labels,
                         title=title)
Пример #2
0
 def judge(self, X, y):
     plot_classification(y[1],
                         y[0], [int(i) for i in self.predict(X)],
                         class_labels=['Red giant branch', 'Red clumps'],
                         title="Gaussian Naive Bayes classification")
Пример #3
0
 def judge(self, X, y):
     plot_classification(y[1],
                         y[0],
                         [1 if i >= 0.5 else 0 for i in self.predict(X)],
                         class_labels=['Red giant branch', 'Red clumps'],
                         title="Baseline Neural Network classification")
Пример #4
0
	def judge(self, X, y):
		plot_classification(y[1], y[0], [int(i) for i in self.predict(X)], class_labels=['Red giant branch', 'Red clumps'], title="Logistic Regression  classification")
Пример #5
0
 def judge(self, X, y):
     plot_classification(y[1],
                         y[0], [int(i) for i in self.predict(X)],
                         class_labels=['Red giant branch', 'Red clumps'],
                         title="K-Nearest Neighbors classification")