Skip to contents

MSE cost of the linear model (Burkov Eq 1.3)

Usage

morie_burkov_mse_cost(w, b, x, y, N = NULL)

Arguments

w, b

Parameters.

x, y

Data.

N

Optional size check.

Value

List with cost, residuals.

Examples

morie_burkov_mse_cost(w = c(1, 2, 3, 4, 5, 6, 7, 8), b = 5L, x = c(1, 2, 3, 4, 5, 6, 7, 8),
  y = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $cost
#> [1] 1033
#> 
#> $estimate
#> [1] 1033
#> 
#> $residuals
#> [1]  5  7 11 17 25 35 47 61
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "MSE cost J(w, b) (Burkov Eq 1.3)"
#>