Skip to content

Commit

Permalink
cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jun 15, 2021
1 parent 63f4bc3 commit 1717d19
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/c_api/c_api.cc
Expand Up @@ -622,26 +622,6 @@ XGB_DLL int XGBoosterEvalOneIter(BoosterHandle handle,
API_END();
}

XGB_DLL int
XGBoostCalcFeatureScore(BoosterHandle handle, char const *c_importance_type,
unsigned *out_len, const char **feature_names,
const unsigned **feature_ids, const float **scores) {
API_BEGIN();
CHECK_HANDLE();
std::string importance_type {c_importance_type};
auto* learner = static_cast<Learner*>(handle);
std::vector<bst_feature_t>& features = learner->GetThreadLocal().ret_vec_uint32;
std::vector<float>& gains = learner->GetThreadLocal().ret_vec_float;
learner->CalcFeatureScore(importance_type, &features, &gains);
if (feature_ids) {
*feature_ids = dmlc::BeginPtr(features);
}
CHECK(scores);
*scores = dmlc::BeginPtr(gains);
*out_len = gains.size(); // FIXME: Rename to scores from gains
API_END();
}

XGB_DLL int XGBoostTreesToDataFrame(BoosterHandle handle) {
API_BEGIN();
CHECK_HANDLE();
Expand Down

0 comments on commit 1717d19

Please sign in to comment.