chernoff.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @author Joana Plewnia ( uhfpm at student dot kit dot edu )
17 * @date 2023
18 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19 * GNU General Public License
20 */
21
22#pragma once
23
24#include <algorithm>
25#include <map>
26#include <vector>
27
29
31{
33
34 armarx::aron::data::NDArray normalize_ndarray(armarx::aron::data::NDArrayPtr array, int i);
35
36 std::vector<double> calculate_mean_values(armarx::aron::data::NDArray array);
37
38 std::vector<std::vector<double>> calculate_covariance_matrix(armarx::aron::data::NDArray array,
39 std::vector<double> mean);
40
41 double calculate_bhattacharyya_distance(std::vector<double> mean_one,
42 std::vector<double> mean_two,
43 std::vector<std::vector<double>> covariance_one,
44 std::vector<std::vector<double>> covariance_two);
45} // namespace armarx::aron::similarity::chernoff
std::shared_ptr< NDArray > NDArrayPtr
Definition NDArray.h:46
data::NDArray normalize_ndarray(data::NDArrayPtr array, int j)
Definition chernoff.cpp:71
double compute_similarity(const aron::data::NDArrayPtr p1, const aron::data::NDArrayPtr p2)
Definition chernoff.cpp:14
std::vector< double > calculate_mean_values(data::NDArray array)
Definition chernoff.cpp:41
double calculate_bhattacharyya_distance(std::vector< double > mean_one, std::vector< double > mean_two, std::vector< std::vector< double > > covariance_one, std::vector< std::vector< double > > covariance_two)
Definition chernoff.cpp:146
std::vector< std::vector< double > > calculate_covariance_matrix(data::NDArray array, std::vector< double > mean=std::vector< double >())
Definition chernoff.cpp:89
std::optional< float > mean(const boost::circular_buffer< NameValueMap > &buffer, const std::string &key)