@Override public void modifyParmsForCrossValidationMainModel(ModelBuilder[] cvModelBuilders) { _parms._overwrite_with_best_model = false; if (_parms._stopping_rounds == 0 && _parms._max_runtime_secs == 0) return; // No exciting changes to stopping conditions // Extract stopping conditions from each CV model, and compute the best stopping answer _parms._stopping_rounds = 0; _parms._max_runtime_secs = 0; double sum = 0; for (ModelBuilder cvmb : cvModelBuilders) sum += ((DeepLearningModel) DKV.getGet(cvmb.dest())).last_scored().epoch_counter; _parms._epochs = sum / cvModelBuilders.length; if (!_parms._quiet_mode) { warn( "_epochs", "Setting optimal _epochs to " + _parms._epochs + " for cross-validation main model based on early stopping of cross-validation models."); warn( "_stopping_rounds", "Disabling convergence-based early stopping for cross-validation main model."); warn( "_max_runtime_secs", "Disabling maximum allowed runtime for cross-validation main model."); } }
/** * Initialize the ModelBuilder, validating all arguments and preparing the training frame. This * call is expected to be overridden in the subclasses and each subclass will start with * "super.init();". This call is made by the front-end whenever the GUI is clicked, and needs to * be fast; heavy-weight prep needs to wait for the trainModel() call. * * <p>Validate the very large number of arguments in the DL Parameter directly. */ @Override public void init(boolean expensive) { super.init(expensive); _parms.validate(this, expensive); if (expensive && error_count() == 0) checkMemoryFootPrint(); }