MCPcopy Create free account
hub / github.com/dmlc/xgboost / XGDMatrixNumNonMissing

Function XGDMatrixNumNonMissing

src/c_api/c_api.cc:920–924  ·  view source on GitHub ↗

We name the function non-missing instead of non-zero since zero is perfectly valid for XGBoost.

Source from the content-addressed store, hash-verified

918
919// We name the function non-missing instead of non-zero since zero is perfectly valid for XGBoost.
920XGB_DLL int XGDMatrixNumNonMissing(DMatrixHandle handle, bst_ulong *out) {
921 return GetDMatrixIntegralInfo(handle, out, [](DMatrix const *p_fmat) {
922 return static_cast<bst_ulong>(p_fmat->Info().num_nonzero_);
923 });
924}
925
926XGB_DLL int XGDMatrixDataSplitMode(DMatrixHandle handle, bst_ulong *out) {
927 return GetDMatrixIntegralInfo(handle, out, [](DMatrix const *p_fmat) {

Calls 2

GetDMatrixIntegralInfoFunction · 0.85
InfoMethod · 0.45

Tested by 1

TESTFunction · 0.68