本文整理汇总了Python中NeuralNetwork.NeuralNetwork.get_auc方法的典型用法代码示例。如果您正苦于以下问题:Python NeuralNetwork.get_auc方法的具体用法?Python NeuralNetwork.get_auc怎么用?Python NeuralNetwork.get_auc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NeuralNetwork.NeuralNetwork
的用法示例。
在下文中一共展示了NeuralNetwork.get_auc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: accuracy
# 需要导入模块: from NeuralNetwork import NeuralNetwork [as 别名]
# 或者: from NeuralNetwork.NeuralNetwork import get_auc [as 别名]
def accuracy(self, number_layers, numbers_neurons, learning_rate):
"""Returns the accuracy of a neural network associated with an Individual"""
net = NeuralNetwork(number_layers, numbers_neurons, learning_rate, X_train=self.dataset.X_train, Y_train=self.dataset.Y_train, X_test=self.dataset.X_test, Y_test=self.dataset.Y_test)
#train neural NeuralNetwork
net.train()
#calcule accurate
acc = net.classify()
#set AUC
self.__auc = net.get_auc()
return acc