QDAFN< MatType > Class Template Reference

Public Member Functions

 QDAFN (const size_t l, const size_t m)
 Construct the QDAFN object but do not train it. More...

 
 QDAFN (const MatType &referenceSet, const size_t l, const size_t m)
 Construct the QDAFN object with the given reference set (this is the set that will be searched). More...

 
const MatType & CandidateSet (const size_t t) const
 Get the candidate set for the given projection table. More...

 
MatType & CandidateSet (const size_t t)
 Modify the candidate set for the given projection table. Careful! More...

 
size_t NumProjections () const
 Get the number of projections. More...

 
void Search (const MatType &querySet, const size_t k, arma::Mat< size_t > &neighbors, arma::mat &distances)
 Search for the k furthest neighbors of the given query set. More...

 
template
<
typename
Archive
>
void serialize (Archive &ar, const uint32_t)
 Serialize the model. More...

 
void Train (const MatType &referenceSet, const size_t l=0, const size_t m=0)
 Train the QDAFN model on the given reference set, optionally setting new parameters for the number of projections/tables (l) and the number of elements stored for each projection/table (m). More...

 

Detailed Description


template
<
typename
MatType
=
arma::mat
>

class mlpack::neighbor::QDAFN< MatType >

Definition at line 34 of file qdafn.hpp.

Constructor & Destructor Documentation

◆ QDAFN() [1/2]

QDAFN ( const size_t  l,
const size_t  m 
)

Construct the QDAFN object but do not train it.

Be sure to call Train() before calling Search().

Parameters
lNumber of projections.
mNumber of elements to store for each projection.

◆ QDAFN() [2/2]

QDAFN ( const MatType &  referenceSet,
const size_t  l,
const size_t  m 
)

Construct the QDAFN object with the given reference set (this is the set that will be searched).

Parameters
referenceSetSet of reference data.
lNumber of projections.
mNumber of elements to store for each projection.

Member Function Documentation

◆ CandidateSet() [1/2]

const MatType& CandidateSet ( const size_t  t) const
inline

Get the candidate set for the given projection table.

Definition at line 90 of file qdafn.hpp.

◆ CandidateSet() [2/2]

MatType& CandidateSet ( const size_t  t)
inline

Modify the candidate set for the given projection table. Careful!

Definition at line 92 of file qdafn.hpp.

◆ NumProjections()

size_t NumProjections ( ) const
inline

Get the number of projections.

Definition at line 87 of file qdafn.hpp.

◆ Search()

void Search ( const MatType &  querySet,
const size_t  k,
arma::Mat< size_t > &  neighbors,
arma::mat &  distances 
)

Search for the k furthest neighbors of the given query set.

(The query set can contain just one point, that is okay.) The results will be stored in the given neighbors and distances matrices, in the same format as the mlpack NeighborSearch and LSHSearch classes.

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)

Serialize the model.

◆ Train()

void Train ( const MatType &  referenceSet,
const size_t  l = 0,
const size_t  m = 0 
)

Train the QDAFN model on the given reference set, optionally setting new parameters for the number of projections/tables (l) and the number of elements stored for each projection/table (m).

Parameters
referenceSetReference set to train on.
lNumber of projections.
mNumber of elements to store for each projection.

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