Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
7d91dfcc
Commit
7d91dfcc
authored
Dec 04, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed test_regression_function() and cross_validate_regression_trainer() to
output correlation rather than squared correlation.
parent
155bf30d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
cross_validate_regression_trainer.h
dlib/svm/cross_validate_regression_trainer.h
+2
-2
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