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

Method predict_response

src/modules/recursive_partitioning/DT_impl.hpp:345–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343
344template <class Container>
345inline
346double
347DecisionTree<Container>::predict_response(
348 MappedIntegerVector cat_features,
349 MappedColumnVector con_features) const {
350 ColumnVector curr_prediction = predict(cat_features, con_features);
351
352 if (is_regression){
353 return curr_prediction(0);
354 } else {
355 Index max_label;
356 curr_prediction.maxCoeff(&max_label);
357 return static_cast<double>(max_label);
358 }
359}
360// ------------------------------------------------------------
361
362template <class Container>

Callers 2

runMethod · 0.80
runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected