Commit 0f4fc27a authored by Davis King's avatar Davis King

Renamed generic_probabilistic_decision_function to probabilistic_function.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404073
parent 7d85e33d
......@@ -134,7 +134,7 @@ namespace dlib
template <
typename function_type
>
struct generic_probabilistic_decision_function
struct probabilistic_function
{
typedef typename function_type::scalar_type scalar_type;
typedef typename function_type::sample_type sample_type;
......@@ -144,18 +144,18 @@ namespace dlib
scalar_type beta;
function_type decision_funct;
generic_probabilistic_decision_function (
probabilistic_function (
) : alpha(0), beta(0), decision_funct(function_type()) {}
generic_probabilistic_decision_function (
const generic_probabilistic_decision_function& d
probabilistic_function (
const probabilistic_function& d
) :
alpha(d.alpha),
beta(d.beta),
decision_funct(d.decision_funct)
{}
generic_probabilistic_decision_function (
probabilistic_function (
const scalar_type a_,
const scalar_type b_,
const function_type& decision_funct_
......@@ -165,8 +165,8 @@ namespace dlib
decision_funct(decision_funct_)
{}
generic_probabilistic_decision_function& operator= (
const generic_probabilistic_decision_function& d
probabilistic_function& operator= (
const probabilistic_function& d
)
{
if (this != &d)
......@@ -191,7 +191,7 @@ namespace dlib
typename function_type
>
void serialize (
const generic_probabilistic_decision_function<function_type>& item,
const probabilistic_function<function_type>& item,
std::ostream& out
)
{
......@@ -203,7 +203,7 @@ namespace dlib
}
catch (serialization_error& e)
{
throw serialization_error(e.info + "\n while serializing object of type generic_probabilistic_decision_function");
throw serialization_error(e.info + "\n while serializing object of type probabilistic_function");
}
}
......@@ -211,7 +211,7 @@ namespace dlib
typename function_type
>
void deserialize (
generic_probabilistic_decision_function<function_type>& item,
probabilistic_function<function_type>& item,
std::istream& in
)
{
......@@ -223,7 +223,7 @@ namespace dlib
}
catch (serialization_error& e)
{
throw serialization_error(e.info + "\n while deserializing object of type generic_probabilistic_decision_function");
throw serialization_error(e.info + "\n while deserializing object of type probabilistic_function");
}
}
......@@ -247,7 +247,7 @@ namespace dlib
) : alpha(0), beta(0), decision_funct(decision_function<K>()) {}
probabilistic_decision_function (
const generic_probabilistic_decision_function<decision_function<K> >& d
const probabilistic_function<decision_function<K> >& d
) :
alpha(d.alpha),
beta(d.beta),
......
......@@ -126,7 +126,7 @@ namespace dlib
template <
typename function_type
>
struct generic_probabilistic_decision_function
struct probabilistic_function
{
/*!
REQUIREMENTS ON function_type
......@@ -148,7 +148,7 @@ namespace dlib
scalar_type beta;
function_type decision_funct;
generic_probabilistic_decision_function (
probabilistic_function (
);
/*!
ensures
......@@ -157,15 +157,15 @@ namespace dlib
- #decision_funct has its initial value
!*/
generic_probabilistic_decision_function (
const generic_probabilistic_decision_function& f
probabilistic_function (
const probabilistic_function& f
);
/*!
ensures
- #*this is a copy of f
!*/
generic_probabilistic_decision_function (
probabilistic_function (
const scalar_type a,
const scalar_type b,
const function_type& decision_funct_
......@@ -176,8 +176,8 @@ namespace dlib
and decision function.
!*/
generic_probabilistic_decision_function& operator= (
const generic_probabilistic_decision_function& d
probabilistic_function& operator= (
const probabilistic_function& d
);
/*!
ensures
......@@ -209,22 +209,22 @@ namespace dlib
typename function_type
>
void serialize (
const generic_probabilistic_decision_function<function_type>& item,
const probabilistic_function<function_type>& item,
std::ostream& out
);
/*!
provides serialization support for generic_probabilistic_decision_function
provides serialization support for probabilistic_function
!*/
template <
typename function_type
>
void deserialize (
generic_probabilistic_decision_function<function_type>& item,
probabilistic_function<function_type>& item,
std::istream& in
);
/*!
provides serialization support for generic_probabilistic_decision_function
provides serialization support for probabilistic_function
!*/
// ----------------------------------------------------------------------------------------
......@@ -244,9 +244,9 @@ namespace dlib
estimate of the probability that a given sample is in the +1 class.
Note that this object is essentially just a copy of
generic_probabilistic_decision_function but with the template argument
probabilistic_function but with the template argument
changed from being a function type to a kernel type. Therefore, this
type is just a convenient version of generic_probabilistic_decision_function
type is just a convenient version of probabilistic_function
for the case where the decision function is a dlib::decision_function<K>.
!*/
......@@ -277,7 +277,7 @@ namespace dlib
!*/
probabilistic_decision_function (
const generic_probabilistic_decision_function<decision_function<K> >& d
const probabilistic_function<decision_function<K> >& d
);
/*!
ensures
......
......@@ -479,7 +479,7 @@ namespace dlib
typename alloc_type1,
typename alloc_type2
>
const generic_probabilistic_decision_function<typename trainer_type::trained_function_type>
const probabilistic_function<typename trainer_type::trained_function_type>
train_probabilistic_decision_function (
const trainer_type& trainer,
const std::vector<sample_type,alloc_type1>& x,
......@@ -643,7 +643,7 @@ namespace dlib
const double A = val(0);
const double B = val(1);
return generic_probabilistic_decision_function<typename trainer_type::trained_function_type>( A, B, trainer.train(x,y) );
return probabilistic_function<typename trainer_type::trained_function_type>( A, B, trainer.train(x,y) );
}
// ----------------------------------------------------------------------------------------
......
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