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
7d91dfcc
Commit
7d91dfcc
authored
Dec 04, 2017
by
Davis King
Browse files
Changed test_regression_function() and cross_validate_regression_trainer() to
output correlation rather than squared correlation.
parent
155bf30d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
dlib/svm/cross_validate_regression_trainer.h
dlib/svm/cross_validate_regression_trainer.h
+2
-2
dlib/svm/cross_validate_regression_trainer_abstract.h
dlib/svm/cross_validate_regression_trainer_abstract.h
+4
-6
No files found.
dlib/svm/cross_validate_regression_trainer.h
View file @
7d91dfcc
...
...
@@ -48,7 +48,7 @@ namespace dlib
}
matrix
<
double
,
1
,
4
>
result
;
result
=
rs
.
mean
(),
std
::
pow
(
rc
.
correlation
(),
2
),
rs_mae
.
mean
(),
rs_mae
.
stddev
();
result
=
rs
.
mean
(),
rc
.
correlation
(),
rs_mae
.
mean
(),
rs_mae
.
stddev
();
return
result
;
}
...
...
@@ -142,7 +142,7 @@ namespace dlib
}
// for (long i = 0; i < folds; ++i)
matrix
<
double
,
1
,
4
>
result
;
result
=
rs
.
mean
(),
std
::
pow
(
rc
.
correlation
(),
2
),
rs_mae
.
mean
(),
rs_mae
.
stddev
();
result
=
rs
.
mean
(),
rc
.
correlation
(),
rs_mae
.
mean
(),
rs_mae
.
stddev
();
return
result
;
}
...
...
dlib/svm/cross_validate_regression_trainer_abstract.h
View file @
7d91dfcc
...
...
@@ -32,9 +32,8 @@ namespace dlib
y_test and returns a matrix M summarizing the results. Specifically:
- M(0) == the mean squared error.
The MSE is given by: sum over i: pow(reg_funct(x_test[i]) - y_test[i], 2.0)
- M(1) == the R-squared value (i.e. the squared correlation between
reg_funct(x_test[i]) and y_test[i]). This is a number between 0
and 1.
- M(1) == the correlation between reg_funct(x_test[i]) and y_test[i].
This is a number between -1 and 1.
- M(2) == the mean absolute error.
This is given by: sum over i: abs(reg_funct(x_test[i]) - y_test[i])
- M(3) == the standard deviation of the absolute error.
...
...
@@ -66,9 +65,8 @@ namespace dlib
Specifically:
- M(0) == the mean squared error.
The MSE is given by: sum over i: pow(reg_funct(x[i]) - y[i], 2.0)
- M(1) == the R-squared value (i.e. the squared correlation between
a predicted y value and its true value). This is a number between
0 and 1.
- M(1) == the correlation between a predicted y value and its true value.
This is a number between -1 and 1.
- M(2) == the mean absolute error.
This is given by: sum over i: abs(reg_funct(x_test[i]) - y_test[i])
- M(3) == the standard deviation of the absolute error.
...
...
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