Commit d7f8aa53 authored by James Lamb's avatar James Lamb Committed by Nikita Titov
Browse files

[docs] fixed miscellaneous typos in comments and documentation (#2496)

* fixed miscellaneous typos in documentation

* fix typo introduced in typo-fixing PR
parent ff4e48ce
......@@ -46,7 +46,7 @@ class TreeLearner {
virtual void ResetConfig(const Config* config) = 0;
/*!
* \brief training tree model on dataset
* \brief training tree model on dataset
* \param gradients The first order gradients
* \param hessians The second order gradients
* \param is_constant_hessian True if all hessians share the same value
......@@ -56,7 +56,7 @@ class TreeLearner {
const Json& forced_split_json) = 0;
/*!
* \brief use a existing tree to fit the new gradients and hessians.
* \brief use an existing tree to fit the new gradients and hessians.
*/
virtual Tree* FitByExistingTree(const Tree* old_tree, const score_t* gradients, const score_t* hessians) const = 0;
......
......@@ -14,7 +14,7 @@
namespace LightGBM {
/*!
* \brief Contains some operation for a array, e.g. ArgMax, TopK.
* \brief Contains some operation for an array, e.g. ArgMax, TopK.
*/
template<typename VAL_T>
class ArrayArgs {
......
......@@ -595,7 +595,7 @@ inline static int64_t Pow2RoundUp(int64_t x) {
}
/*!
* \brief Do inplace softmax transformaton on p_rec
* \brief Do inplace softmax transformation on p_rec
* \param p_rec The input/output vector of the values.
*/
inline static void Softmax(std::vector<double>* p_rec) {
......
......@@ -30,7 +30,7 @@
namespace LightGBM {
/*!
* \brief An network basic communication warpper.
* \brief A network basic communication warpper.
* Will warp low level communication methods, e.g. mpi, socket and so on.
* This class will wrap all linkers to other machines if needs
*/
......@@ -52,7 +52,7 @@ class Linkers {
* \brief Recv data, blocking
* \param rank Which rank will send data to local machine
* \param data Pointer of receive data
* \prama len Recv size, will block until recive len size of data
* \param len Recv size, will block until recive len size of data
*/
inline void Recv(int rank, char* data, int len) const;
......@@ -62,7 +62,7 @@ class Linkers {
* \brief Send data, blocking
* \param rank Which rank local machine will send to
* \param data Pointer of send data
* \prama len Send size
* \param len Send size
*/
inline void Send(int rank, char* data, int len) const;
......@@ -71,10 +71,10 @@ class Linkers {
* \brief Send and Recv at same time, blocking
* \param send_rank
* \param send_data
* \prama send_len
* \param send_len
* \param recv_rank
* \param recv_data
* \prama recv_len
* \param recv_len
*/
inline void SendRecv(int send_rank, char* send_data, int send_len,
int recv_rank, char* recv_data, int recv_len);
......
......@@ -110,7 +110,7 @@ class GPUTreeLearner: public SerialTreeLearner {
/*!
* \brief Returns OpenCL kernel build log when compiled with option opts
* \param opts OpenCL build options
* \param opts OpenCL build options
* \return OpenCL build log
*/
std::string GetBuildLog(const std::string &opts);
......@@ -120,7 +120,7 @@ class GPUTreeLearner: public SerialTreeLearner {
*/
void SetupKernelArguments();
/*!
/*!
* \brief Compute GPU feature histogram for the current leaf.
* Indices, gradients and hessians have been copied to the device.
* \param leaf_num_data Number of data on current leaf
......@@ -136,7 +136,7 @@ class GPUTreeLearner: public SerialTreeLearner {
void WaitAndGetHistograms(HistogramBinEntry* histograms);
/*!
* \brief Construct GPU histogram asynchronously.
* \brief Construct GPU histogram asynchronously.
* Interface is similar to Dataset::ConstructHistograms().
* \param is_feature_used A predicate vector for enabling each feature
* \param data_indices Array of data example IDs to be included in histogram, will be copied to GPU.
......@@ -144,9 +144,9 @@ class GPUTreeLearner: public SerialTreeLearner {
* \param num_data Number of data examples to be included in histogram
* \param gradients Array of gradients for all examples.
* \param hessians Array of hessians for all examples.
* \param ordered_gradients Ordered gradients will be generated and copied to GPU when gradients is not nullptr,
* \param ordered_gradients Ordered gradients will be generated and copied to GPU when gradients is not nullptr,
* Set gradients to nullptr to skip copy to GPU.
* \param ordered_hessians Ordered hessians will be generated and copied to GPU when hessians is not nullptr,
* \param ordered_hessians Ordered hessians will be generated and copied to GPU when hessians is not nullptr,
* Set hessians to nullptr to skip copy to GPU.
* \return true if GPU kernel is launched, false if GPU is not used
*/
......@@ -189,13 +189,13 @@ class GPUTreeLearner: public SerialTreeLearner {
/*! \brief Currently used kernel name */
std::string kernel_name_;
/*! \brief a array of histogram kernels with different number
/*! \brief an array of histogram kernels with different number
of workgroups per feature */
std::vector<boost::compute::kernel> histogram_kernels_;
/*! \brief a array of histogram kernels with different number
/*! \brief an array of histogram kernels with different number
of workgroups per feature, with all features enabled to avoid branches */
std::vector<boost::compute::kernel> histogram_allfeats_kernels_;
/*! \brief a array of histogram kernels with different number
/*! \brief an array of histogram kernels with different number
of workgroups per feature, and processing the whole dataset */
std::vector<boost::compute::kernel> histogram_fulldata_kernels_;
/*! \brief total number of feature-groups */
......@@ -210,7 +210,7 @@ class GPUTreeLearner: public SerialTreeLearner {
/*! \brief total number of dense feature-group tuples on GPU.
* Each feature tuple is 4-byte (4 features if each feature takes a byte) */
int num_dense_feature4_;
/*! \brief Max number of bins of training data, used to determine
/*! \brief Max number of bins of training data, used to determine
* which GPU kernel to use */
int max_num_bin_;
/*! \brief Used GPU kernel bin size (64, 256) */
......
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