/// /// Returns the last update error for the network in the pocket or the /// MAX_VALUE of double if there is no network in the pocket. /// @param error The name of the error. /// @return The error. /// public double GetLastUpdateError(string error) { double result = Double.MaxValue; PocketManager manager = (PocketManager)managers[error]; result = manager.GetLastUpdateError(); return(result); }
/// /// Save the network to the pocket with the named error calculator. /// @param error The name of the error. /// @param network The network to save. /// @param trainer The trainer training the network. /// public void SaveNetwork(string error, Network network, Trainer trainer) { PocketManager manager = (PocketManager)managers[error]; if (trainer.ErrorManager.GetError(error) < manager.GetLastUpdateError()) { manager.SaveNetwork(network, trainer); } }