Static Public Member Functions

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 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...

 

Detailed Description

Definition at line 21 of file ra_util.hpp.

Member Function Documentation

◆ 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 rank-approximation and success probability.

Parameters
nSize of the set to be sampled from.
kThe number of neighbors required within the rank-approximation.
tauThe rank-approximation in percentile of the data.
alphaThe 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
numSamplesNumber of random samples.
rangeUpperBoundThe upper bound on the range of integers.
distinctSamplesThe 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
nSize of the set being sampled from.
kThe number of neighbors required within the rank-approximation.
mThe number of random samples.
tThe desired rank-approximation.

The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-git/src/mlpack/methods/rann/ra_util.hpp