Minimum sampling for maximising the prediction accuracy Suppose that I'm training a machine learning model to predict people's age by a picture of their faces. Lets say that I have a dataset of people from 1 year olds to 100 year olds. But I want to choose just 9 (arbitrary) ages out of this 100 age dataset and still the model should be able to predict the age of a given person. My question is how should I choose the optimal 9 (arbitrary) ages out of the 100 age dataset, so the trained model would perform better across most of the ages?
The model will perform better if I train the model with the entire population, so the question is, how to approximate the performance of this model but with the minimum possible sample selection (not the number of observations, but with minimum number of ages.)
I should address the following questions

*

*How many no of ages should I select from the entire age spectrum

*what are the best ages that I should select to train the model

 A: Since this is a machine learning problem, perhaps you can treat the selection of ages as additional hyperparameters and throw a lot of computing power at the problem.

*

*Encode each age as a hyperparameter which is either on or off.  $i$ is an age.  $a_i = 0, 1$

*predicted age $= f(faces | a_1, a_2, ..., a_n)$ where the training data available is determined by which $a_i =1$

*Fit your machine learning model of choice to the subset of the training data with the available ages.

*Cycle through all combinations of ages on and off (including all subsets) and determine the performance of the algorithm on the validation data. (Cross validate if you have time).

*Pick the age combination that has the best performance on the validation set.

*Evaluate the trained model with the final hyperparameter set on the test data.

Since the model with all the ages included will perform the best as you indicated, you will need to "regularize" or penalize your cost function for including additional ages when evaluating performance on the validation set.  This will prevent you from picking all the ages, but will also cause you to have another hyperparameter to tune.
