we should pass the optional validation data on to the stochastic_gradient_descent_step method and update the validation error at the end of that (if necessary).
While we are at it, we can also get rid of the match expression by simply calling the option's map method with a closure that does the updating since the None case is no-op.
After #3 is resolved, instead of re-calculating the validation error within the
for
-loop of the SGD methodhttps://github.com/mfajnberg/tensorevo/blob/b7119f3c89b17d45ae3c3a49022f0f93a555ba97/src/individual.rs#L172-L182
we should pass the optional validation data on to the
stochastic_gradient_descent_step
method and update the validation error at the end of that (if necessary).While we are at it, we can also get rid of the
match
expression by simply calling the option'smap
method with a closure that does the updating since theNone
case is no-op.