Fix spelling in documents (#6948)

* Update roxygen2 doc.

Co-authored-by: fis <jm.yuan@outlook.com>
This commit is contained in:
Andrew Ziem
2021-05-11 06:44:36 -06:00
committed by GitHub
parent 2a9979e256
commit 3e7e426b36
100 changed files with 284 additions and 284 deletions

View File

@@ -324,7 +324,7 @@ XGB_DLL int XGProxyDMatrixCreate(DMatrixHandle* out);
XGB_EXTERN_C typedef int XGDMatrixCallbackNext(DataIterHandle iter); // NOLINT(*)
/*!
* \brief Callback function prototype for reseting external iterator
* \brief Callback function prototype for resetting external iterator
*/
XGB_EXTERN_C typedef void DataIterResetCallback(DataIterHandle handle); // NOLINT(*)
@@ -333,8 +333,8 @@ XGB_EXTERN_C typedef void DataIterResetCallback(DataIterHandle handle); // NOLIN
*
* \param iter A handle to external data iterator.
* \param proxy A DMatrix proxy handle created by `XGProxyDMatrixCreate`.
* \param reset Callback function reseting the iterator state.
* \param next Callback function yieling the next batch of data.
* \param reset Callback function resetting the iterator state.
* \param next Callback function yielding the next batch of data.
* \param missing Which value to represent missing value
* \param nthread Number of threads to use, 0 for default.
* \param max_bin Maximum number of bins for building histogram.
@@ -461,7 +461,7 @@ XGB_DLL int XGDMatrixSetUIntInfo(DMatrixHandle handle,
* - feature_type
*
* \param handle An instance of data matrix
* \param field Feild name
* \param field Field name
* \param features Pointer to array of strings.
* \param size Size of `features` pointer (number of strings passed in).
*
@@ -493,7 +493,7 @@ XGB_DLL int XGDMatrixSetStrFeatureInfo(DMatrixHandle handle, const char *field,
* XGBoost.
*
* \param handle An instance of data matrix
* \param field Feild name
* \param field Field name
* \param size Size of output pointer `features` (number of strings returned).
* \param out_features Address of a pointer to array of strings. Result is stored in
* thread local memory.
@@ -533,7 +533,7 @@ XGB_DLL int XGDMatrixGetStrFeatureInfo(DMatrixHandle handle, const char *field,
* - feature_weights
*
* \param handle An instance of data matrix
* \param field Feild name
* \param field Field name
* \param data Pointer to consecutive memory storing data.
* \param size Size of the data, this is relative to size of type. (Meaning NOT number
* of bytes.)
@@ -912,7 +912,7 @@ XGB_DLL int XGBoosterPredictFromCudaColumnar(
*
* - Functions with the term "Config" handles save/loading configuration. It helps user
* to study the internal of XGBoost. Also user can use the load method for specifying
* paramters in a structured way. These functions are introduced in 1.0.0, and are not
* parameters in a structured way. These functions are introduced in 1.0.0, and are not
* yet stable.
*
* - Functions with the term "Serialization" are combined of above two. They are used in
@@ -1145,7 +1145,7 @@ XGB_DLL int XGBoosterGetAttrNames(BoosterHandle handle,
* - feature_type
*
* \param handle An instance of Booster
* \param field Feild name
* \param field Field name
* \param features Pointer to array of strings.
* \param size Size of `features` pointer (number of strings passed in).
*
@@ -1167,7 +1167,7 @@ XGB_DLL int XGBoosterSetStrFeatureInfo(BoosterHandle handle, const char *field,
* function of XGBoost.
*
* \param handle An instance of Booster
* \param field Feild name
* \param field Field name
* \param size Size of output pointer `features` (number of strings returned).
* \param out_features Address of a pointer to array of strings. Result is stored in
* thread local memory.

View File

@@ -35,7 +35,7 @@ class IntrusivePtrCell {
};
/*!
* \brief User defined function for returing embedded reference count.
* \brief User defined function for returning embedded reference count.
*/
template <typename T> IntrusivePtrCell &IntrusivePtrRefCount(T const *ptr) noexcept;

View File

@@ -72,7 +72,7 @@ T* Cast(U* value) {
} else {
LOG(FATAL) << "Invalid cast, from " + value->TypeStr() + " to " + T().TypeStr();
}
return dynamic_cast<T*>(value); // supress compiler warning.
return dynamic_cast<T*>(value); // suppress compiler warning.
}
class JsonString : public Value {

View File

@@ -52,9 +52,9 @@ struct XGBAPIThreadLocalEntry {
std::vector<bst_float> ret_vec_float;
/*! \brief temp variable of gradient pairs. */
std::vector<GradientPair> tmp_gpair;
/*! \brief Temp variable for returing prediction result. */
/*! \brief Temp variable for returning prediction result. */
PredictionCacheEntry prediction_entry;
/*! \brief Temp variable for returing prediction shape. */
/*! \brief Temp variable for returning prediction shape. */
std::vector<bst_ulong> prediction_shape;
};

View File

@@ -16,7 +16,7 @@
namespace xgboost {
/*!
* \brief A veiw over a matrix on contigious storage.
* \brief A view over a matrix on contiguous storage.
*
* \tparam T data type of matrix
*/
@@ -35,7 +35,7 @@ template <typename T> class MatrixView {
/*!
* \param vec storage.
* \param strides Strides for matrix.
* \param shape Rows anc columns.
* \param shape Rows and columns.
* \param device Where the data is stored in.
*/
MatrixView(HostDeviceVector<T> *vec, std::array<size_t, 2> strides,

View File

@@ -17,13 +17,13 @@ class Json;
struct Model {
virtual ~Model() = default;
/*!
* \brief load the model from a json object
* \param in json object where to load the model from
* \brief load the model from a JSON object
* \param in JSON object where to load the model from
*/
virtual void LoadModel(Json const& in) = 0;
/*!
* \brief saves the model config to a json object
* \param out json container where to save the model to
* \brief saves the model config to a JSON object
* \param out JSON container where to save the model to
*/
virtual void SaveModel(Json* out) const = 0;
};

View File

@@ -5,7 +5,7 @@
* About NOLINTs in this file:
*
* If we want Span to work with std interface, like range for loop, the
* naming must be consistant with std, not XGBoost. Also, the interface also
* naming must be consistent with std, not XGBoost. Also, the interface also
* conflicts with XGBoost coding style, specifically, the use of `explicit'
* keyword.
*
@@ -51,8 +51,8 @@
* possible.
*
* There are other workarounds for MSVC, like _Unwrapped, _Verify_range ...
* Some of these are hiden magics of MSVC and I tried to avoid them. Should any
* of them become needed, please consult the source code of GSL, and possibily
* Some of these are hidden magics of MSVC and I tried to avoid them. Should any
* of them become needed, please consult the source code of GSL, and possibly
* some explanations from this thread:
*
* https://github.com/Microsoft/GSL/pull/664
@@ -121,7 +121,7 @@ namespace detail {
/*!
* By default, XGBoost uses uint32_t for indexing data. int64_t covers all
* values uint32_t can represent. Also, On x86-64 Linux, GCC uses long int to
* represent ptrdiff_t, which is just int64_t. So we make it determinstic
* represent ptrdiff_t, which is just int64_t. So we make it deterministic
* here.
*/
using ptrdiff_t = typename std::conditional< // NOLINT
@@ -354,7 +354,7 @@ XGBOOST_DEVICE bool LexicographicalCompare(InputIt1 first1, InputIt1 last1,
* Interface might be slightly different, we stick with ISO.
*
* GSL uses C++14/17 features, which are not available here.
* GSL uses constexpr extensively, which is not possibile with limitation
* GSL uses constexpr extensively, which is not possible with limitation
* of C++11.
* GSL doesn't concern about CUDA.
*
@@ -371,7 +371,7 @@ XGBOOST_DEVICE bool LexicographicalCompare(InputIt1 first1, InputIt1 last1,
* in CUDA.
* Initializing from std::array is not supported.
*
* ISO uses constexpr extensively, which is not possibile with limitation
* ISO uses constexpr extensively, which is not possible with limitation
* of C++11.
* ISO uses C++14/17 features, which is not available here.
* ISO doesn't concern about CUDA.
@@ -408,7 +408,7 @@ XGBOOST_DEVICE bool LexicographicalCompare(InputIt1 first1, InputIt1 last1,
* beg++; // crash
* \endcode
*
* While hoding a pointer or reference should avoid the problem, its a
* While holding a pointer or reference should avoid the problem, it's a
* compromise. Since we have subspan, it's acceptable not to support
* passing iterator.
*/

View File

@@ -396,7 +396,7 @@ class RegTree : public Model {
* \brief Compares whether 2 trees are equal from a user's perspective. The equality
* compares only non-deleted nodes.
*
* \parm b The other tree.
* \param b The other tree.
*/
bool Equal(const RegTree& b) const;