diff --git a/doc/tutorials/amf/amf.txt b/doc/tutorials/amf/amf.txt index abb4c0369b..bc4f8ed3c2 100644 --- a/doc/tutorials/amf/amf.txt +++ b/doc/tutorials/amf/amf.txt @@ -72,14 +72,14 @@ the threshold or the number of iterations goes beyond the threshold, positive termination signal is passed to AMF. In SimpleToleranceTermination, termination criterion is met when increase in -residue value drops below the given tolerance. To accomodate spikes, certain +residue value drops below the given tolerance. To accommodate spikes, certain number of successive residue drops are accepted. Secondary termination criterion terminates algorithm when iteration count goes beyond the threshold. ValidationRMSETermination divids the data into 2 sets, training set and validation set. Entries of validation set are nullifed in the input matrix. Termination criterion is met when increase in validation set RMSe value drops -below the given tolerance. To accomodate spikes certain number of successive +below the given tolerance. To accommodate spikes certain number of successive validation RMSE drops are accepted. This upper imit on successive drops can be adjusted with reverseStepCount. Secondary termination criterion terminates algorithm when iteration count goes above the threshold. Though this termination @@ -101,7 +101,7 @@ The AMF class comes with 2 initialization policies RandomInitialization initializes matrices W and H with random uniform distribution while RandomAcolInitialization initializes the W matrix by averaging p randomly -chosen columns of V. In case of RandomAcolIntialization, p is a template parameter. +chosen columns of V. In case of RandomAcolInitialization, p is a template parameter. To implement their own initialization policy, users need to define the following function in their class. @@ -160,7 +160,7 @@ int main() } @endcode -NMFALSFactorizer uses SimpleResidueTermination which is most prefered with +NMFALSFactorizer uses SimpleResidueTermination which is most preferred with Non-Negative Matrix factorizers. Initialization of W and H in NMFALSFactorizer is random. The Apply function returns the residue obtained by comparing the constructed matrix W * H with the original matrix V. diff --git a/src/mlpack/core/tree/ballbound_impl.hpp b/src/mlpack/core/tree/ballbound_impl.hpp index 95fbf22f12..94eac4cd04 100644 --- a/src/mlpack/core/tree/ballbound_impl.hpp +++ b/src/mlpack/core/tree/ballbound_impl.hpp @@ -256,7 +256,7 @@ BallBound::operator|=(const MatType& data) if (dist > radius) { // Move towards the new point and increase the radius just enough to - // accomodate the new point. + // accommodate the new point. arma::vec diff = data.col(i) - center; center += ((dist - radius) / (2 * dist)) * diff; radius = 0.5 * (dist + radius); diff --git a/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp b/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp index 2e5545ce54..bb192668b4 100644 --- a/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp +++ b/src/mlpack/core/tree/cosine_tree/cosine_tree.cpp @@ -325,7 +325,7 @@ void CosineTree::ColumnSamplesLS(std::vector& sampledIndices, cDistribution(i+1) = cDistribution(i) + l2NormsSquared(i) / frobNormSquared; } - // Intialize sizes of the 'sampledIndices' and 'probabilities' vectors. + // Initialize sizes of the 'sampledIndices' and 'probabilities' vectors. sampledIndices.resize(numSamples); probabilities.zeros(numSamples); diff --git a/src/mlpack/methods/amf/init_rules/average_init.hpp b/src/mlpack/methods/amf/init_rules/average_init.hpp index 3379c9808d..c3f7cfb2d5 100644 --- a/src/mlpack/methods/amf/init_rules/average_init.hpp +++ b/src/mlpack/methods/amf/init_rules/average_init.hpp @@ -2,7 +2,7 @@ * @file averge_init.hpp * @author Sumedh Ghaisas * - * Intialization rule for Alternating Matrix Factorization. + * Initialization rule for Alternating Matrix Factorization. */ #ifndef __MLPACK_METHODS_AMF_AVERAGE_INIT_HPP #define __MLPACK_METHODS_AMF_AVERAGE_INIT_HPP @@ -61,7 +61,7 @@ class AverageInitialization avgV = sqrt(((avgV / (n * m)) - min) / r); - // Intialize to random values. + // Initialize to random values. W.randu(n, r); H.randu(r, m); diff --git a/src/mlpack/methods/amf/init_rules/random_acol_init.hpp b/src/mlpack/methods/amf/init_rules/random_acol_init.hpp index 9f9465adf9..8f45ec1d7e 100644 --- a/src/mlpack/methods/amf/init_rules/random_acol_init.hpp +++ b/src/mlpack/methods/amf/init_rules/random_acol_init.hpp @@ -2,7 +2,7 @@ * @file random_acol_init.hpp * @author Mohan Rajendran * - * Intialization rule for Alternating Matrix Factorization. + * Initialization rule for Alternating Matrix Factorization. */ #ifndef __MLPACK_METHODS_LMF_RANDOM_ACOL_INIT_HPP #define __MLPACK_METHODS_LMF_RANDOM_ACOL_INIT_HPP diff --git a/src/mlpack/methods/amf/init_rules/random_init.hpp b/src/mlpack/methods/amf/init_rules/random_init.hpp index f9cd7c20a5..b8d47a8199 100644 --- a/src/mlpack/methods/amf/init_rules/random_init.hpp +++ b/src/mlpack/methods/amf/init_rules/random_init.hpp @@ -2,7 +2,7 @@ * @file random_init.hpp * @author Mohan Rajendran * - * Intialization rule for alternating matrix forization (AMF). This simple + * Initialization rule for alternating matrix forization (AMF). This simple * initialization is performed by assigning a random matrix to W and H. */ #ifndef __MLPACK_METHODS_LMF_RANDOM_INIT_HPP @@ -41,7 +41,7 @@ class RandomInitialization const size_t n = V.n_rows; const size_t m = V.n_cols; - // Intialize to random values. + // Initialize to random values. W.randu(n, r); H.randu(r, m); } diff --git a/src/mlpack/methods/amf/termination_policies/simple_tolerance_termination.hpp b/src/mlpack/methods/amf/termination_policies/simple_tolerance_termination.hpp index c49f49028d..836d24a5d6 100644 --- a/src/mlpack/methods/amf/termination_policies/simple_tolerance_termination.hpp +++ b/src/mlpack/methods/amf/termination_policies/simple_tolerance_termination.hpp @@ -15,7 +15,7 @@ namespace amf { /** * This class implements residue tolerance termination policy. Termination * criterion is met when increase in residue value drops below the given tolerance. - * To accomodate spikes certain number of successive residue drops are accepted. + * To accommodate spikes certain number of successive residue drops are accepted. * This upper imit on successive drops can be adjusted with reverseStepCount. * Secondary termination criterion terminates algorithm when iteration count * goes above the threshold. diff --git a/src/mlpack/methods/amf/termination_policies/validation_RMSE_termination.hpp b/src/mlpack/methods/amf/termination_policies/validation_RMSE_termination.hpp index a44cd808c2..b967552b74 100644 --- a/src/mlpack/methods/amf/termination_policies/validation_RMSE_termination.hpp +++ b/src/mlpack/methods/amf/termination_policies/validation_RMSE_termination.hpp @@ -19,7 +19,7 @@ namespace amf * The input data matrix is divided into 2 sets, training set and validation set. * Entries of validation set are nullifed in the input matrix. Termination * criterion is met when increase in validation set RMSe value drops below the - * given tolerance. To accomodate spikes certain number of successive validation + * given tolerance. To accommodate spikes certain number of successive validation * RMSE drops are accepted. This upper imit on successive drops can be adjusted * with reverseStepCount. Secondary termination criterion terminates algorithm * when iteration count goes above the threshold. diff --git a/src/mlpack/methods/lsh/lsh_search.hpp b/src/mlpack/methods/lsh/lsh_search.hpp index d4ff0629ef..c2a8524daf 100644 --- a/src/mlpack/methods/lsh/lsh_search.hpp +++ b/src/mlpack/methods/lsh/lsh_search.hpp @@ -185,8 +185,8 @@ class LSHSearch * standard hash. * * This function does not have any parameters and relies on parameters which - * are private members of this class, intialized during the class - * intialization. + * are private members of this class, initialized during the class + * initialization. */ void BuildHash(); diff --git a/src/mlpack/methods/softmax_regression/softmax_regression_function.cpp b/src/mlpack/methods/softmax_regression/softmax_regression_function.cpp index 32570154d4..850549ae28 100644 --- a/src/mlpack/methods/softmax_regression/softmax_regression_function.cpp +++ b/src/mlpack/methods/softmax_regression/softmax_regression_function.cpp @@ -20,7 +20,7 @@ SoftmaxRegressionFunction::SoftmaxRegressionFunction( lambda(lambda), fitIntercept(fitIntercept) { - // Intialize the parameters to suitable values. + // Initialize the parameters to suitable values. initialPoint = InitializeWeights(); // Calculate the label matrix. diff --git a/src/mlpack/methods/sparse_autoencoder/sparse_autoencoder_function.hpp b/src/mlpack/methods/sparse_autoencoder/sparse_autoencoder_function.hpp index 10f87e87eb..c1a9d9287c 100644 --- a/src/mlpack/methods/sparse_autoencoder/sparse_autoencoder_function.hpp +++ b/src/mlpack/methods/sparse_autoencoder/sparse_autoencoder_function.hpp @@ -142,7 +142,7 @@ class SparseAutoencoderFunction private: //! The matrix of data points. const arma::mat& data; - //! Intial parameter vector. + //! Initial parameter vector. arma::mat initialPoint; //! Size of the visible layer. size_t visibleSize; diff --git a/src/mlpack/tests/cosine_tree_test.cpp b/src/mlpack/tests/cosine_tree_test.cpp index 2f44d7d1db..f98be8c9db 100644 --- a/src/mlpack/tests/cosine_tree_test.cpp +++ b/src/mlpack/tests/cosine_tree_test.cpp @@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE(CosineTreeNoSplit) */ BOOST_AUTO_TEST_CASE(CosineNodeCosineSplit) { - // Intialize constants required for the test. + // Initialize constants required for the test. const size_t numRows = 500; const size_t numCols = 1000;