loss.squared.error {DPpack} | R Documentation |
Squared Error Loss Function
Description
This function implements squared error loss used for linear regression in
the form required by EmpiricalRiskMinimizationDP.KST
.
Usage
loss.squared.error(y.hat, y)
Arguments
y.hat |
Vector or matrix of estimated labels. |
y |
Vector or matrix of true labels. |
Value
Vector or matrix of the squared error loss for each element of y.hat and y.
Examples
y.hat <- c(0.1, 0.88, 0.02)
y <- c(0, 1, 0)
loss.squared.error(y.hat,y)
[Package DPpack version 0.1.0 Index]