I set up a network to learn Fashion MNIST in the style of Hands On Machine Learning, page 298. When I ran the code multiple times, the accuracy was slightly different each time. This made me wonder if the accuracies were normally distributed around some mean, and that with enough runs, I could accurately determine the population mean of all runs for those parameters.
So I ran this code, which fits the model 1000 times, each with differently shuffled training data:
from tensorflow.keras import datasets, models, layers
import matplotlib.pyplot as plt
(X_train, y_train), _ = datasets.fashion_mnist.load_data()
final_accuracies = []
for i in range(1000):
model = models.Sequential(layers=[
layers.Flatten(input_shape=[28, 28]),
layers.Dense(300, activation="relu"),
layers.Dense(100, activation="relu"),
layers.Dense(10, activation="softmax")])
model.compile(loss="sparse_categorical_crossentropy", optimizer="sgd", metrics=["accuracy"])
history = model.fit(X_train / 255.0, y_train, epochs=5, validation_split=0.2)
final_accuracies.append(history.history['val_accuracy'][-1])
plt.hist(final_accuracies, bins=30)
plt.show()
The resulting distribution of accuracies is shown in the attached histogram.
What kind of distribution is this?! It's clearly not normally distributed. It's got a much longer tail in the direction of lower accuracies.
Is the statistics of what kind of distribution these accuracies are drawn from worked out? If so, please illuminate me.
Also, if this question really fits in better at stats.stackexchange.com, please kindly let me know that all I'll remove it from here and post it there instead.
