An algorithm to determine sample sizes for optimization with artificial neural networks | Synapse