Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
f5a19059
Commit
f5a19059
authored
17 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
Correction sur les svm (derivative).
parent
fc15b340
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Learning/otbSVMKernels.h
+1
-1
1 addition, 1 deletion
Code/Learning/otbSVMKernels.h
Utilities/otbsvm/svm.h
+2
-2
2 additions, 2 deletions
Utilities/otbsvm/svm.h
with
3 additions
and
3 deletions
Code/Learning/otbSVMKernels.h
+
1
−
1
View file @
f5a19059
...
@@ -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.
;
...
...
This diff is collapsed.
Click to expand it.
Utilities/otbsvm/svm.h
+
2
−
2
View file @
f5a19059
...
@@ -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
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment