A class implementing persistence heat maps. More...
Public Member Functions | |
Persistence_heat_maps () | |
Persistence_heat_maps (const std::vector< std::pair< double, double > > &interval, std::vector< std::vector< double > > filter=create_Gaussian_filter(5, 1), bool erase_below_diagonal=false, size_t number_of_pixels=1000, double min_=std::numeric_limits< double >::max(), double max_=std::numeric_limits< double >::max()) | |
Persistence_heat_maps (const char *filename, std::vector< std::vector< double > > filter=create_Gaussian_filter(5, 1), bool erase_below_diagonal=false, size_t number_of_pixels=1000, double min_=std::numeric_limits< double >::max(), double max_=std::numeric_limits< double >::max(), unsigned dimension=std::numeric_limits< unsigned >::max()) | |
Persistence_heat_maps (const std::vector< std::pair< double, double > > &interval, const std::function< double(std::pair< double, double >, std::pair< double, double >)> &kernel, size_t number_of_x_pixels, size_t number_of_y_pixels, double min_x=0, double max_x=1, double min_y=0, double max_y=1) | |
Persistence_heat_maps (const std::vector< std::pair< double, double > > &interval, const std::function< double(std::pair< double, double >, std::pair< double, double >)> &kernel) | |
void | compute_mean (const std::vector< Persistence_heat_maps *> &maps) |
void | compute_median (const std::vector< Persistence_heat_maps *> &maps) |
void | compute_percentage_of_active (const std::vector< Persistence_heat_maps *> &maps, size_t cutoff=1) |
void | print_to_file (const char *filename) const |
void | load_from_file (const char *filename) |
bool | check_if_the_same (const Persistence_heat_maps &second) const |
double | get_min () const |
double | get_max () const |
bool | operator== (const Persistence_heat_maps &rhs) const |
bool | operator!= (const Persistence_heat_maps &rhs) const |
void | plot (const char *filename) const |
Persistence_heat_maps | multiply_by_scalar (double scalar) const |
Persistence_heat_maps | operator* (double scalar) |
Persistence_heat_maps | operator+= (const Persistence_heat_maps &rhs) |
Persistence_heat_maps | operator-= (const Persistence_heat_maps &rhs) |
Persistence_heat_maps | operator*= (double x) |
Persistence_heat_maps | operator/= (double x) |
std::vector< double > | vectorize (int number_of_function) const |
size_t | number_of_vectorize_functions () const |
double | project_to_R (int number_of_function) const |
size_t | number_of_projections_to_R () const |
double | distance (const Persistence_heat_maps &second_, double power=1) const |
void | compute_average (const std::vector< Persistence_heat_maps *> &to_average) |
double | compute_scalar_product (const Persistence_heat_maps &second_) const |
std::pair< double, double > | get_x_range () const |
std::pair< double, double > | get_y_range () const |
Friends | |
Persistence_heat_maps | operator+ (const Persistence_heat_maps &first, const Persistence_heat_maps &second) |
Persistence_heat_maps | operator- (const Persistence_heat_maps &first, const Persistence_heat_maps &second) |
Persistence_heat_maps | operator* (double scalar, const Persistence_heat_maps &A) |
Persistence_heat_maps | operator* (const Persistence_heat_maps &A, double scalar) |
A class implementing persistence heat maps.
|
inline |
The default constructor. A scaling function from the diagonal is set up to a constant function. The image is not erased below the diagonal. The Gaussian have diameter 5.
Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::Persistence_heat_maps | ( | const std::vector< std::pair< double, double > > & | interval, |
std::vector< std::vector< double > > | filter = create_Gaussian_filter(5, 1) , |
||
bool | erase_below_diagonal = false , |
||
size_t | number_of_pixels = 1000 , |
||
double | min_ = std::numeric_limits<double>::max() , |
||
double | max_ = std::numeric_limits<double>::max() |
||
) |
Construction that takes at the input the following parameters: (1) A vector of pairs of doubles (representing persistence intervals). All other parameters are optional. They are: (2) a Gaussian filter generated by create_Gaussian_filter filter (the default value of this variable is a Gaussian filter of a radius 5), (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will be erased by default). (4) a number of pixels in each direction (set to 1000 by default). (5) a min x and y value of points that are to be taken into account. By default it is set to std::numeric_limits<double>::max(), in which case the program compute the values based on the data, (6) a max x and y value of points that are to be taken into account. By default it is set to std::numeric_limits<double>::max(), in which case the program compute the values based on the data.
Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::Persistence_heat_maps | ( | const char * | filename, |
std::vector< std::vector< double > > | filter = create_Gaussian_filter(5, 1) , |
||
bool | erase_below_diagonal = false , |
||
size_t | number_of_pixels = 1000 , |
||
double | min_ = std::numeric_limits<double>::max() , |
||
double | max_ = std::numeric_limits<double>::max() , |
||
unsigned | dimension = std::numeric_limits<unsigned>::max() |
||
) |
Construction that takes at the input a name of a file with persistence intervals, a filter (radius 5 by default), a scaling function (constant by default), a boolean value which determines if the area of image below diagonal should, or should not be erased (should by default). The next parameter is the number of pixels in each direction (set to 1000 by default) and min and max values of images (both set to std::numeric_limits<double>::max() by default. If this is the case, the program will pick the right values based on the data). Construction that takes at the input the following parameters: (1) A name of a file with persistence intervals. The file should be readable by the function read_persistence_intervals_in_one_dimension_from_file. All other parameters are optional. They are: (2) a Gaussian filter generated by create_Gaussian_filter filter (the default value of this variable is a Gaussian filter of a radius 5), (3) a boolean value which determines if the area of image below diagonal should, or should not be erased (it will be erased by default). (4) a number of pixels in each direction (set to 1000 by default). (5) a min x and y value of points that are to be taken into account. By default it is set to std::numeric_limits<double>::max(), in which case the program compute the values based on the data, (6) a max x and y value of points that are to be taken into account. By default it is set to std::numeric_limits<double>::max(), in which case the program compute the values based on the data.
Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::Persistence_heat_maps | ( | const std::vector< std::pair< double, double > > & | interval, |
const std::function< double(std::pair< double, double >, std::pair< double, double >)> & | kernel, | ||
size_t | number_of_x_pixels, | ||
size_t | number_of_y_pixels, | ||
double | min_x = 0 , |
||
double | max_x = 1 , |
||
double | min_y = 0 , |
||
double | max_y = 1 |
||
) |
Construction that takes as inputs (1) the diagram, and (2) the grid parameters (min, max and number of samples for x and y axes)
Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::Persistence_heat_maps | ( | const std::vector< std::pair< double, double > > & | interval, |
const std::function< double(std::pair< double, double >, std::pair< double, double >)> & | kernel | ||
) |
Construction that takes only the diagram as input (weight and 2D kernel are template parameters)
|
inline |
The procedure checks if min_, max_ and this->heat_maps sizes are the same.
void Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::compute_average | ( | const std::vector< Persistence_heat_maps< Scalling_of_kernels > *> & | to_average | ) |
A function to compute averaged persistence heat map, based on vector of persistence heat maps. This function is required by Topological_data_with_averages concept.
void Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::compute_mean | ( | const std::vector< Persistence_heat_maps< Scalling_of_kernels > *> & | maps | ) |
Compute a mean value of a collection of heat maps and store it in the current object. Note that all the persistence maps send in a vector to this procedure need to have the same parameters. If this is not the case, the program will throw an exception.
void Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::compute_median | ( | const std::vector< Persistence_heat_maps< Scalling_of_kernels > *> & | maps | ) |
Compute a median value of a collection of heat maps and store it in the current object. Note that all the persistence maps send in a vector to this procedure need to have the same parameters. If this is not the case, the program will throw an exception.
void Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::compute_percentage_of_active | ( | const std::vector< Persistence_heat_maps< Scalling_of_kernels > *> & | maps, |
size_t | cutoff = 1 |
||
) |
Compute a percentage of active (i.e) values above the cutoff of a collection of heat maps.
double Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::compute_scalar_product | ( | const Persistence_heat_maps< Scalling_of_kernels > & | second_ | ) | const |
A function to compute scalar product of persistence heat maps. The parameter of this function is a const reference to an object of a class Persistence_heat_maps. This function is required in Topological_data_with_scalar_product concept.
double Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::distance | ( | const Persistence_heat_maps< Scalling_of_kernels > & | second_, |
double | power = 1 |
||
) | const |
A function to compute distance between persistence heat maps. The parameter of this function is a const reference to an object of a class Persistence_heat_maps. This function is required in Topological_data_with_distances concept. For max norm distance, set power to std::numeric_limits<double>::max()
|
inline |
Return maximal range value of persistent image.
|
inline |
Return minimal range value of persistent image.
|
inline |
The x-range of the persistence heat map.
|
inline |
The y-range of the persistence heat map.
void Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::load_from_file | ( | const char * | filename | ) |
A function that load a heat map from file to the current object (and erase whatever was stored in the current object before).
|
inline |
Multiplication of Persistence_heat_maps by scalar (so that all values of the heat map gets multiplied by that scalar).
|
inline |
The function gives the number of possible projections to R. This function is required by the Real_valued_topological_data concept.
|
inline |
This function return the number of functions that allows vectorization of persistence heat map. It is required in a concept Vectorized_topological_data.
|
inline |
Operator != to check if to persistence heat maps are different.
|
inline |
This function computes a product of an object of a type Persistence_heat_maps with real number.
|
inline |
*= operator for Persistence_heat_maps.
|
inline |
+= operator for Persistence_heat_maps.
|
inline |
-= operator for Persistence_heat_maps.
|
inline |
/= operator for Persistence_heat_maps.
|
inline |
Operator == to check if to persistence heat maps are the same.
void Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::plot | ( | const char * | filename | ) | const |
A function to generate a gnuplot script to visualize the persistent image.
void Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::print_to_file | ( | const char * | filename | ) | const |
The function outputs the persistence image to a text file. The format as follow: In the first line, the values min and max of the image are stored In the next lines, we have the persistence images in a form of a bitmap image.
double Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::project_to_R | ( | int | number_of_function | ) | const |
This function is required by the Real_valued_topological_data concept. It returns various projections on the persistence heat map to a real line. At the moment this function is not tested, since it is quite likely to be changed in the future. Given this, when using it, keep in mind that it will be most likely changed in the next versions.
std::vector< double > Gudhi::Persistence_representations::Persistence_heat_maps< Scalling_of_kernels >::vectorize | ( | int | number_of_function | ) | const |
This function produce a vector of doubles based on a persistence heat map. It is required in a concept Vectorized_topological_data
|
friend |
This function computes a product of an object of a type Persistence_heat_maps with real number.
|
friend |
This function computes a product of an object of a type Persistence_heat_maps with real number.
|
friend |
This function computes a sum of two objects of a type Persistence_heat_maps.
|
friend |
This function computes a difference of two objects of a type Persistence_heat_maps.
GUDHI Version 3.3.0 - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding. - Copyright : MIT | Generated on Tue Aug 11 2020 11:09:13 for GUDHI by Doxygen 1.8.13 |