Commit 068bf89d authored by Davis King's avatar Davis King

Moved the docs for some functions to the top so that htmlify links to them right.

parent 82a3e625
...@@ -10,6 +10,100 @@ ...@@ -10,6 +10,100 @@
namespace dlib namespace dlib
{ {
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double mean_sign_agreement (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
ensures
- returns the number of times a[i] has the same sign as b[i] divided by
a.size(). So we return the probability that elements of a and b have
the same sign.
!*/
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double correlation (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
- a.size() > 1
ensures
- returns the correlation coefficient between all the elements of a and b.
(i.e. how correlated is a(i) with b(i))
!*/
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double covariance (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
- a.size() > 1
ensures
- returns the covariance between all the elements of a and b.
(i.e. how does a(i) vary with b(i))
!*/
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double r_squared (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
- a.size() > 1
ensures
- returns the R^2 coefficient of determination between all the elements of a and b.
This value is just the square of correlation(a,b).
!*/
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double mean_squared_error (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
ensures
- returns the mean squared error between all the elements of a and b.
(i.e. mean(squared(vector_to_matrix(a)-vector_to_matrix(b))))
!*/
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
template < template <
...@@ -308,100 +402,6 @@ namespace dlib ...@@ -308,100 +402,6 @@ namespace dlib
!*/ !*/
}; };
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double mean_sign_agreement (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
ensures
- returns the number of times a[i] has the same sign as b[i] divided by
a.size(). So we return the probability that elements of a and b have
the same sign.
!*/
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double correlation (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
- a.size() > 1
ensures
- returns the correlation coefficient between all the elements of a and b.
(i.e. how correlated is a(i) with b(i))
!*/
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double covariance (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
- a.size() > 1
ensures
- returns the covariance between all the elements of a and b.
(i.e. how does a(i) vary with b(i))
!*/
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double r_squared (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
- a.size() > 1
ensures
- returns the R^2 coefficient of determination between all the elements of a and b.
This value is just the square of correlation(a,b).
!*/
// ----------------------------------------------------------------------------------------
template <
typename T,
typename alloc
>
double mean_squared_error (
const std::vector<T,alloc>& a,
const std::vector<T,alloc>& b
);
/*!
requires
- a.size() == b.size()
ensures
- returns the mean squared error between all the elements of a and b.
(i.e. mean(squared(vector_to_matrix(a)-vector_to_matrix(b))))
!*/
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
template < template <
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment