Skip to contents

MVSML (2022) eqs. (9.6)-(9.8) pp.344-346, solved through the Wolfe dual (9.32)-(9.33). Delegates to the shared core mirror rather than solving the dual a second time.

Usage

Svmhp(X, y, ...)

Arguments

X

Inputs, n by p.

y

Labels in {-1, +1}.

...

Passed to the dual solver.

Value

Named list; estimate is the margin \(M = 1/\|\beta\|\).

References

MVSML (2022) eqs. (9.6)-(9.8) pp.344-346.

Examples

Svmhp(matrix(c(1, 2, 4, 5, 1, 2, 4, 3), ncol = 2), c(-1, -1, 1, 1))
#> $beta
#> [1] 0.4444444 0.2222222
#> 
#> $beta0
#> [1] -1.962963
#> 
#> $norm_beta
#> [1] 0.496904
#> 
#> $margin
#> [1] 2.012461
#> 
#> $street_width
#> [1] 4.024922
#> 
#> $objective
#> [1] 0.1234568
#> 
#> $functional_margin
#> [1] 1.2962963 0.6296296 0.7037037 0.9259259
#> 
#> $min_functional_margin
#> [1] 0.6296296
#> 
#> $constraint_ok
#> [1] FALSE
#> 
#> $alpha
#> [1]  0.0000000 13.1151053  6.5297749  0.1111111
#> 
#> $support_vectors
#> [1] 2 3 4
#> 
#> $estimate
#> [1] 2.012461
#> 
#> $method
#> [1] "SVM maximum margin hyperplane (MVSML 2022 eqs. 9.6-9.8)"
#>