beta2i: Scaling for the Indicator Potential

Description Usage Arguments Value Author(s) See Also Examples

View source: R/beta2i.R

Description

Transformation of estimated contrasts to indicator potential.

Usage

1
beta2i(x, scale = 1)

Arguments

x

numeric, real valued coefficients.

scale

numeric, scaling constant.

Value

Returns a numeric vector (I = abs(tanh(x * scale))).

Author(s)

Peter Solymos <solymos@ualberta.ca>

See Also

opticut and multicut use the scaled I values as indicator potential.

ocoptions for setting value for the default scaling factor.

Examples

1
2
3
4
5
6
7
8
x <- seq(-5, 5, 0.1)
Col <- occolors(c("red", "blue"))(10)
plot(x, beta2i(x), type = "n")
s <- seq(1, 0.1, -0.1)
for (i in 1:10) {
    lines(x, beta2i(x, scale = s[i]), col = Col[i])
    text(1.5 - 0.2, beta2i(1.5, scale = s[i]), s[i], col = Col[i])
}

opticut documentation built on May 2, 2019, 5:09 a.m.