Skip to contents

Decision boundary for logistic regression theta^T x = 0 (hmdbd)

Usage

morie_geron_decision_boundary(theta, X_grid, fit_intercept = TRUE)

Arguments

theta

Parameters (bias first if fit_intercept).

X_grid

Points to classify (m, n), no bias column.

fit_intercept

Logical.

Value

List with scores, signed_distance, labels, probabilities, on_boundary, normal, margin, line.

Examples

morie_geron_decision_boundary(c(-1, 1, 1), matrix(c(0, 0, 1,
    1, 0.5, 0.5), 3, 2, byrow = TRUE))
#> $scores
#> [1] -1  1  0
#> 
#> $signed_distance
#> [1] -0.7071068  0.7071068  0.0000000
#> 
#> $labels
#> [1] 0 1 0
#> 
#> $probabilities
#> [1] 0.2689414 0.7310586 0.5000000
#> 
#> $on_boundary
#> [1] FALSE FALSE  TRUE
#> 
#> $normal
#> [1] 0.7071068 0.7071068
#> 
#> $bias
#> [1] -1
#> 
#> $margin
#> [1] 0
#> 
#> $line
#> [1] -1  1
#> 
#> $estimate
#> [1] 0
#> 
#> $n
#> [1] 3
#> 
#> $method
#> [1] "hyperplane theta^T x = 0 with signed distances"
#>