Unverified Commit 7e478047 authored by david-cortes's avatar david-cortes Committed by GitHub
Browse files

Correct documentation for sparse predictions (#4979)

* Correct documentation for sparse predictions

The documentation says that the parameter `nindptr` for `LGBM_BoosterPredictSparseOutput` should be the number of rows plus one, but this is incorrect when the input type is CSC. This PR fixes it.

* Update c_api.h

* Update c_api.h

* Update c_api.h
parent f1856956
......@@ -830,7 +830,7 @@ LIGHTGBM_C_EXPORT int LGBM_BoosterPredictForCSR(BoosterHandle handle,
* \param indices Pointer to column indices for CSR or row indices for CSC
* \param data Pointer to the data space
* \param data_type Type of ``data`` pointer, can be ``C_API_DTYPE_FLOAT32`` or ``C_API_DTYPE_FLOAT64``
* \param nindptr Number of rows in the matrix + 1
* \param nindptr Number of entries in ``indptr``
* \param nelem Number of nonzero elements in the matrix
* \param num_col_or_row Number of columns for CSR or number of rows for CSC
* \param predict_type What should be predicted, only feature contributions supported currently
......@@ -839,7 +839,7 @@ LIGHTGBM_C_EXPORT int LGBM_BoosterPredictForCSR(BoosterHandle handle,
* \param num_iteration Number of iterations for prediction, <= 0 means no limit
* \param parameter Other parameters for prediction, e.g. early stopping for prediction
* \param matrix_type Type of matrix input and output, can be ``C_API_MATRIX_TYPE_CSR`` or ``C_API_MATRIX_TYPE_CSC``
* \param[out] out_len Length of output indices and data
* \param[out] out_len Length of output data and output indptr (pointer to an array with two entries where to write them)
* \param[out] out_indptr Pointer to output row headers for CSR or column headers for CSC
* \param[out] out_indices Pointer to sparse column indices for CSR or row indices for CSC
* \param[out] out_data Pointer to sparse data space
......
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