Commit 7d91dfcc authored by Davis King's avatar Davis King

Changed test_regression_function() and cross_validate_regression_trainer() to

output correlation rather than squared correlation.
parent 155bf30d
......@@ -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;
}
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment