command and ref cleanup

This commit is contained in:
Ryan Birmingham
2020-05-11 01:01:38 -04:00
parent 1b6bba57c2
commit b5515bfa62
10 changed files with 35 additions and 27 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
namespace mlpack {
ens::namespace mlpack {
namespace hpt {
/*! @page hpt Hyper-Parameter Tuning
@@ -32,7 +32,7 @@ The interface of the hyper-parameter tuning module is quite similar to the
interface of the @ref cv "cross-validation module". To construct a \c
HyperParameterTuner object you need to specify as template parameters what
machine learning algorithm, cross-validation strategy, performance measure, and
optimization strategy (\ref optimization::GridSearch "GridSearch" will be used by
optimization strategy (\ref ens::GridSearch "GridSearch" will be used by
default) you are going to use. Then, you must pass the same arguments as for
the cross-validation classes: the data and labels (or responses) to use are
given to the constructor, and the possible hyperparameter values are given to
@@ -68,7 +68,7 @@ computation time.
std::tie(bestLambda) = hpt.Optimize(lambdas);
@endcode
In this example we have used \ref optimization::GridSearch "GridSearch" (the
In this example we have used \ref ens::GridSearch "GridSearch" (the
default optimizer) to find a good value for the \c lambda hyper-parameter. For
that we have specified what values should be tried.
@@ -121,7 +121,7 @@ real-valued hyperparameters, but wish to further tune those values.
In this case, we can use a gradient-based optimizer for hyperparameter search.
In the following example, we try to optimize the \c lambda1 and \c lambda2
hyper-parameters for \ref regression::LARS "LARS" with the
\ref optimization::GradientDescent "GradientDescent" optimizer.
\ref ens::GradientDescent "GradientDescent" optimizer.
@code
HyperParameterTuner<LARS, MSE, SimpleCV, GradientDescent> hpt3(validationSize,
@@ -190,7 +190,7 @@ HyperParameterTuner<LinearRegression, MSE, SimpleCV> hpt(0.2, dataset,
@endcode
Next, we must set up the hyperparameters to be optimized. If we are doing a
grid search with the \ref optimization::GridSearch "GridSearch" optimizer (the
grid search with the \ref ens::GridSearch "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.
+3 -3
View File
@@ -419,7 +419,7 @@ not work; this example exists for its API, not its implementation.
Note that layer sometimes have different properties. These properties are
known at compile-time through the mlpack::ann::LayerTraits class, and some
properties may imply the existence (or non-existence) of certain functions.
Refer to the LayerTraits @ref LayerTraits for more documentation on that.
Refer to the LayerTraits @ref layer_traits.hpp for more documentation on that.
The two template parameters below must be template parameters to the layer, in
the order given below. More template parameters are fine, but they must come
@@ -661,10 +661,10 @@ $ cat model.xml
</boost_serialization>
@endcode
As you can see, the \c <parameter> section of \c model.xml contains the trained
As you can see, the \c \<parameter\> section of \c model.xml contains the trained
network weights. We can see that this section also contains the network input
size, which is 66 rows and 1 column. Note that in this example, we used three
different layers, as can be seen by looking at the \c <network> section. Each
different layers, as can be seen by looking at the \c \<network\> section. Each
node has a unique id that is used to reconstruct the model when loading.
The models can also be saved as \c .bin or \c .txt; the \c .xml format provides
+1 -1
View File
@@ -87,7 +87,7 @@ In order to solve this problem, \b mlpack provides a number of interfaces.
approximate furthest neighbors
- a simple \ref cpp_qdafn_akfntut "C++ class for QDAFN"
- a simple \ref cpp_ds_akfntut "C++ class for DrusillaSelect"
- a simple \ref cpp_kfn_akfntut "C++ class for tree-based and brute-force"
- a simple \ref cpp_ns_akfntut "C++ class for tree-based and brute-force"
search
@section toc_akfntut Table of Contents
@@ -1,5 +1,5 @@
/**
* @serialization.hpp
* @file python/mlpack/serialization.hpp
* @author Ryan Curtin
*
* Simple utilities for boost::serialization.
+3 -3
View File
@@ -124,7 +124,7 @@ class HollowBallBound
/**
* Determines if a point is within this bound.
*
* @param point Point to check the condition.
* @param point Point to check the condition.
*/
template<typename VecType>
bool Contains(const VecType& point) const;
@@ -145,8 +145,8 @@ class HollowBallBound
void Center(VecType& center) const { center = this->center; }
/**
* Calculates minimum bound-to-point squared distance
*.
* Calculates minimum bound-to-point squared distance.
*
* @param point Point to which the minimum distance is requested.
*/
template<typename VecType>
+7 -3
View File
@@ -40,7 +40,7 @@ using DatasetInfo = DatasetMapper<IncrementPolicy, std::string>;
* - A page anchor for documentation, referencing another binding by its CMake
* binding name, i.e. "#knn".
* - A link to a Doxygen page, using the mangled Doxygen name after a
* '@doxygen/', i.e., "@doxygen/mlpack1_1_adaboost1_1_AdaBoost".
* '\@doxygen/', i.e., "@doxygen/mlpack1_1_adaboost1_1_AdaBoost".
*/
#define SEE_ALSO(DESCRIPTION, LINK) {DESCRIPTION, LINK}
@@ -64,7 +64,7 @@ using DatasetInfo = DatasetMapper<IncrementPolicy, std::string>;
* care of by CLI (however, you can explicitly specify newlines to denote
* new paragraphs). You can also use printing macros like
* PRINT_PARAM_STRING(), PRINT_DATASET(), and others.
* @param SEE_ALSOS A set of SEE_ALSO() macros that are used for generating
* @param ... A set of SEE_ALSO() macros that are used for generating
* documentation. See the SEE_ALSO() macro. This is a varargs argument, so
* you can add as many SEE_ALSO()s as you like.
*/
@@ -820,12 +820,13 @@ using DatasetInfo = DatasetMapper<IncrementPolicy, std::string>;
* The parameter can then be specified on the command line with
* --ID=value1,value2,value3.
*
* @param T Type of the parameter.
* @param ID Name of the parameter.
* @param DESC Quick description of the parameter (1-2 sentences). Don't use
* printing macros like PRINT_PARAM_STRING() or PRINT_DATASET() or others
* here---it will cause problems.
* @param ALIAS An alias for the parameter (one letter).
* @param DEF Default value of the parameter.
* @param T Default value of the parameter.
*
* @see mlpack::CLI, PROGRAM_INFO()
*
@@ -853,10 +854,12 @@ using DatasetInfo = DatasetMapper<IncrementPolicy, std::string>;
* If the parameter is not set by the end of the program, a fatal runtime error
* will be issued.
*
* @param T Type of the parameter.
* @param ID Name of the parameter.
* @param DESC Quick description of the parameter (1-2 sentences). Don't use
* printing macros like PRINT_PARAM_STRING() or PRINT_DATASET() or others
* here---it will cause problems.
* @param ALIAS An alias for the parameter (one letter).
*
* @see mlpack::CLI, PROGRAM_INFO()
*
@@ -1082,6 +1085,7 @@ using DatasetInfo = DatasetMapper<IncrementPolicy, std::string>;
* The parameter must then be specified on the command line with
* --ID=value1,value2,value3.
*
* @param T Type of the parameter.
* @param ID Name of the parameter.
* @param DESC Quick description of the parameter (1-2 sentences). Don't use
* printing macros like PRINT_PARAM_STRING() or PRINT_DATASET() or others
-2
View File
@@ -248,7 +248,6 @@ struct NAME \
*
* @param METHOD The name of the method to check for.
* @param NAME The name of the struct to construct.
* @param MAXN The maximum number of additional arguments.
*/
#define HAS_METHOD_FORM(METHOD, NAME) \
HAS_METHOD_FORM_BASE(SINGLE_ARG(METHOD), SINGLE_ARG(NAME), 7)
@@ -282,7 +281,6 @@ struct NAME \
*
* @param METHOD The name of the method to check for.
* @param NAME The name of the struct to construct.
* @param MAXN The maximum number of additional arguments.
*/
#define HAS_EXACT_METHOD_FORM(METHOD, NAME) \
HAS_METHOD_FORM_BASE(SINGLE_ARG(METHOD), SINGLE_ARG(NAME), 0)
+9 -9
View File
@@ -194,9 +194,9 @@ class RBM
/**
* Sample Hidden function samples the slab outputs from the Normal
* distribution with mean given by:
* $h_i*\alpha^{-1}*W_i^T*v$
* @f$ h_i*\alpha^{-1}*W_i^T*v @f$
* and variance:
* $\alpha&{-1}$
* @f$ \alpha&{-1} @f$
*
* @param input Hidden layer of the network.
* @param output The sampled visible layer.
@@ -218,7 +218,7 @@ class RBM
/**
* The function calculates the mean of the Normal distribution of P(v|s, h).
* The mean is given by:
* $\Lambda^{-1} \sum_{i=1}^N W_i * s_i * h_i$
* @f$ \Lambda^{-1} \sum_{i=1}^N W_i * s_i * h_i @f$
*
* @param input Consists of both the spike and slab variables.
* @param output Mean of the of the Normal distribution.
@@ -240,9 +240,9 @@ class RBM
/**
* The function calculates the mean of the Normal distribution of P(s|v, h).
* The mean is given by:
* $h_i*\alpha^{-1}*W_i^T*v$
* @f$ h_i*\alpha^{-1}*W_i^T*v @f$
* The variance is given by:
* $\alpha^{-1}$
* @f$ \alpha^{-1} @f$
*
* @param input Visible layer neurons.
* @param output Consists of both the spike samples and slab samples.
@@ -254,7 +254,7 @@ class RBM
/**
* The function calculates the mean of the distribution P(h|v),
* where mean is given by:
* $sigm(v^T*W_i*\alpha_i^{-1}*W_i^T*v + b_i)$
* @f$ sigm(v^T*W_i*\alpha_i^{-1}*W_i^T*v + b_i) @f$
*
* @param visible The visible layer neurons.
* @param spikeMean Indicates P(h|v).
@@ -275,7 +275,7 @@ class RBM
/**
* The function calculates the mean of Normal distribution of P(s|v, h),
* where the mean is given by:
* $h_i*\alpha^{-1}*W_i^T*v$
* @f$ h_i*\alpha^{-1}*W_i^T*v @f$
*
* @param visible The visible layer neurons.
* @param spike The spike variables from hidden layer.
@@ -288,9 +288,9 @@ class RBM
/**
* The function samples from the Normal distribution of P(s|v, h),
* where the mean is given by:
* $h_i*\alpha^{-1}*W_i^T*v$
* @f$ h_i*\alpha^{-1}*W_i^T*v @f$
* and variance is given by:
* $\alpha^{-1}$
* @f$ \alpha^{-1} @f$
*
* @param slabMean Mean of the Normal distribution of the slab neurons.
* @param slab Sampled slab variable from the Normal distribution.
+4
View File
@@ -9,6 +9,7 @@
*
* The details of this method can be found in the following paper:
*
* @code
* @inproceedings{datar2004locality,
* title={Locality-sensitive hashing scheme based on p-stable distributions},
* author={Datar, M. and Immorlica, N. and Indyk, P. and Mirrokni, V.S.},
@@ -18,11 +19,13 @@
* year={2004},
* organization={ACM}
* }
* @endcode
*
* Additionally, the class implements Multiprobe LSH, which improves
* approximation results during the search for approximate nearest neighbors.
* The Multiprobe LSH algorithm was presented in the paper:
*
* @code
* @inproceedings{Lv2007multiprobe,
* tile={Multi-probe LSH: efficient indexing for high-dimensional similarity
* search},
@@ -33,6 +36,7 @@
* year={2007},
* pages={950--961}
* }
* @endcode
*
*
* mlpack is free software; you may redistribute it and/or modify it under the
+2
View File
@@ -7,6 +7,7 @@
*
* The details of this method can be found in the following paper:
*
* @code
* @inproceedings{ram2009rank,
* title={{Rank-Approximate Nearest Neighbor Search: Retaining Meaning and
* Speed in High Dimensions}},
@@ -14,6 +15,7 @@
* booktitle={{Advances of Neural Information Processing Systems}},
* year={2009}
* }
* @endcode
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the