Skip to content
Snippets Groups Projects
Commit f5a19059 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

Correction sur les svm (derivative).

parent fc15b340
Branches
Tags
No related merge requests found
...@@ -184,7 +184,7 @@ class RBFKernelFunctor : public GenericKernelFunctorBase ...@@ -184,7 +184,7 @@ class RBFKernelFunctor : public GenericKernelFunctorBase
return vcl_exp(-res); return vcl_exp(-res);
} }
virtual double derivative(const svm_node *x, const svm_node *y, const svm_parameter& param, int degree, int index = 0, bool isAtEnd = false, double constValue)const virtual double derivative(const svm_node *x, const svm_node *y, const svm_parameter& param, int degree, int index = 0, bool isAtEnd, double constValue)const
{ {
double gamma = this->GetValue<double>("gamma_coef"); double gamma = this->GetValue<double>("gamma_coef");
double kernelValue = 0.; double kernelValue = 0.;
......
...@@ -203,7 +203,7 @@ public: ...@@ -203,7 +203,7 @@ public:
// index is the current value // index is the current value
// isAtEnd to indicate that it's the last possible derivation // isAtEnd to indicate that it's the last possible derivation
// baseValue is the constant of the formula // baseValue is the constant of the formula
virtual double derivative(const svm_node *x, const svm_node *y, const svm_parameter& param, int degree, int index = 0, bool isAtEnd = false, double constValue)const virtual double derivative(const svm_node *x, const svm_node *y, const svm_parameter& param, int degree, int index = 0, bool isAtEnd, double constValue)const
{ {
itkGenericExceptionMacro(<<"derivative method not definied (Null)"); itkGenericExceptionMacro(<<"derivative method not definied (Null)");
return 0.; return 0.;
...@@ -296,7 +296,7 @@ public: ...@@ -296,7 +296,7 @@ public:
// index is the current value // index is the current value
// isAtEnd to indicate that it's the last possible derivation // isAtEnd to indicate that it's the last possible derivation
// baseValue is the constant of the formula // baseValue is the constant of the formula
virtual double derivative(const svm_node *x, const svm_node *y, const svm_parameter& param, int degree, int index = 0, bool isAtEnd = false, double constValue = 0.)const virtual double derivative(const svm_node *x, const svm_node *y, const svm_parameter& param, int degree, int index = 0, bool isAtEnd, double constValue = 0.)const
{ {
double out = 0.; double out = 0.;
if (m_KernelFunctorList.size() != 0 && m_PonderationList.size() != 0 && m_KernelFunctorList.size() == m_PonderationList.size()) if (m_KernelFunctorList.size() != 0 && m_PonderationList.size() != 0 && m_KernelFunctorList.size() == m_PonderationList.size())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment