Sample size and generalization