mlpack
master
|
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 unsigned int) |
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... | |
Private Attributes | |
std::vector< MatType > | candidateSet |
size_t | l |
The number of projections. More... | |
arma::mat | lines |
The random lines we are projecting onto. Has l columns. More... | |
size_t | m |
The number of elements to store for each projection. More... | |
arma::mat | projections |
Projections of each point onto each random line. More... | |
arma::Mat< size_t > | sIndices |
Indices of the points for each S. More... | |
arma::mat | sValues |
Values of a_i * x for each point in S. More... | |
mlpack::neighbor::QDAFN< MatType >::QDAFN | ( | const size_t | l, |
const size_t | m | ||
) |
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).
referenceSet | Set of reference data. |
l | Number of projections. |
m | Number of elements to store for each projection. |
|
inline |
Get the candidate set for the given projection table.
Definition at line 90 of file qdafn.hpp.
References mlpack::neighbor::QDAFN< MatType >::candidateSet.
|
inline |
Modify the candidate set for the given projection table. Careful!
Definition at line 92 of file qdafn.hpp.
References mlpack::neighbor::QDAFN< MatType >::candidateSet.
|
inline |
Get the number of projections.
Definition at line 87 of file qdafn.hpp.
References mlpack::neighbor::QDAFN< MatType >::candidateSet.
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.
void mlpack::neighbor::QDAFN< MatType >::Serialize | ( | Archive & | ar, |
const unsigned | int | ||
) |
Serialize the model.
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).
referenceSet | Reference set to train on. |
l | Number of projections. |
m | Number of elements to store for each projection. |
|
private |
Definition at line 110 of file qdafn.hpp.
Referenced by mlpack::neighbor::QDAFN< MatType >::CandidateSet(), and mlpack::neighbor::QDAFN< MatType >::NumProjections().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |