Built-in Functions

Netica contains an extensive library of built-in functions and constants which you can use in your equations.

The probability distribution functions all have a name that ends with "Dist" (e.g. NormalDist).  Their first argument is always the node for which the distribution is for.  So if node X has parent m, you could write:

 P (X | m) = NormalDist (X, m, 0.2)

to indicate that X has a normal (Gaussian) distribution with mean given by parent m, and a standard deviation of 0.2.

Common Operators


Functional Notation

Operator Notation



neg (x)

- x

not (b)

! b



equal (x, y)

x == y

not_equal (x, y)

x != y

approx_eq (x, y)

x ~= y

less (x, y)

x < y

greater (x, y)

x > y

less_eq (x, y)

x ⋜ y

greater_eq (x, y)

x ⋝ y



plus (x1, x2, ... xn)

x1 + x2 + ... + xn

minus (x, y)

x - y

mult (x1, x2, ... xn)

x1  *  x2 * ... *  xn

div (x, y)

x / y

mod (x, base)

x % base

power (x, y)

x ^ y

and (b1, b2, ... bn)

b1 && b2 && ... && bn

or (b1, b2, ... bn)

b1 || b2 || ... || bn

if (test, tval, fval)

test ? tval : fval


Common Math

abs (x)

 absolute value

sqrt (x)

 square root (positive)

exp (x)

exponential (e ^ x)

log (x)

logarithm base e

log2 (x)

logarithm base 2

log10 (x)

logarithm base 10

sin (x)


cos (x)


tan (x)


asin (x)

arc sine

acos (x)

arc cosine

atan (x)

arc tangent

atan2 (y,x)

atan(y/x) but considers quadrant

sinh (x)

hyperbolic sine

cosh (x)

hyperbolic cosine

tanh (x)

hyperbolic tangent

floor (x)

floor (highest integer ⋜ x)

ceil (x)

ceiling (lowest integer ⋝ x)

integer (x)

integer part of number (same sign)

frac (x)

fraction part of number (same sign)



Special Math

image\btn_mini.gif  round (x)

image\btn_mini.gif roundto (dx, x)

image\btn_mini.gif approx_eq (x, y)

image\btn_mini.gif eqnear (reldiff, x, y)

image\btn_mini.gif clip (min, max, x)

image\btn_mini.gif rect (x, a, b)

image\btn_mini.gif sign (x)

image\btn_mini.gif xor (b1, b2, ... bn)

image\btn_mini.gif increasing (x1, x2, ... xn)

image\btn_mini.gif increasing_eq (x1, x2, ... xn)

image\btn_mini.gif avg (x1, x2, ... xn)

image\btn_mini.gif mag (x1, x2, ... xn)

image\btn_mini.gif min (x1, x2, ... xn)

image\btn_mini.gif max (x1, x2, ... xn)

image\btn_mini.gif argmin0/1 (x0, x1, ... xn)

image\btn_mini.gif argmax0/1 (x0, x1, ... xn)

image\btn_mini.gif nearest0/1 (val, c0, c1, ... cn)

image\btn_mini.gif select0/1 (index, c0, c1, ... cn)

image\btn_mini.gif member (elem, s1, s2, ... sn)

image\btn_mini.gif factorial (n)

image\btn_mini.gif logfactorial (n)

image\btn_mini.gif logistic (t)

image\btn_mini.gif logit (p)

image\btn_mini.gif gamma (x)

image\btn_mini.gif loggamma (x)

image\btn_mini.gif beta (z, w)

image\btn_mini.gif erf (x)

image\btn_mini.gif erfc (x)

image\btn_mini.gif binomial (n, k)

image\btn_mini.gif multinomial (n1 , n2, ... nn)



Continuous Probability Distributions

image\btn_mini.gif UniformDist (x, a, b)

image\btn_mini.gif TriangularDist (x, m, w)

image\btn_mini.gif Triangular3Dist (x, m, w1, w2)

image\btn_mini.gif TriangularEnd3Dist (x, m, a, b)

image\btn_mini.gif NormalDist (x, μ , σ)

image\btn_mini.gif LognormalDist(x, η, Φ)

image\btn_mini.gif ExponentialDist (x, λ)

image\btn_mini.gif GammaDist (x, α, β)

image\btn_mini.gif WeibullDist (x, α, β)

image\btn_mini.gif BetaDist (x, α, β)

image\btn_mini.gif Beta4Dist (x, α, β, c, d)

image\btn_mini.gif LogisticDist (x, μ, σ)

image\btn_mini.gif CauchyDist (x, μ, σ)

image\btn_mini.gif LaplaceDist (x, μ, β)

image\btn_mini.gif ExtremeValueDist (x, μ, σ)

image\btn_mini.gif ParetoDist (x, a, b)

image\btn_mini.gif ChiSquareDist (x, ν)

image\btn_mini.gif StudentTDist (x, ν)

image\btn_mini.gif FDist (x, n1, ν2)   


Discrete Probability Distributions

image\btn_mini.gif SingleDist (k, c)

image\btn_mini.gif DiscUniformDist (k, a, b)

image\btn_mini.gif BernoulliDist (b, p)

image\btn_mini.gif BinomialDist (k, n, p)

image\btn_mini.gif PoissonDist (k, μ)

image\btn_mini.gif HypergeometricDist (k, n, s, N)

image\btn_mini.gif NegBinomialDist (k, n, p)

image\btn_mini.gif GeometricDist (k, p)

image\btn_mini.gif LogarithmicDist (k, p)

image\btn_mini.gif MultinomialDist (bc, n, k1, p1, k2, p2, ... km, pm)

image\btn_mini.gif NoisyOrDist (e, leak,  b1, p1, b2, p2, ... bn, pn)

image\btn_mini.gif NoisyAndDist (e, inh,  b1, p1, b2, p2, ... bn, pn)

image\btn_mini.gif NoisyMaxDist (…)

image\btn_mini.gif NoisySumDist (…)