Support categorical split in tree model dump. (#7036)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Copyright 2014 by Contributors
|
||||
* Copyright 2014-2021 by Contributors
|
||||
* \file feature_map.h
|
||||
* \brief Feature map data structure to help visualization and model dump.
|
||||
* \author Tianqi Chen
|
||||
@@ -26,7 +26,8 @@ class FeatureMap {
|
||||
kIndicator = 0,
|
||||
kQuantitive = 1,
|
||||
kInteger = 2,
|
||||
kFloat = 3
|
||||
kFloat = 3,
|
||||
kCategorical = 4
|
||||
};
|
||||
/*!
|
||||
* \brief load feature map from input stream
|
||||
@@ -82,6 +83,7 @@ class FeatureMap {
|
||||
if (!strcmp("q", tname)) return kQuantitive;
|
||||
if (!strcmp("int", tname)) return kInteger;
|
||||
if (!strcmp("float", tname)) return kFloat;
|
||||
if (!strcmp("categorical", tname)) return kCategorical;
|
||||
LOG(FATAL) << "unknown feature type, use i for indicator and q for quantity";
|
||||
return kIndicator;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user