ra_util.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_METHODS_RANN_RA_UTIL_HPP
14 #define MLPACK_METHODS_RANN_RA_UTIL_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 
18 namespace mlpack {
19 namespace neighbor {
20 
21 class RAUtil
22 {
23  public:
33  static size_t MinimumSamplesReqd(const size_t n,
34  const size_t k,
35  const double tau,
36  const double alpha);
37 
47  static double SuccessProbability(const size_t n,
48  const size_t k,
49  const size_t m,
50  const size_t t);
51 
61  static void ObtainDistinctSamples(const size_t numSamples,
62  const size_t rangeUpperBound,
63  arma::uvec& distinctSamples);
64 };
65 
66 } // namespace neighbor
67 } // namespace mlpack
68 
69 #endif
static size_t MinimumSamplesReqd(const size_t n, const size_t k, const double tau, const double alpha)
Compute the minimum number of samples required to guarantee the given rank-approximation and success ...
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
static void ObtainDistinctSamples(const size_t numSamples, const size_t rangeUpperBound, arma::uvec &distinctSamples)
Pick up desired number of samples (with replacement) from a given range of integers so that only the ...
see subsection cli_alt_reg_tut Alternate DET regularization The usual regularized error f $R_ alpha(t)\f$ of a node \f $t\f$ is given by
Definition: det.txt:344
static double SuccessProbability(const size_t n, const size_t k, const size_t m, const size_t t)
Compute the success probability of obtaining &#39;k&#39;-neighbors from a set of size &#39;n&#39; within the top &#39;t&#39; ...