MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / GetMetricType

Function GetMetricType

python-package/compile/src/io/config.cpp:90–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void GetMetricType(const std::unordered_map<std::string, std::string>& params, std::vector<std::string>* metric) {
91 std::string value;
92 if (Config::GetString(params, "metric", &value)) {
93 std::transform(value.begin(), value.end(), value.begin(), Common::tolower);
94 ParseMetrics(value, metric);
95 }
96 // add names of objective function if not providing metric
97 if (metric->empty() && value.size() == 0) {
98 if (Config::GetString(params, "objective", &value)) {
99 std::transform(value.begin(), value.end(), value.begin(), Common::tolower);
100 ParseMetrics(value, metric);
101 }
102 }
103}
104
105void GetTaskType(const std::unordered_map<std::string, std::string>& params, TaskType* task) {
106 std::string value;

Callers 1

SetMethod · 0.70

Calls 6

transformFunction · 0.85
ParseMetricsFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected