pulsatrix 1.1.0
Loading...
Searching...
No Matches
vectorization.hpp
Go to the documentation of this file.
1
19#pragma once
20
21#include <cstdint>
22#include <vector>
23
26
27namespace pulsatrix {
28
30[[nodiscard]] std::vector<double> LinearGrid(double start, double stop, int64_t n);
31
36[[nodiscard]] std::vector<int64_t> BettiCurve(const PersistenceDiagram& diagram, const std::vector<double>& grid);
37
40 std::vector<double> grid;
41 std::vector<std::vector<double>> layers;
42};
43
52 const std::vector<double>& grid,
53 int64_t layers = 5);
54
58 int64_t width = 20;
59 int64_t height = 20;
63 double birth_min = 0;
64 double birth_max = 0;
65 double persistence_max = 0;
68 double sigma = 0;
69};
70
73 int64_t width = 0;
74 int64_t height = 0;
75 double birth_min = 0;
76 double birth_max = 0;
77 double persistence_max = 0;
78 double sigma = 0;
79 std::vector<double> values;
80};
81
90 const PersistenceImageOptions& options = {});
91
97[[nodiscard]] double PersistentEntropy(const PersistenceDiagram& diagram);
98
99} // namespace pulsatrix
Distances between persistence diagrams, bottleneck and Wasserstein, and Certified<T>,...
Definition acquisition_functions.hpp:16
std::vector< int64_t > BettiCurve(const PersistenceDiagram &diagram, const std::vector< double > &grid)
The Betti curve: how many features are alive, birth <= t < death, at each scale t.
Certified< PersistenceLandscape > ComputePersistenceLandscape(const PersistenceDiagram &diagram, const std::vector< double > &grid, int64_t layers=5)
The first layers persistence landscape functions (Bubenik, JMLR 2015) on a grid: lambda_k(t) is the k...
std::vector< double > LinearGrid(double start, double stop, int64_t n)
n evenly spaced values from start to stop, both included (n >= 2), or {start} for n == 1.
double PersistentEntropy(const PersistenceDiagram &diagram)
Persistent entropy (Chintakunta et al. 2015; Rucco et al. 2016): the Shannon entropy,...
PersistenceImage ComputePersistenceImage(const PersistenceDiagram &diagram, const PersistenceImageOptions &options={})
The persistence image (Adams et al., JMLR 2017): each finite point (b, d) placed at (b,...
A persistence diagram: the features of one homology dimension, each born at one scale and dying at a ...
A computed value and a certified bound on its error, itemized by source: the exact value is within bo...
Definition diagram_distance.hpp:40
The features of one homology dimension: H0 for components, H1 for loops, H2 for voids.
Definition persistence_diagram.hpp:32
ComputePersistenceImage()'s settings.
Definition vectorization.hpp:56
double persistence_max
Definition vectorization.hpp:65
double sigma
The Gaussian's standard deviation; 0 or less takes a tenth of the persistence range.
Definition vectorization.hpp:68
double birth_min
The birth range [birth_min, birth_max] and persistence range [0, persistence_max] the image covers....
Definition vectorization.hpp:63
int64_t width
Pixels along birth (columns) and persistence (rows).
Definition vectorization.hpp:58
int64_t height
Definition vectorization.hpp:59
double birth_max
Definition vectorization.hpp:64
A persistence image: values[row * width + column], row 0 at persistence 0.
Definition vectorization.hpp:72
double persistence_max
Definition vectorization.hpp:77
double birth_min
Definition vectorization.hpp:75
int64_t width
Definition vectorization.hpp:73
int64_t height
Definition vectorization.hpp:74
double sigma
Definition vectorization.hpp:78
std::vector< double > values
Definition vectorization.hpp:79
double birth_max
Definition vectorization.hpp:76
PersistenceLandscape()'s result: layers[k][i] is lambda_{k+1}(grid[i]).
Definition vectorization.hpp:39
std::vector< std::vector< double > > layers
Definition vectorization.hpp:41
std::vector< double > grid
Definition vectorization.hpp:40