Tapkee
|
Typedefs | |
typedef Eigen::Triplet < tapkee::ScalarType > | SparseTriplet |
typedef TAPKEE_INTERNAL_VECTOR < tapkee::tapkee_internal::SparseTriplet > | SparseTriplets |
typedef TAPKEE_INTERNAL_VECTOR < tapkee::IndexType > | LocalNeighbors |
typedef TAPKEE_INTERNAL_VECTOR < tapkee::tapkee_internal::LocalNeighbors > | Neighbors |
typedef TAPKEE_INTERNAL_PAIR < tapkee::DenseMatrix, tapkee::DenseVector > | EigendecompositionResult |
typedef TAPKEE_INTERNAL_VECTOR < tapkee::IndexType > | Landmarks |
typedef TAPKEE_INTERNAL_PAIR < tapkee::SparseWeightMatrix, tapkee::DenseDiagonalMatrix > | Laplacian |
typedef TAPKEE_INTERNAL_PAIR < tapkee::DenseSymmetricMatrix, tapkee::DenseSymmetricMatrix > | DenseSymmetricMatrixPair |
typedef TAPKEE_INTERNAL_PAIR < tapkee::SparseMatrix, tapkee::tapkee_internal::Neighbors > | SparseMatrixNeighborsPair |
Functions | |
template<class RandomAccessIterator , class KernelCallback , class DistanceCallback , class FeaturesCallback > | |
ImplementationBase < RandomAccessIterator, KernelCallback, DistanceCallback, FeaturesCallback > | initialize (RandomAccessIterator begin, RandomAccessIterator end, KernelCallback kernel, DistanceCallback distance, FeaturesCallback features, ParametersSet &pmap, const Context &ctx) |
template<class RandomAccessIterator > | |
bool | is_connected (RandomAccessIterator begin, RandomAccessIterator end, const Neighbors &neighbors) |
template<class P > | |
void | free_children (const node< P > &n) |
ScalarType | dist_of_scale (int s) |
int | get_scale (ScalarType d) |
template<class P > | |
node< P > | new_node (const P &p) |
template<class P > | |
node< P > | new_leaf (const P &p) |
template<class P > | |
ScalarType | max_set (v_array< ds_node< P > > &v) |
void | print_space (int s) |
template<class P > | |
void | print (int depth, node< P > &top_node) |
template<class P > | |
void | split (v_array< ds_node< P > > &point_set, v_array< ds_node< P > > &far_set, int max_scale) |
template<class P , class DistanceCallback > | |
void | dist_split (DistanceCallback &dcb, v_array< ds_node< P > > &point_set, v_array< ds_node< P > > &new_point_set, P new_point, int max_scale) |
template<class P , class DistanceCallback > | |
node< P > | batch_insert (DistanceCallback &dcb, const P &p, int max_scale, int top_scale, v_array< ds_node< P > > &point_set, v_array< ds_node< P > > &consumed_set, v_array< v_array< ds_node< P > > > &stack) |
template<class P , class DistanceCallback > | |
node< P > | batch_create (DistanceCallback &dcb, v_array< P > points) |
void | add_height (int d, v_array< int > &heights) |
template<class P > | |
int | height_dist (const node< P > top_node, v_array< int > &heights) |
template<class P > | |
void | depth_dist (int top_scale, const node< P > top_node, v_array< int > &depths) |
template<class P > | |
void | breadth_dist (const node< P > top_node, v_array< int > &breadths) |
template<class P > | |
ScalarType | compare (const d_node< P > *p1, const d_node< P > *p2) |
template<class P > | |
void | halfsort (v_array< d_node< P > > cover_set) |
template<class P > | |
v_array< v_array< d_node< P > > > | get_cover_sets (v_array< v_array< v_array< d_node< P > > > > &spare_cover_sets) |
bool | shell (ScalarType parent_query_dist, ScalarType child_parent_dist, ScalarType upper_bound) |
void | update_k (ScalarType *k_upper_bound, ScalarType upper_bound) |
ScalarType * | alloc_k () |
void | set_k (ScalarType *begin, ScalarType max) |
ScalarType * | alloc_epsilon () |
void | set_epsilon (ScalarType *begin) |
void | update_unequal (ScalarType *upper_bound, ScalarType new_dist) |
void | set_unequal (ScalarType *begin, ScalarType max) |
template<class P , class DistanceCallback > | |
void | copy_zero_set (DistanceCallback &dcb, node< P > *query_chi, ScalarType *new_upper_bound, v_array< d_node< P > > &zero_set, v_array< d_node< P > > &new_zero_set) |
template<class P , class DistanceCallback > | |
void | copy_cover_sets (DistanceCallback &dcb, node< P > *query_chi, ScalarType *new_upper_bound, v_array< v_array< d_node< P > > > &cover_sets, v_array< v_array< d_node< P > > > &new_cover_sets, int current_scale, int max_scale) |
template<class P > | |
void | print_query (const node< P > *top_node) |
template<class P > | |
void | print_cover_sets (v_array< v_array< d_node< P > > > &cover_sets, v_array< d_node< P > > &zero_set, int current_scale, int max_scale) |
template<class P , class DistanceCallback > | |
void | descend (DistanceCallback &dcb, const node< P > *query, ScalarType *upper_bound, int current_scale, int &max_scale, v_array< v_array< d_node< P > > > &cover_sets, v_array< d_node< P > > &zero_set) |
template<class P , class DistanceCallback > | |
void | brute_nearest (DistanceCallback &dcb, const node< P > *query, v_array< d_node< P > > zero_set, ScalarType *upper_bound, v_array< v_array< P > > &results, v_array< v_array< d_node< P > > > &spare_zero_sets) |
template<class P , class DistanceCallback > | |
void | internal_batch_nearest_neighbor (DistanceCallback &dcb, const node< P > *query, v_array< v_array< d_node< P > > > &cover_sets, v_array< d_node< P > > &zero_set, int current_scale, int max_scale, ScalarType *upper_bound, v_array< v_array< P > > &results, v_array< v_array< v_array< d_node< P > > > > &spare_cover_sets, v_array< v_array< d_node< P > > > &spare_zero_sets) |
template<class P , class DistanceCallback > | |
void | batch_nearest_neighbor (DistanceCallback &dcb, const node< P > &top_node, const node< P > &query, v_array< v_array< P > > &results) |
template<class P , class DistanceCallback > | |
void | k_nearest_neighbor (DistanceCallback &dcb, const node< P > &top_node, const node< P > &query, v_array< v_array< P > > &results, int k) |
template<class T > | |
void | push (v_array< T > &v, const T &new_ele) |
template<class T > | |
void | alloc (v_array< T > &v, int length) |
template<class T > | |
v_array< T > | pop (v_array< v_array< T > > &stack) |
template<class RandomAccessIterator , class Callback > | |
ScalarType | distance (Callback &cb, const CoverTreePoint< RandomAccessIterator > &l, const CoverTreePoint< RandomAccessIterator > &r, ScalarType upper_bound) |
template<class RandomAccessIterator > | |
void | print (const CoverTreePoint< RandomAccessIterator > &) |
template<class RandomAccessIterator , class Callback > | |
Neighbors | find_neighbors_covertree_impl (RandomAccessIterator begin, RandomAccessIterator end, Callback callback, IndexType k) |
template<class RandomAccessIterator , class Callback > | |
Neighbors | find_neighbors_bruteforce_impl (const RandomAccessIterator &begin, const RandomAccessIterator &end, Callback callback, IndexType k) |
template<class RandomAccessIterator , class Callback > | |
Neighbors | find_neighbors_vptree_impl (const RandomAccessIterator &begin, const RandomAccessIterator &end, Callback callback, IndexType k) |
template<class RandomAccessIterator , class Callback > | |
Neighbors | find_neighbors (NeighborsMethod method, const RandomAccessIterator &begin, const RandomAccessIterator &end, const Callback &callback, IndexType k, bool check_connectivity) |
template<typename T > | |
TypePolicyBase * | getPolicy () |
template<typename T > | |
CheckerPolicyBase * | getCheckerPolicy () |
template<class RandomAccessIterator , class DistanceCallback > | |
DenseSymmetricMatrix | compute_diffusion_matrix (RandomAccessIterator begin, RandomAccessIterator end, DistanceCallback callback, const IndexType timesteps, const ScalarType width) |
template<class MatrixType , class MatrixOperationType > | |
EigendecompositionResult | eigendecomposition_impl_arpack (const MatrixType &wm, IndexType target_dimension, unsigned int skip) |
template<class MatrixType , class MatrixOperationType > | |
EigendecompositionResult | eigendecomposition_impl_dense (const MatrixType &wm, IndexType target_dimension, unsigned int skip) |
template<class MatrixType , class MatrixOperationType > | |
EigendecompositionResult | eigendecomposition_impl_randomized (const MatrixType &wm, IndexType target_dimension, unsigned int skip) |
template<class MatrixType , class MatrixOperationType > | |
EigendecompositionResult | eigendecomposition (EigenMethod method, const MatrixType &m, IndexType target_dimension, unsigned int skip) |
template<class RandomAccessIterator , class FeatureVectorCallback > | |
DenseMatrix | project (RandomAccessIterator begin, RandomAccessIterator end, FeatureVectorCallback callback, IndexType dimension, const IndexType max_iter, const ScalarType epsilon, const IndexType target_dimension, const DenseVector &mean_vector) |
template<class LMatrixType , class RMatrixType , class MatrixOperationType > | |
EigendecompositionResult | generalized_eigendecomposition_impl_arpack (const LMatrixType &lhs, const RMatrixType &rhs, IndexType target_dimension, unsigned int skip) |
template<class LMatrixType , class RMatrixType , class MatrixOperationType > | |
EigendecompositionResult | generalized_eigendecomposition_impl_dense (const LMatrixType &lhs, const RMatrixType &rhs, IndexType target_dimension, unsigned int skip) |
template<class LMatrixType , class RMatrixType , class MatrixOperationType > | |
EigendecompositionResult | generalized_eigendecomposition (EigenMethod method, const LMatrixType &lhs, const RMatrixType &rhs, IndexType target_dimension, unsigned int skip) |
template<class RandomAccessIterator , class DistanceCallback > | |
DenseSymmetricMatrix | compute_shortest_distances_matrix (const RandomAccessIterator &begin, const RandomAccessIterator &end, const Neighbors &neighbors, DistanceCallback callback) |
template<class RandomAccessIterator , class DistanceCallback > | |
DenseMatrix | compute_shortest_distances_matrix (const RandomAccessIterator &begin, const RandomAccessIterator &end, const Landmarks &landmarks, const Neighbors &neighbors, DistanceCallback callback) |
template<class RandomAccessIterator , class DistanceCallback > | |
Laplacian | compute_laplacian (RandomAccessIterator begin, RandomAccessIterator end, const Neighbors &neighbors, DistanceCallback callback, ScalarType width) |
template<class RandomAccessIterator , class FeatureVectorCallback > | |
DenseSymmetricMatrixPair | construct_locality_preserving_eigenproblem (SparseWeightMatrix &L, DenseDiagonalMatrix &D, RandomAccessIterator begin, RandomAccessIterator end, FeatureVectorCallback feature_vector_callback, IndexType dimension) |
template<class RandomAccessIterator , class PairwiseCallback > | |
SparseWeightMatrix | tangent_weight_matrix (RandomAccessIterator begin, RandomAccessIterator end, const Neighbors &neighbors, PairwiseCallback callback, const IndexType target_dimension, const ScalarType shift, const bool partial_eigendecomposer=false) |
template<class RandomAccessIterator , class PairwiseCallback > | |
SparseWeightMatrix | linear_weight_matrix (const RandomAccessIterator &begin, const RandomAccessIterator &end, const Neighbors &neighbors, PairwiseCallback callback, const ScalarType shift, const ScalarType trace_shift) |
template<class RandomAccessIterator , class PairwiseCallback > | |
SparseWeightMatrix | hessian_weight_matrix (RandomAccessIterator begin, RandomAccessIterator end, const Neighbors &neighbors, PairwiseCallback callback, const IndexType target_dimension) |
template<class RandomAccessIterator , class FeatureVectorCallback > | |
DenseSymmetricMatrixPair | construct_neighborhood_preserving_eigenproblem (SparseWeightMatrix W, RandomAccessIterator begin, RandomAccessIterator end, FeatureVectorCallback feature_vector_callback, IndexType dimension) |
template<class RandomAccessIterator , class FeatureVectorCallback > | |
DenseSymmetricMatrixPair | construct_lltsa_eigenproblem (SparseWeightMatrix W, RandomAccessIterator begin, RandomAccessIterator end, FeatureVectorCallback feature_vector_callback, IndexType dimension) |
template<class RandomAccessIterator , class DistanceCallback > | |
SparseMatrix | neighbors_distances_matrix (RandomAccessIterator begin, RandomAccessIterator end, const Neighbors &neighbors, DistanceCallback callback, ScalarType &average_distance) |
SparseMatrixNeighborsPair | angles_matrix_and_neighbors (const Neighbors &neighbors, const DenseMatrix &data) |
ScalarType | average_neighbor_distance (const DenseMatrix &data, const Neighbors &neighbors) |
ScalarType | compute_error_for_point (const IndexType index, const DenseMatrix &data, const DataForErrorFunc &error_func_data) |
IndexType | adjust_point_at_index (const IndexType index, DenseMatrix &data, const IndexType target_dimension, const ScalarType learning_rate, const DataForErrorFunc &error_func_data, ScalarType &point_error) |
template<class RandomAccessIterator , class DistanceCallback > | |
void | manifold_sculpting_embed (RandomAccessIterator begin, RandomAccessIterator end, DenseMatrix &data, IndexType target_dimension, const Neighbors &neighbors, DistanceCallback callback, IndexType max_iteration, ScalarType squishing_rate) |
template<class RandomAccessIterator > | |
Landmarks | select_landmarks_random (RandomAccessIterator begin, RandomAccessIterator end, ScalarType ratio) |
template<class RandomAccessIterator , class PairwiseCallback > | |
DenseSymmetricMatrix | compute_distance_matrix (RandomAccessIterator begin, RandomAccessIterator, const Landmarks &landmarks, PairwiseCallback callback) |
template<class RandomAccessIterator , class PairwiseCallback > | |
DenseMatrix | triangulate (RandomAccessIterator begin, RandomAccessIterator end, PairwiseCallback distance_callback, const Landmarks &landmarks, const DenseVector &landmark_distances_squared, EigendecompositionResult &landmarks_embedding, IndexType target_dimension) |
template<class RandomAccessIterator , class PairwiseCallback > | |
DenseSymmetricMatrix | compute_distance_matrix (RandomAccessIterator begin, RandomAccessIterator end, PairwiseCallback callback) |
template<class RandomAccessIterator , class FeatureVectorCallback > | |
DenseMatrix | project (const DenseMatrix &projection_matrix, const DenseVector &mean_vector, RandomAccessIterator begin, RandomAccessIterator end, FeatureVectorCallback callback, IndexType dimension) |
template<class RandomAccessIterator , class FeatureVectorCallback > | |
DenseVector | compute_mean (RandomAccessIterator begin, RandomAccessIterator end, FeatureVectorCallback callback, IndexType dimension) |
template<class RandomAccessIterator , class FeatureVectorCallback > | |
DenseSymmetricMatrix | compute_covariance_matrix (RandomAccessIterator begin, RandomAccessIterator end, const DenseVector &mean, FeatureVectorCallback callback, IndexType dimension) |
template<class RandomAccessIterator , class KernelCallback > | |
DenseSymmetricMatrix | compute_centered_kernel_matrix (RandomAccessIterator begin, RandomAccessIterator end, KernelCallback callback) |
DenseMatrix | gaussian_projection_matrix (IndexType target_dimension, IndexType current_dimension) |
template<class RandomAccessIterator , class PairwiseCallback > | |
DenseMatrix | spe_embedding (RandomAccessIterator begin, RandomAccessIterator end, PairwiseCallback callback, const Neighbors &neighbors, IndexType target_dimension, bool global_strategy, ScalarType tolerance, int nupdates, IndexType max_iter) |
template<class RandomAccessIterator , class FeaturesCallback > | |
DenseMatrix | dense_matrix_from_features (FeaturesCallback features, IndexType dimension, RandomAccessIterator begin, RandomAccessIterator end) |
void | centerMatrix (DenseMatrix &matrix) |
SparseMatrix | sparse_matrix_from_triplets (const SparseTriplets &sparse_triplets, IndexType m, IndexType n) |
Variables | |
static ScalarType | base = COVERTREE_BASE |
static ScalarType | il2 = 1. / log(base) |
int | internal_k =1 |
ScalarType | internal_epsilon =0. |
ScalarType *(* | alloc_unequal )() = alloc_epsilon |
void(* | update )(ScalarType *foo, ScalarType bar) = update_k |
void(* | setter )(ScalarType *foo, ScalarType bar) = set_k |
ScalarType *(* | alloc_upper )() = alloc_k |
Main namespace for all internal routines, should not be exposed as public API.
typedef TAPKEE_INTERNAL_PAIR<tapkee::DenseSymmetricMatrix,tapkee::DenseSymmetricMatrix> DenseSymmetricMatrixPair |
Definition at line 44 of file synonyms.hpp.
Definition at line 41 of file synonyms.hpp.
Definition at line 42 of file synonyms.hpp.
Definition at line 43 of file synonyms.hpp.
Definition at line 39 of file synonyms.hpp.
Definition at line 40 of file synonyms.hpp.
typedef TAPKEE_INTERNAL_PAIR<tapkee::SparseMatrix,tapkee::tapkee_internal::Neighbors> SparseMatrixNeighborsPair |
Definition at line 45 of file synonyms.hpp.
typedef Eigen::Triplet<tapkee::ScalarType> SparseTriplet |
Definition at line 35 of file synonyms.hpp.
Definition at line 38 of file synonyms.hpp.
void tapkee::tapkee_internal::add_height | ( | int | d, |
v_array< int > & | heights | ||
) |
Definition at line 332 of file covertree.hpp.
IndexType tapkee::tapkee_internal::adjust_point_at_index | ( | const IndexType | index, |
DenseMatrix & | data, | ||
const IndexType | target_dimension, | ||
const ScalarType | learning_rate, | ||
const DataForErrorFunc & | error_func_data, | ||
ScalarType & | point_error | ||
) |
Adjust the data point at given index to restore the original relationships between point and its neighbors. Uses simple hill-climbing technique
index | index of the point to adjust |
data | the data matrix - will be changed after the point adjustment (only index column will change) |
target_dimension | - you know, what it is:) |
learning_rate | some small value, that will be used during hill-climbing to change the points coordinates |
error_func_data | a special struct, that contains data, needed for error function calculation - such as initial distances between neighbors, initial angles, etc. |
point_error | - will be set to the error function value, calculated for the point |
Definition at line 216 of file manifold_sculpting.hpp.
void tapkee::tapkee_internal::alloc | ( | v_array< T > & | v, |
int | length | ||
) |
Used to modify the capacity of the vector
v | vector |
length | the new length of the vector |
Definition at line 81 of file covertree_point.hpp.
ScalarType* tapkee::tapkee_internal::alloc_epsilon | ( | ) |
Definition at line 510 of file covertree.hpp.
ScalarType* tapkee::tapkee_internal::alloc_k | ( | ) |
Definition at line 498 of file covertree.hpp.
SparseMatrixNeighborsPair tapkee::tapkee_internal::angles_matrix_and_neighbors | ( | const Neighbors & | neighbors, |
const DenseMatrix & | data | ||
) |
Definition at line 95 of file manifold_sculpting.hpp.
ScalarType tapkee::tapkee_internal::average_neighbor_distance | ( | const DenseMatrix & | data, |
const Neighbors & | neighbors | ||
) |
Definition at line 146 of file manifold_sculpting.hpp.
node<P> tapkee::tapkee_internal::batch_create | ( | DistanceCallback & | dcb, |
v_array< P > | points | ||
) |
Definition at line 299 of file covertree.hpp.
node<P> tapkee::tapkee_internal::batch_insert | ( | DistanceCallback & | dcb, |
const P & | p, | ||
int | max_scale, | ||
int | top_scale, | ||
v_array< ds_node< P > > & | point_set, | ||
v_array< ds_node< P > > & | consumed_set, | ||
v_array< v_array< ds_node< P > > > & | stack | ||
) |
Definition at line 202 of file covertree.hpp.
void tapkee::tapkee_internal::batch_nearest_neighbor | ( | DistanceCallback & | dcb, |
const node< P > & | top_node, | ||
const node< P > & | query, | ||
v_array< v_array< P > > & | results | ||
) |
Definition at line 787 of file covertree.hpp.
void tapkee::tapkee_internal::breadth_dist | ( | const node< P > | top_node, |
v_array< int > & | breadths | ||
) |
Definition at line 374 of file covertree.hpp.
void tapkee::tapkee_internal::brute_nearest | ( | DistanceCallback & | dcb, |
const node< P > * | query, | ||
v_array< d_node< P > > | zero_set, | ||
ScalarType * | upper_bound, | ||
v_array< v_array< P > > & | results, | ||
v_array< v_array< d_node< P > > > & | spare_zero_sets | ||
) |
Definition at line 699 of file covertree.hpp.
void tapkee::tapkee_internal::centerMatrix | ( | DenseMatrix & | matrix | ) |
Definition at line 9 of file matrix.hpp.
ScalarType tapkee::tapkee_internal::compare | ( | const d_node< P > * | p1, |
const d_node< P > * | p2 | ||
) |
Definition at line 400 of file covertree.hpp.
DenseSymmetricMatrix tapkee::tapkee_internal::compute_centered_kernel_matrix | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
KernelCallback | callback | ||
) |
DenseSymmetricMatrix tapkee::tapkee_internal::compute_covariance_matrix | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
const DenseVector & | mean, | ||
FeatureVectorCallback | callback, | ||
IndexType | dimension | ||
) |
DenseSymmetricMatrix tapkee::tapkee_internal::compute_diffusion_matrix | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
DistanceCallback | callback, | ||
const IndexType | timesteps, | ||
const ScalarType | width | ||
) |
Computes diffusion process matrix. Uses the following algorithm:
begin | begin data iterator |
end | end data iterator |
callback | distance callback |
timesteps | number of timesteps ![]() |
width | width ![]() |
Definition at line 36 of file diffusion_maps.hpp.
DenseSymmetricMatrix tapkee::tapkee_internal::compute_distance_matrix | ( | RandomAccessIterator | begin, |
RandomAccessIterator | , | ||
const Landmarks & | landmarks, | ||
PairwiseCallback | callback | ||
) |
Definition at line 32 of file multidimensional_scaling.hpp.
DenseSymmetricMatrix tapkee::tapkee_internal::compute_distance_matrix | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
PairwiseCallback | callback | ||
) |
Definition at line 111 of file multidimensional_scaling.hpp.
ScalarType tapkee::tapkee_internal::compute_error_for_point | ( | const IndexType | index, |
const DenseMatrix & | data, | ||
const DataForErrorFunc & | error_func_data | ||
) |
Definition at line 161 of file manifold_sculpting.hpp.
Laplacian tapkee::tapkee_internal::compute_laplacian | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
const Neighbors & | neighbors, | ||
DistanceCallback | callback, | ||
ScalarType | width | ||
) |
Computes laplacian of neighborhood graph.
Follows the algorithm described below:
begin | begin data iterator |
end | end data iterator |
neighbors | neighbors of each vector |
callback | distance callback |
width | width ![]() |
Definition at line 39 of file laplacian_eigenmaps.hpp.
DenseVector tapkee::tapkee_internal::compute_mean | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
FeatureVectorCallback | callback, | ||
IndexType | dimension | ||
) |
DenseSymmetricMatrix tapkee::tapkee_internal::compute_shortest_distances_matrix | ( | const RandomAccessIterator & | begin, |
const RandomAccessIterator & | end, | ||
const Neighbors & | neighbors, | ||
DistanceCallback | callback | ||
) |
Computes shortest distances (so-called geodesic distances) using Dijkstra algorithm.
begin | begin data iterator |
end | end data iterator |
neighbors | neighbors of each vector |
callback | distance callback |
Definition at line 44 of file isomap.hpp.
DenseMatrix tapkee::tapkee_internal::compute_shortest_distances_matrix | ( | const RandomAccessIterator & | begin, |
const RandomAccessIterator & | end, | ||
const Landmarks & | landmarks, | ||
const Neighbors & | neighbors, | ||
DistanceCallback | callback | ||
) |
Computes shortest distances (so-called geodesic distances) using Dijkstra algorithm with landmarks.
begin | begin data iterator |
end | end data iterator |
landmarks | landmarks |
neighbors | neighbors of each vector |
callback | distance callback |
Definition at line 161 of file isomap.hpp.
DenseSymmetricMatrixPair tapkee::tapkee_internal::construct_lltsa_eigenproblem | ( | SparseWeightMatrix | W, |
RandomAccessIterator | begin, | ||
RandomAccessIterator | end, | ||
FeatureVectorCallback | feature_vector_callback, | ||
IndexType | dimension | ||
) |
Definition at line 311 of file locally_linear.hpp.
DenseSymmetricMatrixPair tapkee::tapkee_internal::construct_locality_preserving_eigenproblem | ( | SparseWeightMatrix & | L, |
DenseDiagonalMatrix & | D, | ||
RandomAccessIterator | begin, | ||
RandomAccessIterator | end, | ||
FeatureVectorCallback | feature_vector_callback, | ||
IndexType | dimension | ||
) |
Definition at line 82 of file laplacian_eigenmaps.hpp.
DenseSymmetricMatrixPair tapkee::tapkee_internal::construct_neighborhood_preserving_eigenproblem | ( | SparseWeightMatrix | W, |
RandomAccessIterator | begin, | ||
RandomAccessIterator | end, | ||
FeatureVectorCallback | feature_vector_callback, | ||
IndexType | dimension | ||
) |
Definition at line 273 of file locally_linear.hpp.
void tapkee::tapkee_internal::copy_cover_sets | ( | DistanceCallback & | dcb, |
node< P > * | query_chi, | ||
ScalarType * | new_upper_bound, | ||
v_array< v_array< d_node< P > > > & | cover_sets, | ||
v_array< v_array< d_node< P > > > & | new_cover_sets, | ||
int | current_scale, | ||
int | max_scale | ||
) |
Definition at line 560 of file covertree.hpp.
void tapkee::tapkee_internal::copy_zero_set | ( | DistanceCallback & | dcb, |
node< P > * | query_chi, | ||
ScalarType * | new_upper_bound, | ||
v_array< d_node< P > > & | zero_set, | ||
v_array< d_node< P > > & | new_zero_set | ||
) |
Definition at line 535 of file covertree.hpp.
DenseMatrix tapkee::tapkee_internal::dense_matrix_from_features | ( | FeaturesCallback | features, |
IndexType | dimension, | ||
RandomAccessIterator | begin, | ||
RandomAccessIterator | end | ||
) |
Definition at line 19 of file features.hpp.
void tapkee::tapkee_internal::depth_dist | ( | int | top_scale, |
const node< P > | top_node, | ||
v_array< int > & | depths | ||
) |
Definition at line 363 of file covertree.hpp.
void tapkee::tapkee_internal::descend | ( | DistanceCallback & | dcb, |
const node< P > * | query, | ||
ScalarType * | upper_bound, | ||
int | current_scale, | ||
int & | max_scale, | ||
v_array< v_array< d_node< P > > > & | cover_sets, | ||
v_array< d_node< P > > & | zero_set | ||
) |
Definition at line 640 of file covertree.hpp.
ScalarType tapkee::tapkee_internal::dist_of_scale | ( | int | s | ) |
Definition at line 98 of file covertree.hpp.
void tapkee::tapkee_internal::dist_split | ( | DistanceCallback & | dcb, |
v_array< ds_node< P > > & | point_set, | ||
v_array< ds_node< P > > & | new_point_set, | ||
P | new_point, | ||
int | max_scale | ||
) |
Definition at line 175 of file covertree.hpp.
ScalarType tapkee::tapkee_internal::distance | ( | Callback & | cb, |
const CoverTreePoint< RandomAccessIterator > & | l, | ||
const CoverTreePoint< RandomAccessIterator > & | r, | ||
ScalarType | upper_bound | ||
) |
Functions declared out of the class definition to respect CoverTree structure
Definition at line 131 of file covertree_point.hpp.
EigendecompositionResult tapkee::tapkee_internal::eigendecomposition | ( | EigenMethod | method, |
const MatrixType & | m, | ||
IndexType | target_dimension, | ||
unsigned int | skip | ||
) |
Multiple implementation handler method for various eigendecomposition methods.
Has three template parameters: MatrixType - class of weight matrix to perform eigendecomposition of MatrixOperationType - class of product operation over matrix.
In order to compute largest eigenvalues MatrixOperationType should provide implementation of operator()(DenseMatrix) which computes right product of the parameter with the MatrixType.
In order to compute smallest eigenvalues MatrixOperationType should provide implementation of operator()(DenseMatrix) which solves linear system with given right-hand side part.
Currently supports three methods:
method | one of supported eigendecomposition methods |
m | matrix to be eigendecomposed |
target_dimension | target dimension of embedding i.e. number of eigenvectors to be computed |
skip | number of eigenvectors to skip (from either smallest or largest side) |
Definition at line 171 of file eigendecomposition.hpp.
EigendecompositionResult tapkee::tapkee_internal::eigendecomposition_impl_arpack | ( | const MatrixType & | wm, |
IndexType | target_dimension, | ||
unsigned int | skip | ||
) |
ARPACK implementation of eigendecomposition-based embedding.
Definition at line 31 of file eigendecomposition.hpp.
EigendecompositionResult tapkee::tapkee_internal::eigendecomposition_impl_dense | ( | const MatrixType & | wm, |
IndexType | target_dimension, | ||
unsigned int | skip | ||
) |
Eigen library dense implementation of eigendecomposition-based embedding.
Definition at line 56 of file eigendecomposition.hpp.
EigendecompositionResult tapkee::tapkee_internal::eigendecomposition_impl_randomized | ( | const MatrixType & | wm, |
IndexType | target_dimension, | ||
unsigned int | skip | ||
) |
Randomized redsvd-like implementation of eigendecomposition-based embedding.
Definition at line 86 of file eigendecomposition.hpp.
Neighbors tapkee::tapkee_internal::find_neighbors | ( | NeighborsMethod | method, |
const RandomAccessIterator & | begin, | ||
const RandomAccessIterator & | end, | ||
const Callback & | callback, | ||
IndexType | k, | ||
bool | check_connectivity | ||
) |
Definition at line 173 of file neighbors.hpp.
Neighbors tapkee::tapkee_internal::find_neighbors_bruteforce_impl | ( | const RandomAccessIterator & | begin, |
const RandomAccessIterator & | end, | ||
Callback | callback, | ||
IndexType | k | ||
) |
Definition at line 120 of file neighbors.hpp.
Neighbors tapkee::tapkee_internal::find_neighbors_covertree_impl | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
Callback | callback, | ||
IndexType | k | ||
) |
Definition at line 78 of file neighbors.hpp.
Neighbors tapkee::tapkee_internal::find_neighbors_vptree_impl | ( | const RandomAccessIterator & | begin, |
const RandomAccessIterator & | end, | ||
Callback | callback, | ||
IndexType | k | ||
) |
Definition at line 152 of file neighbors.hpp.
void tapkee::tapkee_internal::free_children | ( | const node< P > & | n | ) |
Definition at line 69 of file covertree.hpp.
DenseMatrix tapkee::tapkee_internal::gaussian_projection_matrix | ( | IndexType | target_dimension, |
IndexType | current_dimension | ||
) |
Definition at line 19 of file random_projection.hpp.
EigendecompositionResult tapkee::tapkee_internal::generalized_eigendecomposition | ( | EigenMethod | method, |
const LMatrixType & | lhs, | ||
const RMatrixType & | rhs, | ||
IndexType | target_dimension, | ||
unsigned int | skip | ||
) |
Definition at line 81 of file generalized_eigendecomposition.hpp.
EigendecompositionResult tapkee::tapkee_internal::generalized_eigendecomposition_impl_arpack | ( | const LMatrixType & | lhs, |
const RMatrixType & | rhs, | ||
IndexType | target_dimension, | ||
unsigned int | skip | ||
) |
ARPACK implementation of eigendecomposition-based embedding.
Definition at line 24 of file generalized_eigendecomposition.hpp.
EigendecompositionResult tapkee::tapkee_internal::generalized_eigendecomposition_impl_dense | ( | const LMatrixType & | lhs, |
const RMatrixType & | rhs, | ||
IndexType | target_dimension, | ||
unsigned int | skip | ||
) |
Eigen library dense implementation of eigendecomposition.
Definition at line 50 of file generalized_eigendecomposition.hpp.
v_array<v_array<d_node<P> > > tapkee::tapkee_internal::get_cover_sets | ( | v_array< v_array< v_array< d_node< P > > > > & | spare_cover_sets | ) |
Definition at line 464 of file covertree.hpp.
int tapkee::tapkee_internal::get_scale | ( | ScalarType | d | ) |
Definition at line 103 of file covertree.hpp.
CheckerPolicyBase* tapkee::tapkee_internal::getCheckerPolicy | ( | ) |
Definition at line 180 of file policy.hpp.
TypePolicyBase* tapkee::tapkee_internal::getPolicy | ( | ) |
Definition at line 55 of file policy.hpp.
void tapkee::tapkee_internal::halfsort | ( | v_array< d_node< P > > | cover_set | ) |
Definition at line 406 of file covertree.hpp.
int tapkee::tapkee_internal::height_dist | ( | const node< P > | top_node, |
v_array< int > & | heights | ||
) |
Definition at line 341 of file covertree.hpp.
SparseWeightMatrix tapkee::tapkee_internal::hessian_weight_matrix | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
const Neighbors & | neighbors, | ||
PairwiseCallback | callback, | ||
const IndexType | target_dimension | ||
) |
Definition at line 177 of file locally_linear.hpp.
ImplementationBase<RandomAccessIterator,KernelCallback,DistanceCallback,FeaturesCallback> tapkee::tapkee_internal::initialize | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
KernelCallback | kernel, | ||
DistanceCallback | distance, | ||
FeaturesCallback | features, | ||
ParametersSet & | pmap, | ||
const Context & | ctx | ||
) |
Definition at line 518 of file methods.hpp.
void tapkee::tapkee_internal::internal_batch_nearest_neighbor | ( | DistanceCallback & | dcb, |
const node< P > * | query, | ||
v_array< v_array< d_node< P > > > & | cover_sets, | ||
v_array< d_node< P > > & | zero_set, | ||
int | current_scale, | ||
int | max_scale, | ||
ScalarType * | upper_bound, | ||
v_array< v_array< P > > & | results, | ||
v_array< v_array< v_array< d_node< P > > > > & | spare_cover_sets, | ||
v_array< v_array< d_node< P > > > & | spare_zero_sets | ||
) |
Definition at line 735 of file covertree.hpp.
bool tapkee::tapkee_internal::is_connected | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
const Neighbors & | neighbors | ||
) |
Definition at line 18 of file connected.hpp.
void tapkee::tapkee_internal::k_nearest_neighbor | ( | DistanceCallback & | dcb, |
const node< P > & | top_node, | ||
const node< P > & | query, | ||
v_array< v_array< P > > & | results, | ||
int | k | ||
) |
Definition at line 828 of file covertree.hpp.
SparseWeightMatrix tapkee::tapkee_internal::linear_weight_matrix | ( | const RandomAccessIterator & | begin, |
const RandomAccessIterator & | end, | ||
const Neighbors & | neighbors, | ||
PairwiseCallback | callback, | ||
const ScalarType | shift, | ||
const ScalarType | trace_shift | ||
) |
Definition at line 106 of file locally_linear.hpp.
void tapkee::tapkee_internal::manifold_sculpting_embed | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
DenseMatrix & | data, | ||
IndexType | target_dimension, | ||
const Neighbors & | neighbors, | ||
DistanceCallback | callback, | ||
IndexType | max_iteration, | ||
ScalarType | squishing_rate | ||
) |
Definition at line 259 of file manifold_sculpting.hpp.
ScalarType tapkee::tapkee_internal::max_set | ( | v_array< ds_node< P > > & | v | ) |
Definition at line 124 of file covertree.hpp.
SparseMatrix tapkee::tapkee_internal::neighbors_distances_matrix | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
const Neighbors & | neighbors, | ||
DistanceCallback | callback, | ||
ScalarType & | average_distance | ||
) |
Definition at line 67 of file manifold_sculpting.hpp.
node<P> tapkee::tapkee_internal::new_leaf | ( | const P & | p | ) |
Definition at line 117 of file covertree.hpp.
node<P> tapkee::tapkee_internal::new_node | ( | const P & | p | ) |
Definition at line 109 of file covertree.hpp.
v_array<T> tapkee::tapkee_internal::pop | ( | v_array< v_array< T > > & | stack | ) |
Returns the vector previous to the pointed one in the stack of vectors and decrements the index of the stack. No memory is freed here. If there are no vectors stored in the stack, create and return a new empty vector
stack | of vectors |
Definition at line 97 of file covertree_point.hpp.
void tapkee::tapkee_internal::print | ( | int | depth, |
node< P > & | top_node | ||
) |
Definition at line 140 of file covertree.hpp.
void tapkee::tapkee_internal::print | ( | const CoverTreePoint< RandomAccessIterator > & | ) |
Print the information of the CoverTree point
Definition at line 168 of file covertree_point.hpp.
void tapkee::tapkee_internal::print_cover_sets | ( | v_array< v_array< d_node< P > > > & | cover_sets, |
v_array< d_node< P > > & | zero_set, | ||
int | current_scale, | ||
int | max_scale | ||
) |
Definition at line 602 of file covertree.hpp.
void tapkee::tapkee_internal::print_query | ( | const node< P > * | top_node | ) |
Definition at line 590 of file covertree.hpp.
void tapkee::tapkee_internal::print_space | ( | int | s | ) |
Definition at line 133 of file covertree.hpp.
DenseMatrix tapkee::tapkee_internal::project | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
FeatureVectorCallback | callback, | ||
IndexType | dimension, | ||
const IndexType | max_iter, | ||
const ScalarType | epsilon, | ||
const IndexType | target_dimension, | ||
const DenseVector & | mean_vector | ||
) |
DenseMatrix tapkee::tapkee_internal::project | ( | const DenseMatrix & | projection_matrix, |
const DenseVector & | mean_vector, | ||
RandomAccessIterator | begin, | ||
RandomAccessIterator | end, | ||
FeatureVectorCallback | callback, | ||
IndexType | dimension | ||
) |
void tapkee::tapkee_internal::push | ( | v_array< T > & | v, |
const T & | new_ele | ||
) |
Insert a new element at the end of the vector
v | vector |
new_ele | element to insert |
Definition at line 64 of file covertree_point.hpp.
Landmarks tapkee::tapkee_internal::select_landmarks_random | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
ScalarType | ratio | ||
) |
Definition at line 20 of file multidimensional_scaling.hpp.
void tapkee::tapkee_internal::set_epsilon | ( | ScalarType * | begin | ) |
Definition at line 514 of file covertree.hpp.
void tapkee::tapkee_internal::set_k | ( | ScalarType * | begin, |
ScalarType | max | ||
) |
Definition at line 502 of file covertree.hpp.
void tapkee::tapkee_internal::set_unequal | ( | ScalarType * | begin, |
ScalarType | max | ||
) |
Definition at line 525 of file covertree.hpp.
bool tapkee::tapkee_internal::shell | ( | ScalarType | parent_query_dist, |
ScalarType | child_parent_dist, | ||
ScalarType | upper_bound | ||
) |
Definition at line 475 of file covertree.hpp.
SparseMatrix tapkee::tapkee_internal::sparse_matrix_from_triplets | ( | const SparseTriplets & | sparse_triplets, |
IndexType | m, | ||
IndexType | n | ||
) |
Definition at line 18 of file sparse.hpp.
DenseMatrix tapkee::tapkee_internal::spe_embedding | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
PairwiseCallback | callback, | ||
const Neighbors & | neighbors, | ||
IndexType | target_dimension, | ||
bool | global_strategy, | ||
ScalarType | tolerance, | ||
int | nupdates, | ||
IndexType | max_iter | ||
) |
void tapkee::tapkee_internal::split | ( | v_array< ds_node< P > > & | point_set, |
v_array< ds_node< P > > & | far_set, | ||
int | max_scale | ||
) |
Definition at line 158 of file covertree.hpp.
SparseWeightMatrix tapkee::tapkee_internal::tangent_weight_matrix | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
const Neighbors & | neighbors, | ||
PairwiseCallback | callback, | ||
const IndexType | target_dimension, | ||
const ScalarType | shift, | ||
const bool | partial_eigendecomposer = false |
||
) |
Definition at line 25 of file locally_linear.hpp.
DenseMatrix tapkee::tapkee_internal::triangulate | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
PairwiseCallback | distance_callback, | ||
const Landmarks & | landmarks, | ||
const DenseVector & | landmark_distances_squared, | ||
EigendecompositionResult & | landmarks_embedding, | ||
IndexType | target_dimension | ||
) |
Definition at line 59 of file multidimensional_scaling.hpp.
void tapkee::tapkee_internal::update_k | ( | ScalarType * | k_upper_bound, |
ScalarType | upper_bound | ||
) |
Definition at line 482 of file covertree.hpp.
void tapkee::tapkee_internal::update_unequal | ( | ScalarType * | upper_bound, |
ScalarType | new_dist | ||
) |
Definition at line 519 of file covertree.hpp.
ScalarType*(* alloc_unequal)() = alloc_epsilon |
Definition at line 524 of file covertree.hpp.
ScalarType*(* alloc_upper)() = alloc_k |
Definition at line 532 of file covertree.hpp.
|
static |
Definition at line 95 of file covertree.hpp.
|
static |
Definition at line 96 of file covertree.hpp.
ScalarType internal_epsilon =0. |
Definition at line 508 of file covertree.hpp.
int internal_k =1 |
Definition at line 481 of file covertree.hpp.
void(* setter)(ScalarType *foo, ScalarType bar) = set_k |
Definition at line 531 of file covertree.hpp.
void(* update)(ScalarType *foo, ScalarType bar) = update_k |
Definition at line 530 of file covertree.hpp.