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
afe67a2b
Commit
afe67a2b
authored
Jun 23, 2013
by
Davis King
Browse files
Fixed typo in learn_platt_scaling(). The method wasn't using the exact prior
suggested by Platt's paper.
parent
f74ccbda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
dlib/svm/svm.h
dlib/svm/svm.h
+4
-4
No files found.
dlib/svm/svm.h
View file @
afe67a2b
...
@@ -627,10 +627,10 @@ namespace dlib
...
@@ -627,10 +627,10 @@ namespace dlib
<<
"
\n\t
is_binary_classification_problem(scores,labels): "
<<
is_binary_classification_problem
(
scores
,
labels
)
<<
"
\n\t
is_binary_classification_problem(scores,labels): "
<<
is_binary_classification_problem
(
scores
,
labels
)
);
);
const
T
prior0
=
sum
(
mat
(
labels
)
>
0
);
const
T
num_pos
=
sum
(
mat
(
labels
)
>
0
);
const
T
prior1
=
sum
(
mat
(
labels
)
<
0
);
const
T
num_neg
=
sum
(
mat
(
labels
)
<
0
);
const
T
hi_target
=
(
prior1
+
1
)
/
(
prior1
+
2
);
const
T
hi_target
=
(
num_pos
+
1
)
/
(
num_pos
+
2
);
const
T
lo_target
=
1.0
/
(
prior0
+
2
);
const
T
lo_target
=
1.0
/
(
num_neg
+
2
);
std
::
vector
<
T
,
alloc
>
target
;
std
::
vector
<
T
,
alloc
>
target
;
for
(
unsigned
long
i
=
0
;
i
<
labels
.
size
();
++
i
)
for
(
unsigned
long
i
=
0
;
i
<
labels
.
size
();
++
i
)
...
...
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