Functions for fitting Gaussian distributions to a set of samples. More...
#include <bsta/bsta_gaussian.h>
#include <bsta/bsta_gaussian_sphere.h>
#include <bsta/bsta_gaussian_indep.h>
#include <bsta/bsta_gaussian_full.h>
#include <bsta/bsta_mixture.h>
#include <bsta/bsta_attributes.h>
#include <vcl_iostream.h>
Go to the source code of this file.
Functions | |
template<class T > | |
void | bsta_fit_gaussian (vcl_vector< T > const &samples, vcl_vector< T > const &sample_weights, bsta_gaussian_sphere< T, 1 > &gaussian) |
fit a 1D Gaussian distribution to a set of weighted samples. | |
template<class T , unsigned n> | |
void | bsta_fit_gaussian (vcl_vector< vnl_vector_fixed< T, n > > const &samples, vcl_vector< T > const &sample_weights, bsta_gaussian_sphere< T, n > &gaussian) |
fit a N-D spherical Gaussian distribution to a set of weighted samples. | |
template<class T , unsigned n> | |
void | bsta_fit_gaussian (vcl_vector< vnl_vector_fixed< T, n > > const &samples, vcl_vector< T > const &sample_weights, bsta_gaussian_indep< T, n > &gaussian) |
fit a N-D independent Gaussian distribution to a set of weighted samples. | |
template<class T , unsigned n> | |
void | bsta_fit_gaussian (vcl_vector< vnl_vector_fixed< T, n > > const &samples, vcl_vector< T > const &sample_weights, bsta_gaussian_full< T, n > &gaussian) |
fit a N-D Gaussian distribution with full covariance to a set of weighted samples. | |
template<class T > | |
T | clip_covar (T var, T min_var) |
template<class T , unsigned n> | |
vnl_vector_fixed< T, n > | clip_covar (vnl_vector_fixed< T, n > covar, vnl_vector_fixed< T, n > min_covar) |
template<class T , unsigned n> | |
vnl_matrix_fixed< T, n, n > | clip_covar (vnl_matrix_fixed< T, n, n > covar, vnl_matrix_fixed< T, n, n > min_covar) |
template<class gauss_type > | |
void | bsta_fit_gaussian (vcl_vector< typename gauss_type::vector_type > const &samples, vcl_vector< typename gauss_type::math_type > const &sample_probs, vcl_vector< typename gauss_type::math_type > const &prob_densities_other, gauss_type &gaussian, typename gauss_type::covar_type min_covar) |
Functions for fitting Gaussian distributions to a set of samples.
Modifications
Definition in file bsta_fit_gaussian.h.
void bsta_fit_gaussian | ( | vcl_vector< T > const & | samples, |
vcl_vector< T > const & | sample_weights, | ||
bsta_gaussian_sphere< T, 1 > & | gaussian | ||
) |
fit a 1D Gaussian distribution to a set of weighted samples.
Definition at line 25 of file bsta_fit_gaussian.h.
void bsta_fit_gaussian | ( | vcl_vector< vnl_vector_fixed< T, n > > const & | samples, |
vcl_vector< T > const & | sample_weights, | ||
bsta_gaussian_sphere< T, n > & | gaussian | ||
) |
fit a N-D spherical Gaussian distribution to a set of weighted samples.
Definition at line 73 of file bsta_fit_gaussian.h.
void bsta_fit_gaussian | ( | vcl_vector< vnl_vector_fixed< T, n > > const & | samples, |
vcl_vector< T > const & | sample_weights, | ||
bsta_gaussian_indep< T, n > & | gaussian | ||
) |
fit a N-D independent Gaussian distribution to a set of weighted samples.
Definition at line 119 of file bsta_fit_gaussian.h.
void bsta_fit_gaussian | ( | vcl_vector< vnl_vector_fixed< T, n > > const & | samples, |
vcl_vector< T > const & | sample_weights, | ||
bsta_gaussian_full< T, n > & | gaussian | ||
) |
fit a N-D Gaussian distribution with full covariance to a set of weighted samples.
Definition at line 164 of file bsta_fit_gaussian.h.
void bsta_fit_gaussian | ( | vcl_vector< typename gauss_type::vector_type > const & | samples, |
vcl_vector< typename gauss_type::math_type > const & | sample_probs, | ||
vcl_vector< typename gauss_type::math_type > const & | prob_densities_other, | ||
gauss_type & | gaussian, | ||
typename gauss_type::covar_type | min_covar | ||
) |
Definition at line 239 of file bsta_fit_gaussian.h.
T clip_covar | ( | T | var, |
T | min_var | ||
) |
Definition at line 208 of file bsta_fit_gaussian.h.
vnl_vector_fixed<T,n> clip_covar | ( | vnl_vector_fixed< T, n > | covar, |
vnl_vector_fixed< T, n > | min_covar | ||
) |
Definition at line 213 of file bsta_fit_gaussian.h.
vnl_matrix_fixed<T,n,n> clip_covar | ( | vnl_matrix_fixed< T, n, n > | covar, |
vnl_matrix_fixed< T, n, n > | min_covar | ||
) |
Definition at line 224 of file bsta_fit_gaussian.h.