mfajnberg / tensorevo

0 stars 1 forks source link

Add a method to `Individual` to calculate the error for a batch #3

Closed daniil-berg closed 11 months ago

daniil-berg commented 1 year ago

Once #1 is resolved, it would be convenient to have a method similar to evaluate on Keras models, that accepts a batch of data (inputs + desired outputs) and returns the cost via the individual's cost function. We might call it evaluate_batch for example.

We could then have another method called e.g. update_validation_error (or update_fitness) that takes the same inputs, but updates the internal error_validation field (or maybe we'll want to call it fitness).

mfajnberg commented 11 months ago

individual::error_validation is currently being set directly wherever needed (only by the individual's own methods for now). A function like update_fitness and even the term "fitness" itself might be worth considering in the context of evolving populations, rather than training individuals.