We present a comparison between Gaussian processes (GPs) and artificial neural networks (ANNs) as methods for determining photometric redshifts for galaxies, given training set data. In particular, we compare their degradation in performance as the training set size is reduced, either at random or according to an upper limit in magnitude, as might be caused by the observational limitations of spectroscopy. We find that performance with large, complete training sets is very similar. Training sets with brighter magnitude limits than the test data do not strongly affect the performance of either algorithm, until the limits are so severe that they remove almost all of the high-redshift training objects; in this case the GP algorithm produces smoother and less biased results at the expense of larger scatter. If the size of training set is reduced by random sampling, the RMS errors of both methods increase, but they do so to a lesser extent and in a much smoother manner for the case of GP regression; for the example presented ANNz has RMS errors ~20% worse than GP regression in the small training-set limit. GP regression is thus an attractive algorithm for photometric redshift estimation, particularly for deep, high-redshift surveys where training data are generally sparse.