Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
068bf89d
Commit
068bf89d
authored
Aug 24, 2011
by
Davis King
Browse files
Moved the docs for some functions to the top so that htmlify links to them right.
parent
82a3e625
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
94 deletions
+94
-94
dlib/statistics/statistics_abstract.h
dlib/statistics/statistics_abstract.h
+94
-94
No files found.
dlib/statistics/statistics_abstract.h
View file @
068bf89d
...
@@ -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
<
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment