Skip to contents

1 above zero, 0 below, at_zero exactly at zero. The derivative is zero almost everywhere, so the result carries that warning.

Usage

morie_geron_heaviside(z, at_zero = 1)

Arguments

z

Numeric vector.

at_zero

Value returned at z == 0.

Value

List with activation, derivative, n_active, warnings, estimate, n.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_heaviside(V)
#> $activation
#> [1] 1 1 1 1 1 1 1 1
#> 
#> $derivative
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $n_active
#> [1] 8
#> 
#> $warnings
#> [1] "The derivative is 0 almost everywhere, so this activation cannot be trained by backpropagation."
#> 
#> $estimate
#> [1] 1
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Heaviside step activation"
#>