mlpack
master
|
Public Member Functions | |
DrusillaSelect (const MatType &referenceSet, const size_t l, const size_t m) | |
Construct the DrusillaSelect object with the given reference set (this is the set that will be searched). More... | |
DrusillaSelect (const size_t l, const size_t m) | |
Construct the DrusillaSelect object with no given reference set. More... | |
const arma::Col< size_t > & | CandidateIndices () const |
Access the indices of points in the candidate set. More... | |
arma::Col< size_t > & | CandidateIndices () |
Modify the indices of points in the candidate set. Be careful! More... | |
const MatType & | CandidateSet () const |
Access the candidate set. More... | |
MatType & | CandidateSet () |
Modify the candidate set. Be careful! 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) |
Build the set of candidate points on the given reference set. More... | |
Private Attributes | |
arma::Col< size_t > | candidateIndices |
Indices of each point in the reference set. More... | |
MatType | candidateSet |
The reference set. More... | |
size_t | l |
The number of projections. More... | |
size_t | m |
The number of points in each projection. More... | |
Definition at line 39 of file drusilla_select.hpp.
mlpack::neighbor::DrusillaSelect< MatType >::DrusillaSelect | ( | const MatType & | referenceSet, |
const size_t | l, | ||
const size_t | m | ||
) |
Construct the DrusillaSelect object with the given reference set (this is the set that will be searched).
The resulting set of candidate points that will be searched at query time will have size l*m.
referenceSet | Set of reference data. |
l | Number of projections. |
m | Number of elements to store for each projection. |
mlpack::neighbor::DrusillaSelect< MatType >::DrusillaSelect | ( | const size_t | l, |
const size_t | m | ||
) |
Construct the DrusillaSelect object with no given reference set.
Be sure to call Train() before calling Search()!
l | Number of projections. |
m | Number of elements to store for each projection. |
|
inline |
Access the indices of points in the candidate set.
Definition at line 108 of file drusilla_select.hpp.
References mlpack::neighbor::DrusillaSelect< MatType >::candidateIndices.
|
inline |
Modify the indices of points in the candidate set. Be careful!
Definition at line 110 of file drusilla_select.hpp.
References mlpack::neighbor::DrusillaSelect< MatType >::candidateIndices.
|
inline |
Access the candidate set.
Definition at line 103 of file drusilla_select.hpp.
References mlpack::neighbor::DrusillaSelect< MatType >::candidateSet.
|
inline |
Modify the candidate set. Be careful!
Definition at line 105 of file drusilla_select.hpp.
References mlpack::neighbor::DrusillaSelect< MatType >::candidateSet.
void mlpack::neighbor::DrusillaSelect< 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 NeighborSearch and LSHSearch classes. That is, each column in the neighbors and distances matrices will refer to a single query point, and the k'th row in that column will refer to the k'th candidate neighbor or distance for that query point.
querySet | Set of query points to search. |
k | Number of furthest neighbors to search for. |
neighbors | Matrix to store resulting neighbors in. |
distances | Matrix to store resulting distances in. |
void mlpack::neighbor::DrusillaSelect< MatType >::Serialize | ( | Archive & | ar, |
const unsigned | int | ||
) |
Serialize the model.
void mlpack::neighbor::DrusillaSelect< MatType >::Train | ( | const MatType & | referenceSet, |
const size_t | l = 0 , |
||
const size_t | m = 0 |
||
) |
Build the set of candidate points on the given reference set.
If l and m are left unspecified, then the values set in the constructor will be used instead.
referenceSet | Set to extract candidate points from. |
l | Number of projections. |
m | Number of elements to store for each projection. |
|
private |
Indices of each point in the reference set.
Definition at line 116 of file drusilla_select.hpp.
Referenced by mlpack::neighbor::DrusillaSelect< MatType >::CandidateIndices().
|
private |
The reference set.
Definition at line 114 of file drusilla_select.hpp.
Referenced by mlpack::neighbor::DrusillaSelect< MatType >::CandidateSet().
|
private |
The number of projections.
Definition at line 119 of file drusilla_select.hpp.
|
private |
The number of points in each projection.
Definition at line 121 of file drusilla_select.hpp.