
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 rankapproximation and success probability. More...


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 distinct samples are returned from the range [0  specified upper bound) More...


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 'k'neighbors from a set of size 'n' within the top 't' neighbors if 'm' samples are made. More...


Definition at line 21 of file ra_util.hpp.
◆ MinimumSamplesReqd()
static size_t MinimumSamplesReqd 
( 
const size_t 
n, 


const size_t 
k, 


const double 
tau, 


const double 
alpha 

) 
 

static 
Compute the minimum number of samples required to guarantee the given rankapproximation and success probability.
 Parameters

n  Size of the set to be sampled from. 
k  The number of neighbors required within the rankapproximation. 
tau  The rankapproximation in percentile of the data. 
alpha  The success probability desired. 
◆ ObtainDistinctSamples()
static void ObtainDistinctSamples 
( 
const size_t 
numSamples, 


const size_t 
rangeUpperBound, 


arma::uvec & 
distinctSamples 

) 
 

static 
Pick up desired number of samples (with replacement) from a given range of integers so that only the distinct samples are returned from the range [0  specified upper bound)
 Parameters

numSamples  Number of random samples. 
rangeUpperBound  The upper bound on the range of integers. 
distinctSamples  The list of the distinct samples. 
◆ SuccessProbability()
static double SuccessProbability 
( 
const size_t 
n, 


const size_t 
k, 


const size_t 
m, 


const size_t 
t 

) 
 

static 
Compute the success probability of obtaining 'k'neighbors from a set of size 'n' within the top 't' neighbors if 'm' samples are made.
 Parameters

n  Size of the set being sampled from. 
k  The number of neighbors required within the rankapproximation. 
m  The number of random samples. 
t  The desired rankapproximation. 
The documentation for this class was generated from the following file:
 /home/jenkinsmlpack/mlpack.org/_src/mlpackgit/src/mlpack/methods/rann/ra_util.hpp