pulsatrix 1.1.0
Loading...
Searching...
No Matches
representation_geometry.hpp
Go to the documentation of this file.
1
15#pragma once
16
17#include <cstdint>
18#include <vector>
19
20#include "pulsatrix/tensor.hpp"
21
22namespace pulsatrix {
23
35[[nodiscard]] double Anisotropy(const Tensor& x, bool center = false);
36
41 double effective_rank = 0;
46 std::vector<double> singular_values;
47};
48
57[[nodiscard]] EffectiveRank MeasureEffectiveRank(const Tensor& x, bool center = true);
58
64 double dimension = 0;
67 double mle_dimension = 0;
69 int64_t points = 0;
71 int64_t duplicates = 0;
72};
73
88[[nodiscard]] TwoNNResult TwoNNDimension(const Tensor& x, double discard_fraction = 0.1);
89
90} // namespace pulsatrix
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Definition acquisition_functions.hpp:16
EffectiveRank MeasureEffectiveRank(const Tensor &x, bool center=true)
How many directions the rows spread along, from the singular values of x.
TwoNNResult TwoNNDimension(const Tensor &x, double discard_fraction=0.1)
TwoNN intrinsic dimension (Facco, d'Errico, Rodriguez and Laio, Scientific Reports 2017): from each p...
double Anisotropy(const Tensor &x, bool center=false)
The mean cosine similarity over all pairs of different rows: about 0 for directions spread evenly,...
MeasureEffectiveRank()'s result.
Definition representation_geometry.hpp:38
double participation_ratio
The participation ratio of the variances, (sum s^2)^2 / sum s^4: a coarser count that the largest dir...
Definition representation_geometry.hpp:44
double effective_rank
Roy and Vetterli's effective rank: exp of the entropy of the singular values divided by their sum....
Definition representation_geometry.hpp:41
std::vector< double > singular_values
The singular values, largest first: min(n, width) of them.
Definition representation_geometry.hpp:46
TwoNNDimension()'s result.
Definition representation_geometry.hpp:60
double mle_dimension
The maximum-likelihood estimate over all points, (N - 1) / sum log(mu), as DADApy's algorithm="ml" gi...
Definition representation_geometry.hpp:67
double dimension
Facco et al.'s estimate: the slope through the origin of -log(1 - F(mu)) against log(mu),...
Definition representation_geometry.hpp:64
int64_t duplicates
Rows dropped because they repeat an earlier row exactly.
Definition representation_geometry.hpp:71
int64_t points
Distinct points used.
Definition representation_geometry.hpp:69
N-dimensional tensor – owns a buffer via DeviceBackend*, RAII (Rule of Five).