kumulant

abs

Absolute value of this expression.

The unary and binary maths nodes follow the same rule as the arithmetic operators above: the node itself stays internal so only its @SerialName is a contract, and this factory is the Kotlin way to build one. Every node in this file must be reachable both ways - from Kotlin and from the wire - and a pipeline that can only be authored as JSON is not usable from Kotlin at all.

allFinite

True when every input to the update is finite, whichever modality the stat is.

Use it through the filterFinite() shorthand on each spec type rather than by hand. Unlike isFinite, this covers a whole feature vector, which no per-coordinate expression can.

and

infix fun BoolExpr.and(rhs: BoolExpr): BoolExpr(source)

Short-circuiting conjunction.

div

Build Div of two expressions.


operator fun ScalarExpr.div(rhs: Double): ScalarExpr(source)

Divide this expression by a literal rhs.


operator fun Double.div(rhs: ScalarExpr): ScalarExpr(source)

Divide a literal receiver by an expression.

eq

Exact equality (no tolerance).


infix fun ScalarExpr.eq(rhs: Double): BoolExpr(source)

Exact equality against a literal (no tolerance).

exp

e raised to this expression. Overflows to +Infinity well before Double runs out of range.

ge

Greater-or-equal comparison.


infix fun ScalarExpr.ge(rhs: Double): BoolExpr(source)

Greater-or-equal against a literal.

gt

Strictly-greater-than comparison.


infix fun ScalarExpr.gt(rhs: Double): BoolExpr(source)

Strictly-greater-than against a literal.

inRange

True when this expression falls within [min, max], both ends inclusive.

Distinct from x ge min and (x le max), which builds three nodes and evaluates this expression twice; a filter runs on every update, so the single-node form is the one to reach for.

isFinite

True when this expression evaluates to a finite number: not NaN, and not an infinity.

Stronger than !isNaN(). Prefer it whenever the intent is "a real number", since an infinity passes every ordering comparison the AST can express.

Mean.filter(X.isFinite())

isNaN

True when this expression evaluates to NaN.

A NaN observation propagates through every stat by default; see Stat. Pair this with not to drop them instead, which is the supported way to ask for that:

Mean.filter(!X.isNaN())

le

Less-or-equal comparison.


infix fun ScalarExpr.le(rhs: Double): BoolExpr(source)

Less-or-equal against a literal.

ln

Natural logarithm of this expression. ln(0) is -Infinity and a negative input gives NaN.

lt

Strictly-less-than comparison.


infix fun ScalarExpr.lt(rhs: Double): BoolExpr(source)

Strictly-less-than against a literal.

max

The larger of this expression and other.


The larger of this expression and a constant other.

min

The smaller of this expression and other.


The smaller of this expression and a constant other.

minus

Build Sub of two expressions.


operator fun ScalarExpr.minus(rhs: Double): ScalarExpr(source)

Subtract a literal rhs from this expression.


operator fun Double.minus(rhs: ScalarExpr): ScalarExpr(source)

Subtract an expression from a literal receiver.

not

operator fun BoolExpr.not(): BoolExpr(source)

Logical negation.

or

infix fun BoolExpr.or(rhs: BoolExpr): BoolExpr(source)

Short-circuiting disjunction.

plus

Build Add of two expressions.


operator fun ScalarExpr.plus(rhs: Double): ScalarExpr(source)

Add a literal rhs to this expression.


operator fun Double.plus(rhs: ScalarExpr): ScalarExpr(source)

Add an expression to a literal receiver.

pow

This expression raised to exponent.


This expression raised to a constant exponent.

sqrt

Square root of this expression. A negative input gives NaN.

times

Build Mul of two expressions.


operator fun ScalarExpr.times(rhs: Double): ScalarExpr(source)

Multiply this expression by a literal rhs.


operator fun Double.times(rhs: ScalarExpr): ScalarExpr(source)

Multiply a literal receiver by an expression.

unaryMinus

Unary minus: wraps in Neg.

vDot

fun vDot(weights: List<Double>): ScalarExpr(source)

Weighted sum of the feature vector. weights must match the vector length at evaluation time.


fun vDot(vararg weights: Double): ScalarExpr(source)

Weighted sum of the feature vector, varargs form.

vectorOf

Build an output vector by evaluating each expression in order; output length is exprs.size.

The only VectorExpr constructor, and so the only way to reach transformVector / transformX from Kotlin. Reference input coordinates with V: vectorOf(V(2), V(0), V(1)) permutes, vectorOf((V(0) + V(1)) / 2.0) pools, and a shorter list than the input reduces dimensionality.


fun vectorOf(vararg exprs: ScalarExpr): VectorExpr(source)

Build an output vector from expressions in order, varargs form.

vFold

Reduce the whole feature vector to one scalar with op.

The vector-consuming half of the AST, and the only Kotlin-side consumer of VFoldOp.