Commit f98b8310 authored by Guolin Ke's avatar Guolin Ke
Browse files

Don't allow default function arguments.

parent 2c572a71
...@@ -294,7 +294,7 @@ private: ...@@ -294,7 +294,7 @@ private:
/*! \brief Serialize one node to if-else statement*/ /*! \brief Serialize one node to if-else statement*/
std::string NodeToIfElse(int index, bool is_predict_leaf_index) const; std::string NodeToIfElse(int index, bool is_predict_leaf_index) const;
double ExpectedValue(int node = 0) const; double ExpectedValue(int node) const;
int MaxDepth() const; int MaxDepth() const;
...@@ -423,7 +423,7 @@ inline int Tree::PredictLeafIndex(const double* feature_values) const { ...@@ -423,7 +423,7 @@ inline int Tree::PredictLeafIndex(const double* feature_values) const {
} }
inline void Tree::PredictContrib(const double* feature_values, int num_features, double* output) const { inline void Tree::PredictContrib(const double* feature_values, int num_features, double* output) const {
output[num_features] += ExpectedValue(); output[num_features] += ExpectedValue(0);
// Run the recursion with preallocated space for the unique path data // Run the recursion with preallocated space for the unique path data
const int max_path_len = MaxDepth() + 1; const int max_path_len = MaxDepth() + 1;
std::vector<PathElement> unique_path_data((max_path_len*(max_path_len + 1)) / 2); std::vector<PathElement> unique_path_data((max_path_len*(max_path_len + 1)) / 2);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment