We name the function non-missing instead of non-zero since zero is perfectly valid for XGBoost.
| 918 | |
| 919 | // We name the function non-missing instead of non-zero since zero is perfectly valid for XGBoost. |
| 920 | XGB_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 | |
| 926 | XGB_DLL int XGDMatrixDataSplitMode(DMatrixHandle handle, bst_ulong *out) { |
| 927 | return GetDMatrixIntegralInfo(handle, out, [](DMatrix const *p_fmat) { |