MCPcopy Create free account
hub / github.com/catboost/catboost / UpdateUseBestModel

Function UpdateUseBestModel

catboost/libs/train_lib/options_helper.cpp:100–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100static void UpdateUseBestModel(
101 bool hasTest,
102 bool hasTestConstTarget,
103 bool hasTestPairs,
104 NCatboostOptions::TOutputFilesOptions* outputFilesOptions
105) {
106 if (outputFilesOptions->UseBestModel.NotSet() && hasTest && (!hasTestConstTarget || hasTestPairs)) {
107 outputFilesOptions->UseBestModel = true;
108 }
109 if (!hasTest && outputFilesOptions->UseBestModel) {
110 CATBOOST_WARNING_LOG << "You should provide test set for use best model. use_best_model parameter has been switched to false value." << Endl;
111 outputFilesOptions->UseBestModel = false;
112 }
113}
114
115namespace {
116 struct TLearningRateCoefficients {

Callers 1

SetDataDependentDefaultsFunction · 0.85

Calls 1

NotSetMethod · 0.80

Tested by

no test coverage detected