
Threshold logic unit (Geron Ch 10, morie.fn grtlu)
Source:R/geron_train_native.R
morie_geron_threshold_logic_unit.Rdh(x) = 1 iff w.x + b >= 0; one hyperplane only, so no XOR.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_threshold_logic_unit(V, V)
#> $output
#> [1] 1
#>
#> $margin
#> [1] 204
#>
#> $estimate
#> [1] 1
#>
#> $n
#> [1] 1
#>