MCPcopy Create free account
hub / github.com/apache/madlib / encodeIndex

Method encodeIndex

src/modules/recursive_partitioning/DT_impl.hpp:1368–1381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1366
1367template <class Container>
1368inline
1369int
1370DecisionTree<Container>::encodeIndex(const int &feature_index,
1371 const int &is_categorical, const int &n_cat_features) const {
1372 if (is_categorical != 0) {
1373 return feature_index;
1374 } else {
1375 if (feature_index >= 0) {
1376 return feature_index + n_cat_features;
1377 } else {
1378 return feature_index;
1379 }
1380 }
1381}
1382// -------------------------------------------------------------------------
1383
1384template <class Container>

Callers 2

fill_rowFunction · 0.80
transverse_tree_threshFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected