mlpack
Public Member Functions | List of all members
mlpack::neighbor::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...
 
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...
 
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.
 
size_t NumProjections () const
 Get the number of projections.
 
const MatType & CandidateSet (const size_t t) const
 Get the candidate set for the given projection table.
 
MatType & CandidateSet (const size_t t)
 Modify the candidate set for the given projection table. Careful!
 

Constructor & Destructor Documentation

◆ QDAFN() [1/2]

template<typename MatType >
mlpack::neighbor::QDAFN< MatType >::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]

template<typename MatType >
mlpack::neighbor::QDAFN< MatType >::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

◆ Search()

template<typename MatType >
void mlpack::neighbor::QDAFN< MatType >::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.

◆ Train()

template<typename MatType >
void mlpack::neighbor::QDAFN< MatType >::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 files: