From 0327f2edf8ff483e6ed4a090dc951333cde85a7c Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 16:46:47 +0530 Subject: [PATCH 01/18] fixing links in trees.md --- doc/developer/trees.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer/trees.md b/doc/developer/trees.md index 97c76c5418..6321e1ebe8 100644 --- a/doc/developer/trees.md +++ b/doc/developer/trees.md @@ -90,7 +90,7 @@ mlpack algorithms, each \c TreeType itself must be a template class taking three parameters: - `MetricType` -- the underlying metric that the tree will be built on (see -[the MetricType policy documentation](metrictype.md)) +[the MetricType policy documentation](metrics.md)) - `StatisticType` -- holds any auxiliary information that individual algorithms may need - `MatType` -- the type of the matrix used to represent the data From b4f7222af0c6e8dfb86013371edab41fbcba1603 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 16:50:57 +0530 Subject: [PATCH 02/18] fixing links in metrics.md --- doc/developer/metrics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/developer/metrics.md b/doc/developer/metrics.md index b4cec62526..4a6ec5bc6a 100644 --- a/doc/developer/metrics.md +++ b/doc/developer/metrics.md @@ -35,7 +35,7 @@ Note that for metrics that do not hold any state, the `Evaluate()` method can be marked as `static`. Overall, the `MetricType` template policy is quite simple (much like the -[KernelType policy](kerneltype.md)). Below is an example metric class, which +[KernelType policy](kernels.md)). Below is an example metric class, which implements the L2 distance: ```c++ @@ -105,4 +105,4 @@ policy: - `ChebyshevDistance` - `MahalanobisDistance` - `LMetric` (for arbitrary L-metrics) - - `IPMetric` (requires a [KernelType](kerneltype.md) parameter) + - `IPMetric` (requires a [KernelType](kernels.md) parameter) From 152837ffd22e3e5c35b0ca8f12619dba357e4d51 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 16:53:40 +0530 Subject: [PATCH 03/18] fixing links in kernels.md --- doc/developer/kernels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/developer/kernels.md b/doc/developer/kernels.md index 7bd65bd293..09aa23c39a 100644 --- a/doc/developer/kernels.md +++ b/doc/developer/kernels.md @@ -16,7 +16,7 @@ including mlpack implements a number of kernel methods and, accordingly, each of these methods allows arbitrary kernels to be used via the `KernelType` template -parameter. Like the [MetricType policy](metrictype.md), the requirements are +parameter. Like the [MetricType policy](metrics.md), the requirements are quite simple: a class implementing the `KernelType` policy must have - an `Evaluate()` function @@ -42,7 +42,7 @@ Note that for kernels that do not hold any state, the `Evaluate()` method can be marked as `static`. Overall, the `KernelType` template policy is quite simple (much like the -[MetricType policy](metrictype.md)). Below is an example kernel class, which +[MetricType policy](metrics.md)). Below is an example kernel class, which outputs `1` if the vectors are close and `0` otherwise. ```c++ From a9616cef3160cc5541a3b8c1bea49ad46ee25bed Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 16:56:04 +0530 Subject: [PATCH 04/18] fix typo in Image Utilities --- doc/tutorials/image.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/image.md b/doc/tutorials/image.md index dc08a085dd..01169e7afb 100644 --- a/doc/tutorials/image.md +++ b/doc/tutorials/image.md @@ -2,7 +2,7 @@ Image datasets are becoming increasingly popular in deep learning. -mlpack's image saving/loading functionality is based on [stb/](https://github.com/nothings/stb). +mlpack's image saving/loading functionality is based on [stb](https://github.com/nothings/stb). ## Model API From 54ec3046c47958c6de072be599efb88f49eec4e4 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:02:45 +0530 Subject: [PATCH 05/18] fixing typo in trees.md --- doc/developer/trees.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/developer/trees.md b/doc/developer/trees.md index 6321e1ebe8..19e6c490e4 100644 --- a/doc/developer/trees.md +++ b/doc/developer/trees.md @@ -86,7 +86,7 @@ restatement of the fourth part of the definition). Most everything in mlpack is decomposed into a series of configurable template parameters, and trees are no exception. In order to ease usage of high-level -mlpack algorithms, each \c TreeType itself must be a template class taking three +mlpack algorithms, each TreeType itself must be a template class taking three parameters: - `MetricType` -- the underlying metric that the tree will be built on (see @@ -424,7 +424,7 @@ This constructor should be called with `(*this)` after the node is constructed The last template parameter is the `MatType` parameter. This is generally `arma::mat` or `arma::sp_mat`, but could be any Armadillo type, including matrices that hold data points of different precisions (such as `float` or even -`int`). It generally suffices to write \c MatType assuming that `arma::mat` +`int`). It generally suffices to write MatType assuming that `arma::mat` will be used, since the vast majority of the time this will be what is used. ### Constructors and destructors From 53909b3f9db7aa0e3df622af189e7f1895355ece Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:45:08 +0530 Subject: [PATCH 06/18] fixing typo in range_search.md --- doc/tutorials/range_search.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/range_search.md b/doc/tutorials/range_search.md index 55dd98acae..6f62762bf5 100644 --- a/doc/tutorials/range_search.md +++ b/doc/tutorials/range_search.md @@ -3,7 +3,7 @@ Range search is a simple machine learning task which aims to find all the neighbors of a point that fall into a certain range of distances. In this setting, we have a *query* and a *reference* dataset. Given a certain range, -for each point in the *query* dataset, we wish to know all points in the \b +for each point in the *query* dataset, we wish to know all points in the reference dataset which have distances within that given range to the given query point. From 94fa2971cd80a53d5196ac307a43d5a99dd7b734 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:49:20 +0530 Subject: [PATCH 07/18] fixing typo in cf.md --- doc/tutorials/cf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/cf.md b/doc/tutorials/cf.md index 2d4a313ba8..eed525140b 100644 --- a/doc/tutorials/cf.md +++ b/doc/tutorials/cf.md @@ -389,7 +389,7 @@ number of rows equal to the number of items and the number of columns equal to the number of users, and each nonzero element in the matrix corresponds to a non-missing rating. -The method that the factorizer implements is specified via the \c +The method that the factorizer implements is specified via the FactorizerTraits class, which is a template metaprogramming traits class: ```c++ From fa73dbb444fcbd4b2dc2dfc27f9670c43798e466 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:54:58 +0530 Subject: [PATCH 08/18] fixing links in approx_kfn.md --- doc/tutorials/approx_kfn.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/tutorials/approx_kfn.md b/doc/tutorials/approx_kfn.md index c703aefa45..8d0f5eb581 100644 --- a/doc/tutorials/approx_kfn.md +++ b/doc/tutorials/approx_kfn.md @@ -114,8 +114,8 @@ search: These two programs allow a large number of algorithms to be used to find approximate furthest neighbors. Note that the `mlpack_kfn` program is also -documented in the [KNN tutorial](knn.md) page, as it shares options with the -`mlpack_knn` program. +documented in the [KNN tutorial](neighbor_search.md) page, as it shares options +with the `mlpack_knn` program. Below are several examples of how the `mlpack_approx_kfn` and `mlpack_kfn` programs might be used. The first examples focus on the `mlpack_approx_kfn` @@ -869,7 +869,7 @@ qdafn.Search(querySet, 3, neighbors, distances); The extensive `NeighborSearch` class also provides a way to search for approximate furthest neighbors using a different, tree-based technique. For full documentation on this class, see the [NeighborSearch -tutorial](nstutorial.md). The `KFN` class is a convenient typedef of the +tutorial](neighbor_search.md). The `KFN` class is a convenient typedef of the `NeighborSearch` class that can be used to perform the furthest neighbors task with `kd`-trees. @@ -982,6 +982,6 @@ kfn.Search(querySet, 2, neighbors, distances); ## Further documentation For further documentation on the approximate furthest neighbor facilities -offered by mlpack, see also [the NeighborSearch tutorial](nstutorial.md). Also, +offered by mlpack, see also [the NeighborSearch tutorial](neighbor_search.md). Also, each class (`QDAFN`, `DrusillaSelect`, `NeighborSelect`) are well-documented, and more details can be found in the source code documentation. From c37d9f74ef118a7b8fc8ae6cb852a6d23bbc0dec Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 17:57:27 +0530 Subject: [PATCH 09/18] fixing typo in approx_kfn.md --- doc/tutorials/approx_kfn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/approx_kfn.md b/doc/tutorials/approx_kfn.md index 8d0f5eb581..bfd306f57e 100644 --- a/doc/tutorials/approx_kfn.md +++ b/doc/tutorials/approx_kfn.md @@ -682,7 +682,7 @@ std::cout << ds.CandidateSet().col(4).t(); It is possible to retrain a `DrusillaSelect` model with new parameters or with a new reference set. This is functionally equivalent to creating a new model. -The example code below creates a first \c DrusillaSelect model using 3 tables +The example code below creates a first DrusillaSelect model using 3 tables and 10 projections, and then retrains this with the same reference set using 10 tables and 3 projections. From 09011dd799c1a15ac328b410a7da069110dfe697 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 18:16:46 +0530 Subject: [PATCH 10/18] fixing error in hpt.md --- doc/user/hpt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/hpt.md b/doc/user/hpt.md index 881d60923b..b7cb55cbe8 100644 --- a/doc/user/hpt.md +++ b/doc/user/hpt.md @@ -179,7 +179,7 @@ HyperParameterTuner hpt(0.2, dataset, ``` Next, we must set up the hyperparameters to be optimized. If we are doing a -grid search with the \c ens::GridSearch optimizer (the +grid search with the ens::GridSearch optimizer (the default), then we only need to pass a `std::vector` (for non-numeric hyperparameters) or an `arma::vec` (for numeric hyperparameters) containing all of the possible choices that we wish to search over. From ce849fd9dd08eb23134cd897fb86e65adf8b38dd Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Wed, 1 Feb 2023 18:19:16 +0530 Subject: [PATCH 11/18] fixing typo in cv.md --- doc/user/cv.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/cv.md b/doc/user/cv.md index be392c2b0f..7a4584a764 100644 --- a/doc/user/cv.md +++ b/doc/user/cv.md @@ -70,7 +70,7 @@ SoftmaxRegression(const arma::mat& data, ``` which has the parameter `lambda` after three conventional arguments (`data`, -\c labels and \c numClasses). We can skip passing `fitIntercept` and +labels and numClasses). We can skip passing `fitIntercept` and `optimizer` since there are the default values. (Technically, we don't even need to pass `lambda` since there is a default value.) From 430d071d11844855fb14247a006c625dab93e569 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Thu, 2 Feb 2023 01:17:45 +0530 Subject: [PATCH 12/18] Update doc/developer/trees.md Co-authored-by: Ryan Curtin --- doc/developer/trees.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer/trees.md b/doc/developer/trees.md index 19e6c490e4..06fd665dcc 100644 --- a/doc/developer/trees.md +++ b/doc/developer/trees.md @@ -424,7 +424,7 @@ This constructor should be called with `(*this)` after the node is constructed The last template parameter is the `MatType` parameter. This is generally `arma::mat` or `arma::sp_mat`, but could be any Armadillo type, including matrices that hold data points of different precisions (such as `float` or even -`int`). It generally suffices to write MatType assuming that `arma::mat` +`int`). It generally suffices to write `MatType` assuming that `arma::mat` will be used, since the vast majority of the time this will be what is used. ### Constructors and destructors From 32637d532578fa45fe4f5f87c0f9055255b7de43 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Thu, 2 Feb 2023 01:18:07 +0530 Subject: [PATCH 13/18] Update doc/tutorials/approx_kfn.md Co-authored-by: Ryan Curtin --- doc/tutorials/approx_kfn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/approx_kfn.md b/doc/tutorials/approx_kfn.md index bfd306f57e..33a4237d98 100644 --- a/doc/tutorials/approx_kfn.md +++ b/doc/tutorials/approx_kfn.md @@ -682,7 +682,7 @@ std::cout << ds.CandidateSet().col(4).t(); It is possible to retrain a `DrusillaSelect` model with new parameters or with a new reference set. This is functionally equivalent to creating a new model. -The example code below creates a first DrusillaSelect model using 3 tables +The example code below creates a first `DrusillaSelect` model using 3 tables and 10 projections, and then retrains this with the same reference set using 10 tables and 3 projections. From 0641deb0c537a1976725d14b5c002e1292e5d2b2 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Thu, 2 Feb 2023 01:18:16 +0530 Subject: [PATCH 14/18] Update doc/tutorials/cf.md Co-authored-by: Ryan Curtin --- doc/tutorials/cf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/cf.md b/doc/tutorials/cf.md index eed525140b..9452ebfdd0 100644 --- a/doc/tutorials/cf.md +++ b/doc/tutorials/cf.md @@ -390,7 +390,7 @@ the number of users, and each nonzero element in the matrix corresponds to a non-missing rating. The method that the factorizer implements is specified via the -FactorizerTraits class, which is a template metaprogramming traits class: +`FactorizerTraits` class, which is a template metaprogramming traits class: ```c++ template From 1801b4d55a4881081a857362b871eb714db1c4b3 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Thu, 2 Feb 2023 01:18:35 +0530 Subject: [PATCH 15/18] Update doc/tutorials/range_search.md Co-authored-by: Ryan Curtin --- doc/tutorials/range_search.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorials/range_search.md b/doc/tutorials/range_search.md index 6f62762bf5..42fa5b6526 100644 --- a/doc/tutorials/range_search.md +++ b/doc/tutorials/range_search.md @@ -4,7 +4,7 @@ Range search is a simple machine learning task which aims to find all the neighbors of a point that fall into a certain range of distances. In this setting, we have a *query* and a *reference* dataset. Given a certain range, for each point in the *query* dataset, we wish to know all points in the -reference dataset which have distances within that given range to the given +*reference* dataset which have distances within that given range to the given query point. Alternately, if the query and reference datasets are the same, the problem can From 58d3f1f51561aa57a775de51274e3dfd6682fa73 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Thu, 2 Feb 2023 01:19:07 +0530 Subject: [PATCH 16/18] Update doc/developer/trees.md Co-authored-by: Ryan Curtin --- doc/developer/trees.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer/trees.md b/doc/developer/trees.md index 06fd665dcc..17e9525939 100644 --- a/doc/developer/trees.md +++ b/doc/developer/trees.md @@ -86,7 +86,7 @@ restatement of the fourth part of the definition). Most everything in mlpack is decomposed into a series of configurable template parameters, and trees are no exception. In order to ease usage of high-level -mlpack algorithms, each TreeType itself must be a template class taking three +mlpack algorithms, each `TreeType` itself must be a template class taking three parameters: - `MetricType` -- the underlying metric that the tree will be built on (see From 267b11116cbe490b7522749ae0fc828a2cb2de5f Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Thu, 2 Feb 2023 01:19:21 +0530 Subject: [PATCH 17/18] Update doc/user/cv.md Co-authored-by: Ryan Curtin --- doc/user/cv.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/cv.md b/doc/user/cv.md index 7a4584a764..53067911d7 100644 --- a/doc/user/cv.md +++ b/doc/user/cv.md @@ -70,7 +70,7 @@ SoftmaxRegression(const arma::mat& data, ``` which has the parameter `lambda` after three conventional arguments (`data`, -labels and numClasses). We can skip passing `fitIntercept` and +`labels` and `numClasses`). We can skip passing `fitIntercept` and `optimizer` since there are the default values. (Technically, we don't even need to pass `lambda` since there is a default value.) From dad54d29d429c8f396079dcaad797abaabb34803 Mon Sep 17 00:00:00 2001 From: Adarsh Santoria <108261986+AdarshSantoria@users.noreply.github.com> Date: Thu, 2 Feb 2023 01:19:33 +0530 Subject: [PATCH 18/18] Update doc/user/hpt.md Co-authored-by: Ryan Curtin --- doc/user/hpt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/hpt.md b/doc/user/hpt.md index b7cb55cbe8..738a9c6f26 100644 --- a/doc/user/hpt.md +++ b/doc/user/hpt.md @@ -179,7 +179,7 @@ HyperParameterTuner hpt(0.2, dataset, ``` Next, we must set up the hyperparameters to be optimized. If we are doing a -grid search with the ens::GridSearch optimizer (the +grid search with the `ens::GridSearch` optimizer (the default), then we only need to pass a `std::vector` (for non-numeric hyperparameters) or an `arma::vec` (for numeric hyperparameters) containing all of the possible choices that we wish to search over.