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
c8b59522
Commit
c8b59522
authored
Jan 17, 2013
by
Davis King
Browse files
refined spec a little
parent
d3c26551
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
dlib/svm/svm.h
dlib/svm/svm.h
+1
-1
dlib/svm/svm_abstract.h
dlib/svm/svm_abstract.h
+8
-6
No files found.
dlib/svm/svm.h
View file @
c8b59522
...
@@ -570,7 +570,7 @@ namespace dlib
...
@@ -570,7 +570,7 @@ namespace dlib
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
T
,
typename
alloc
>
template
<
typename
T
,
typename
alloc
>
std
::
pair
<
T
,
T
>
learn_platt_scaling
(
std
::
pair
<
double
,
double
>
learn_platt_scaling
(
const
std
::
vector
<
T
,
alloc
>&
scores
,
const
std
::
vector
<
T
,
alloc
>&
scores
,
const
std
::
vector
<
T
,
alloc
>&
labels
const
std
::
vector
<
T
,
alloc
>&
labels
)
)
...
...
dlib/svm/svm_abstract.h
View file @
c8b59522
...
@@ -132,7 +132,7 @@ namespace dlib
...
@@ -132,7 +132,7 @@ namespace dlib
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
inline
double
platt_scale
(
double
platt_scale
(
const
std
::
pair
<
double
,
double
>&
params
,
const
std
::
pair
<
double
,
double
>&
params
,
const
double
score
const
double
score
);
);
...
@@ -144,7 +144,7 @@ namespace dlib
...
@@ -144,7 +144,7 @@ namespace dlib
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
T
,
typename
alloc
>
template
<
typename
T
,
typename
alloc
>
std
::
pair
<
T
,
T
>
learn_platt_scaling
(
std
::
pair
<
double
,
double
>
learn_platt_scaling
(
const
std
::
vector
<
T
,
alloc
>&
scores
,
const
std
::
vector
<
T
,
alloc
>&
scores
,
const
std
::
vector
<
T
,
alloc
>&
labels
const
std
::
vector
<
T
,
alloc
>&
labels
);
);
...
@@ -154,10 +154,12 @@ namespace dlib
...
@@ -154,10 +154,12 @@ namespace dlib
- is_binary_classification_problem(scores,labels) == true
- is_binary_classification_problem(scores,labels) == true
ensures
ensures
- This function learns to map scalar values into well calibrated probabilities
- This function learns to map scalar values into well calibrated probabilities
using Platt scaling. In particular, it returns a params object such that
:
using Platt scaling. In particular, it returns a params object such that
,
-
for all valid i:
for all valid i:
- platt_scale(params,scores[i]) == the scaled version of the scalar value
- platt_scale(params,scores[i]) == the scaled version of the scalar value
scores[i]. That is, the output is a number between 0 and 1.
scores[i]. That is, the output is a number between 0 and 1. In
particular, platt_scale(params,scores[i]) is meant to represent the
probability that labels[i] == +1.
- This function is an implementation of the algorithm described in the following
- This function is an implementation of the algorithm described in the following
papers:
papers:
Probabilistic Outputs for Support Vector Machines and Comparisons to
Probabilistic Outputs for Support Vector Machines and Comparisons to
...
...
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