本文整理汇总了Python中neuralnet.NeuralNet.evaluate_accuracy方法的典型用法代码示例。如果您正苦于以下问题:Python NeuralNet.evaluate_accuracy方法的具体用法?Python NeuralNet.evaluate_accuracy怎么用?Python NeuralNet.evaluate_accuracy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neuralnet.NeuralNet
的用法示例。
在下文中一共展示了NeuralNet.evaluate_accuracy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: plot1
# 需要导入模块: from neuralnet import NeuralNet [as 别名]
# 或者: from neuralnet.NeuralNet import evaluate_accuracy [as 别名]
def plot1(trainf):
print("Running Test 1")
nn = NeuralNet(trainf)
#nn.evaluate(folds, epochs, learning_rate)
nn.evaluate(10, 25, 0.1)
acc1 = nn.evaluate_accuracy()
nn.clean_training_data()
nn.evaluate(10, 50, 0.1)
acc2 = nn.evaluate_accuracy()
nn.clean_training_data()
nn.evaluate(10, 75, 0.1)
acc3 = nn.evaluate_accuracy()
nn.clean_training_data()
nn.evaluate(10, 100, 0.1)
acc4 = nn.evaluate_accuracy()
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_title('Accuracy vs. Epochs for Neural Net')
ax.set_xlabel('Epochs')
ax.set_ylabel('Accuracy')
y = [acc1, acc2, acc3, acc4]
x = [25, 50, 75, 100]
ax.plot(x, y, c='b', marker='o')
示例2: plot2
# 需要导入模块: from neuralnet import NeuralNet [as 别名]
# 或者: from neuralnet.NeuralNet import evaluate_accuracy [as 别名]
def plot2(trainf):
print("Running Test 2")
nn = NeuralNet(trainf)
#nn.evaluate(folds, epochs, learning_rate)
nn.evaluate(5, 50, 0.1)
acc1 = nn.evaluate_accuracy()
nn.clean_training_data()
nn.evaluate(10, 50, 0.1)
acc2 = nn.evaluate_accuracy()
nn.clean_training_data()
nn.evaluate(15, 50, 0.1)
acc3 = nn.evaluate_accuracy()
nn.clean_training_data()
nn.evaluate(20, 50, 0.1)
acc4 = nn.evaluate_accuracy()
nn.clean_training_data()
nn.evaluate(25, 50, 0.1)
acc5 = nn.evaluate_accuracy()
fig1 = plt.figure()
ax1 = fig1.add_subplot(111)
ax1.set_title('Accuracy vs. Folds for Neural Net')
ax1.set_xlabel('Folds')
ax1.set_ylabel('Accuracy')
y = [acc1, acc2, acc3, acc4, acc5]
x = [5, 10, 15, 20, 25]
ax1.plot(x, y, c='b', marker='o')