Skip to contents

h(x) = 1 iff w.x + b >= 0; one hyperplane only, so no XOR.

Usage

morie_geron_threshold_logic_unit(x, w, b = 0)

Arguments

x

Instance vector or (m, n) batch.

w

Length-n weights.

b

Finite bias.

Value

List with output and margin.

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
#>