MCPcopy Create free account
hub / github.com/dmlc/treelite / TaskTypeToString

Function TaskTypeToString

src/enum/task_type.cc:15–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace treelite {
14
15std::string TaskTypeToString(TaskType type) {
16 switch (type) {
17 case TaskType::kBinaryClf:
18 return "kBinaryClf";
19 case TaskType::kRegressor:
20 return "kRegressor";
21 case TaskType::kMultiClf:
22 return "kMultiClf";
23 case TaskType::kLearningToRank:
24 return "kLearningToRank";
25 case TaskType::kIsolationForest:
26 return "kIsolationForest";
27 default:
28 return "";
29 }
30}
31
32TaskType TaskTypeFromString(std::string const& str) {
33 if (str == "kBinaryClf") {

Callers 1

DumpModelAsJSONFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected