Classes | |
class | itpp::Stat |
A class for sampling a signal and calculating statistics. More... | |
Functions | |
template<class T> | |
T | itpp::max (const Vec< T > &v) |
Maximum value of vector. | |
template<class T> | |
T | itpp::max (const Vec< T > &v, int &index) |
Maximum value of vector, also returns the index position of max value. | |
template<class T> | |
Vec< T > | itpp::max (const Mat< T > &m, int dim=1) |
template<class T> | |
Vec< T > | itpp::max (const Mat< T > &m, ivec &index, int dim=1) |
template<class T> | |
T | itpp::min (const Vec< T > &in) |
Minimum value of vector. | |
template<class T> | |
T | itpp::min (const Vec< T > &in, int &index) |
Minimum value of vector, also returns the index position of min value. | |
template<class T> | |
Vec< T > | itpp::min (const Mat< T > &m, int dim=1) |
template<class T> | |
Vec< T > | itpp::min (const Mat< T > &m, ivec &index, int dim=1) |
template<class T> | |
int | itpp::max_index (const Vec< T > &in) |
Return the postion of the maximum element in the vector. | |
template<class T> | |
void | itpp::max_index (const Mat< T > &m, int &row, int &col) |
Return the postion of the maximum element in the matrix. | |
template<class T> | |
int | itpp::min_index (const Vec< T > &in) |
Return the postion of the minimum element in the vector. | |
template<class T> | |
void | itpp::min_index (const Mat< T > &m, int &row, int &col) |
Return the postion of the minimum element in the matrix. | |
double | itpp::mean (const vec &v) |
The mean value. | |
std::complex< double > | itpp::mean (const cvec &v) |
The mean value. | |
double | itpp::mean (const svec &v) |
The mean value. | |
double | itpp::mean (const ivec &v) |
The mean value. | |
double | itpp::mean (const mat &m) |
The mean value. | |
std::complex< double > | itpp::mean (const cmat &m) |
The mean value. | |
double | itpp::mean (const smat &m) |
The mean value. | |
double | itpp::mean (const imat &m) |
template<class T> | |
double | itpp::geometric_mean (const Vec< T > &v) |
The geometric mean value. | |
template<class T> | |
double | itpp::median (const Vec< T > &v) |
The median. | |
double | itpp::norm (const cvec &v) |
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2)). | |
template<class T> | |
double | itpp::norm (const Vec< T > &v) |
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2)). | |
double | itpp::norm (const cvec &v, int p) |
Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p). | |
template<class T> | |
double | itpp::norm (const Vec< T > &v, int p) |
Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p). | |
double | itpp::norm (const cvec &v, const std::string &s) |
Calculate the frobeniuos norm for s = "fro" (equal to 2-norm). | |
template<class T> | |
double | itpp::norm (const Vec< T > &v, const std::string &s) |
Calculate the frobeniuos norm for s = "fro" (equal to 2-norm). | |
double | itpp::norm (const mat &m, int p) |
double | itpp::norm (const cmat &m, int p) |
double | itpp::norm (const mat &m, const std::string &s) |
Calculate the frobeniuos norm of a matrix for s = "fro". | |
double | itpp::norm (const cmat &m, const std::string &s) |
Calculate the frobeniuos norm of a matrix for s = "fro". | |
double | itpp::variance (const cvec &v) |
The variance of the elements in the vector. Normalized with N-1 to be unbiased. | |
template<class T> | |
double | itpp::variance (const Vec< T > &v) |
The variance of the elements in the vector. Normalized with N-1 to be unbiased. | |
template<class T> | |
double | itpp::energy (const Vec< T > &v) |
Calculate the energy: squared 2-norm. energy(v)=sum(abs(v).^2). | |
bool | itpp::within_tolerance (double x, double xref, double tol=1e-14) |
Return true if the input value x is within the tolerance tol of the reference value xref . | |
bool | itpp::within_tolerance (std::complex< double > x, std::complex< double > xref, double tol=1e-14) |
Return true if the input value x is within the tolerance tol of the reference value xref . | |
bool | itpp::within_tolerance (const vec &x, const vec &xref, double tol=1e-14) |
Return true if the input vector x is elementwise within the tolerance tol of the reference vector xref . | |
bool | itpp::within_tolerance (const cvec &x, const cvec &xref, double tol=1e-14) |
Return true if the input vector x is elementwise within the tolerance tol of the reference vector xref . | |
bool | itpp::within_tolerance (const mat &X, const mat &Xref, double tol=1e-14) |
Return true if the input matrix X is elementwise within the tolerance tol of the reference matrix Xref . | |
bool | itpp::within_tolerance (const cmat &X, const cmat &Xref, double tol=1e-14) |
Return true if the input matrix X is elementwise within the tolerance tol of the reference matrix Xref . | |
double | itpp::moment (const vec &x, const int r) |
Calculate the central moment of vector x. | |
double | itpp::skewness (const vec &x) |
Calculate the skewness excess of the input vector x. | |
double | itpp::kurtosisexcess (const vec &x) |
Calculate the kurtosis excess of the input vector x. | |
double | itpp::kurtosis (const vec &x) |
Calculate the kurtosis of the input vector x. |
T itpp::max | ( | const Vec< T > & | v | ) |
Maximum value of vector.
Definition at line 127 of file stat.h.
References itpp::Vec< Num_T >::length().
Referenced by itpp::Sparse_Vec< T >::add(), itpp::TCP_Segment::combine(), itpp::TDL_Channel::filter_known_channel(), itpp::GF2mat::GF2mat(), itpp::max(), itpp::norm(), itpp::Newton_Search::search(), itpp::Modulator_2d::set(), itpp::Sparse_Vec< T >::set(), itpp::Sparse_Vec< T >::set_new(), and itpp::within_tolerance().
T itpp::max | ( | const Vec< T > & | v, | |
int & | index | |||
) |
Maximum value of vector, also returns the index position of max value.
Definition at line 138 of file stat.h.
References itpp::Vec< Num_T >::length().
Vec<T> itpp::max | ( | const Mat< T > & | m, | |
int | dim = 1 | |||
) |
Maximum values over each row/column in the matrix m
max(m) = max(m, 1)
returns a vector where the elements are maximum over each column, whereas max(m, 2)
returns a vector where the elements are maximum over each row.
Definition at line 158 of file stat.h.
References itpp::Mat< Num_T >::cols(), itpp::Mat< Num_T >::get_col(), itpp::Mat< Num_T >::get_row(), it_assert, itpp::max(), itpp::Mat< Num_T >::rows(), and itpp::Vec< Num_T >::set_size().
Vec<T> itpp::max | ( | const Mat< T > & | m, | |
ivec & | index, | |||
int | dim = 1 | |||
) |
Maximum values over each row/column in the matrix m
max(m) = max(m, 1)
returns a vector where the elements are maximum over each column, whereas max(m, 2)
returns a vector where the elements are maximum over each row.
Also returns a vector of indices with positions of maximum value within a column/row.
Definition at line 189 of file stat.h.
References itpp::Mat< Num_T >::cols(), itpp::Mat< Num_T >::get_col(), itpp::Mat< Num_T >::get_row(), it_assert, itpp::max(), itpp::Mat< Num_T >::rows(), and itpp::Vec< Num_T >::set_size().
T itpp::min | ( | const Vec< T > & | in | ) |
Minimum value of vector.
Definition at line 213 of file stat.h.
References itpp::Vec< Num_T >::length().
Referenced by itpp::TCP_Segment::combine(), itpp::GF2mat::GF2mat(), itpp::min(), itpp::Modulator_2d::set(), itpp::TDL_Channel::set_channel_profile(), itpp::Channel_Specification::set_channel_profile(), itpp::ACK_Channel::set_errors(), itpp::Packet_Channel::set_errors(), itpp::Stack< T >::set_size(), itpp::Array< T >::set_size(), and itpp::vqtrain().
T itpp::min | ( | const Vec< T > & | in, | |
int & | index | |||
) |
Minimum value of vector, also returns the index position of min value.
Definition at line 224 of file stat.h.
References itpp::Vec< Num_T >::length().
Vec<T> itpp::min | ( | const Mat< T > & | m, | |
int | dim = 1 | |||
) |
Minimum values over each row/column in the matrix m
min(m) = min(m, 1)
returns a vector where the elements are minimum over each column, whereas min(m, 2)
returns a vector where the elements are minimum over each row.
Definition at line 245 of file stat.h.
References itpp::Mat< Num_T >::cols(), itpp::Mat< Num_T >::get_col(), itpp::Mat< Num_T >::get_row(), it_assert, itpp::min(), itpp::Mat< Num_T >::rows(), and itpp::Vec< Num_T >::set_size().
Vec<T> itpp::min | ( | const Mat< T > & | m, | |
ivec & | index, | |||
int | dim = 1 | |||
) |
Minimum values over each row/column in the matrix m
min(m) = min(m, 1)
returns a vector where the elements are minimum over each column, whereas min(m, 2)
returns a vector where the elements are minimum over each row.
Also returns a vector of indices with positions of minimum value within a column/row.
Definition at line 276 of file stat.h.
References itpp::Mat< Num_T >::cols(), itpp::Mat< Num_T >::get_col(), itpp::Mat< Num_T >::get_row(), it_assert, itpp::min(), itpp::Mat< Num_T >::rows(), and itpp::Vec< Num_T >::set_size().
int itpp::max_index | ( | const Vec< T > & | in | ) |
Return the postion of the maximum element in the vector.
Definition at line 300 of file stat.h.
References itpp::Vec< Num_T >::length().
Referenced by itpp::bitalloc(), itpp::Fast_ICA::separate(), and itpp::vqtrain().
void itpp::max_index | ( | const Mat< T > & | m, | |
int & | row, | |||
int & | col | |||
) |
Return the postion of the maximum element in the matrix.
Definition at line 311 of file stat.h.
References itpp::Mat< Num_T >::cols(), and itpp::Mat< Num_T >::rows().
int itpp::min_index | ( | const Vec< T > & | in | ) |
Return the postion of the minimum element in the vector.
Definition at line 328 of file stat.h.
References itpp::Vec< Num_T >::length().
Referenced by itpp::Convolutional_Code::decode_trunc(), and itpp::vqtrain().
void itpp::min_index | ( | const Mat< T > & | m, | |
int & | row, | |||
int & | col | |||
) |
Return the postion of the minimum element in the matrix.
Definition at line 339 of file stat.h.
References itpp::Mat< Num_T >::cols(), and itpp::Mat< Num_T >::rows().
double itpp::mean | ( | const vec & | v | ) |
The mean value.
Definition at line 39 of file stat.cpp.
References itpp::sum().
Referenced by itpp::cov(), itpp::gmmtrain(), itpp::moment(), remmean(), and itpp::sqtrain().
std::complex< double > itpp::mean | ( | const cvec & | v | ) |
double itpp::mean | ( | const svec & | v | ) |
double itpp::mean | ( | const ivec & | v | ) |
double itpp::mean | ( | const mat & | m | ) |
std::complex< double > itpp::mean | ( | const cmat & | m | ) |
double itpp::mean | ( | const smat & | m | ) |
double itpp::geometric_mean | ( | const Vec< T > & | v | ) |
The geometric mean value.
Definition at line 373 of file stat.h.
References itpp::exp(), and itpp::log().
double itpp::median | ( | const Vec< T > & | v | ) |
double itpp::norm | ( | const cvec & | v | ) |
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2)).
Definition at line 80 of file stat.cpp.
References itpp::sqrt().
Referenced by itpp::energy(), fpica(), itpp::IFFT_Fading_Generator::generate_Jakes(), itpp::jake_filter(), itpp::Rec_Syst_Conv_Code::log_decode_n2(), itpp::Modulator_NCD::map_demod(), itpp::Modulator_NRD::map_demod(), mpower(), itpp::norm(), itpp::Line_Search::search(), itpp::Newton_Search::search(), itpp::TDL_Channel::set_channel_profile(), itpp::Spread_1d::set_code(), itpp::Multicode_Spread_1d::set_codes(), and itpp::variance().
double itpp::norm | ( | const Vec< T > & | v | ) |
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2)).
Definition at line 393 of file stat.h.
References itpp::Vec< Num_T >::size(), itpp::sqr(), and itpp::sqrt().
double itpp::norm | ( | const cvec & | v, | |
int | p | |||
) |
Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p).
Definition at line 89 of file stat.cpp.
References itpp::norm(), and itpp::pow().
double itpp::norm | ( | const Vec< T > & | v, | |
int | p | |||
) |
Calculate the p-norm: norm(v,p)=sum(abs(v).^2)^(1/p).
Definition at line 407 of file stat.h.
References itpp::pow(), and itpp::Vec< Num_T >::size().
double itpp::norm | ( | const cvec & | v, | |
const std::string & | s | |||
) |
Calculate the frobeniuos norm for s = "fro" (equal to 2-norm).
Definition at line 98 of file stat.cpp.
References itpp::norm().
double itpp::norm | ( | const Vec< T > & | v, | |
const std::string & | s | |||
) |
Calculate the frobeniuos norm for s = "fro" (equal to 2-norm).
Definition at line 421 of file stat.h.
References it_assert, itpp::Vec< Num_T >::size(), itpp::sqr(), and itpp::sqrt().
double itpp::norm | ( | const mat & | m, | |
int | p = 2 | |||
) |
Calculate the p-norm of a real matrix
p = 1: max(svd(m)) p = 2: max(sum(abs(X)))
Default if no p is given is the 2-norm
Definition at line 107 of file stat.cpp.
References itpp::abs(), it_assert, itpp::max(), itpp::sum(), and itpp::svd().
double itpp::norm | ( | const cmat & | m, | |
int | p = 2 | |||
) |
Calculate the p-norm of a complex matrix
p = 1: max(svd(m)) p = 2: max(sum(abs(X)))
Default if no p is given is the 2-norm
Definition at line 123 of file stat.cpp.
References itpp::abs(), it_assert, itpp::max(), itpp::sum(), and itpp::svd().
double itpp::norm | ( | const mat & | m, | |
const std::string & | s | |||
) |
Calculate the frobeniuos norm of a matrix for s = "fro".
Definition at line 135 of file stat.cpp.
References itpp::diag(), it_assert, itpp::sqrt(), itpp::sum(), and itpp::transpose().
double itpp::norm | ( | const cmat & | m, | |
const std::string & | s | |||
) |
Calculate the frobeniuos norm of a matrix for s = "fro".
Definition at line 142 of file stat.cpp.
References itpp::diag(), itpp::hermitian_transpose(), it_assert, itpp::real(), itpp::sqrt(), and itpp::sum().
double itpp::variance | ( | const cvec & | v | ) |
The variance of the elements in the vector. Normalized with N-1 to be unbiased.
Definition at line 149 of file stat.cpp.
References itpp::norm(), and itpp::sum().
Referenced by itpp::kurtosisexcess(), and itpp::skewness().
double itpp::variance | ( | const Vec< T > & | v | ) |
The variance of the elements in the vector. Normalized with N-1 to be unbiased.
Definition at line 464 of file stat.h.
References itpp::Vec< Num_T >::_data(), itpp::Vec< Num_T >::size(), and itpp::sum().
double itpp::energy | ( | const Vec< T > & | v | ) |
Calculate the energy: squared 2-norm. energy(v)=sum(abs(v).^2).
Definition at line 480 of file stat.h.
References itpp::norm(), and itpp::sqr().
Referenced by itpp::house(), itpp::sd(), itpp::spectrum(), itpp::sqtrain(), and itpp::xcorr_old().
bool itpp::within_tolerance | ( | double | x, | |
double | xref, | |||
double | tol = 1e-14 | |||
) | [inline] |
bool itpp::within_tolerance | ( | std::complex< double > | x, | |
std::complex< double > | xref, | |||
double | tol = 1e-14 | |||
) | [inline] |
Return true if the input value x
is within the tolerance tol
of the reference value xref
.
Definition at line 493 of file stat.h.
References itpp::abs().
Return true if the input vector x
is elementwise within the tolerance tol
of the reference vector xref
.
Definition at line 499 of file stat.h.
References itpp::abs(), and itpp::max().
Return true if the input vector x
is elementwise within the tolerance tol
of the reference vector xref
.
Definition at line 505 of file stat.h.
References itpp::abs(), and itpp::max().
Return true if the input matrix X
is elementwise within the tolerance tol
of the reference matrix Xref
.
Definition at line 511 of file stat.h.
References itpp::abs(), and itpp::max().
Return true if the input matrix X
is elementwise within the tolerance tol
of the reference matrix Xref
.
Definition at line 517 of file stat.h.
References itpp::abs(), and itpp::max().
double itpp::moment | ( | const vec & | x, | |
const int | r | |||
) |
Calculate the central moment of vector x.
The th sample central moment of the samples in the vector
is defined as
where is the sample mean.
Definition at line 164 of file stat.cpp.
References itpp::mean(), and itpp::pow().
Referenced by itpp::kurtosisexcess(), and itpp::skewness().
double itpp::skewness | ( | const vec & | x | ) |
Calculate the skewness excess of the input vector x.
The skewness is a measure of the degree of asymmetry of distribution. Negative skewness means that the distribution is spread more to the left of the mean than to the right, and vice versa if the skewness is positive.
The skewness of the samples in the vector is
where is the mean and
the standard deviation.
The skewness is estimated as
where
and
Here is the sample variance and
is the 3rd sample central moment.
Definition at line 200 of file stat.cpp.
References itpp::moment(), itpp::pow(), and itpp::variance().
double itpp::kurtosisexcess | ( | const vec & | x | ) |
Calculate the kurtosis excess of the input vector x.
The kurtosis excess is a measure of peakedness of a distribution. The kurtosis excess is defined as
where is the mean and
the standard deviation.
The kurtosis excess is estimated as
where
and
Here is the sample variance and
is the 4th sample central moment.
Definition at line 210 of file stat.cpp.
References itpp::moment(), and itpp::variance().
Referenced by itpp::kurtosis().
double itpp::kurtosis | ( | const vec & | x | ) | [inline] |
Calculate the kurtosis of the input vector x.
The kurtosis is a measure of peakedness of a distribution. The kurtosis is defined as
where is the mean and
the standard deviation. For a Gaussian variable, the kurtusis is 3.
See also the definition of kurtosisexcess.
Definition at line 606 of file stat.h.
References itpp::kurtosisexcess().
Generated on Wed Mar 21 12:22:10 2007 for IT++ by Doxygen 1.4.7