How to plot a learning curve for a keras experiment?
<p>I'm training an RNN using keras and would like to see how the validation accuracy changes with the data set size. Keras has a list called <code>val_acc</code> in its history object which gets appended after every epoch with the respective validation set accuracy (<a href="https://groups.google.com/forum/#!topic/keras-users/_d52pVCR_gg" rel="noreferrer">link to the post in google group</a>). I want to get the average of <code>val_acc</code> for the number of epochs run and plot that against the respective data set size.</p>

<p><strong>Question:</strong> How can I retrieve the elements in the <code>val_acc</code> list and perform an operation like <code>numpy.mean(val_acc)</code>?</p>

<hr>

<p><strong>EDIT:</strong> As @runDOSrun said, getting the mean of the <code>val_acc</code>s doesn't make sense. Let me focus on getting the final <code>val_acc</code>.</p>

<p>I tried what's been suggested by @nemo but no luck. Here's what I got when I print </p>

<p><code>model.fit(X_train, y_train, batch_size = 512, nb_epoch = 5, validation_split = 0.05).__dict__</code> </p>

<p>output: </p>

<pre><code>{'model': &lt;keras.models.Sequential object at 0x000000001F752A90&gt;, 'params': {'verbose': 1, 'nb_epoch': 5, 'batch_size': 512, 'metrics': ['loss', 'val_loss'], 'nb_sample': 1710, 'do_validation': True}, 'epoch': [0, 1, 2, 3, 4], 'history': {'loss': [0.96936064512408959, 0.66933631673890948, 0.63404161288724303, 0.62268789783555867, 0.60833334699708819], 'val_loss': [0.84040999412536621, 0.75676006078720093, 0.73714292049407959, 0.71032363176345825, 0.71341043710708618]}}
</code></pre>

<p>It turns out there's no list as <code>val_acc</code> in my history dictionary. </p>

<p><strong>Question:</strong> How to include <code>val_acc</code> in to the <code>history</code> dictionary?</p>