_Distribution

it.grypho.scala.leonardo.probability._Distribution
See the_Distribution companion class
object _Distribution

Companion for _Distribution: the validating factory.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def of(kind: DistKind, params: Vector[Double]): Option[_Distribution]

Builds a distribution, or None when the parameters are outside the family's domain.

Builds a distribution, or None when the parameters are outside the family's domain.

Validation lives here rather than at the call sites so an invalid distribution simply cannot be constructed — normal(0, -1) leaves its node symbolic instead of producing an object whose every kernel would return NaN. The same "domain errors stay symbolic" rule the rest of the library follows.

Value parameters

kind

the family

params

the parameter vector, whose length must match the family's arity

Attributes

Returns

the distribution, or None if the parameters are invalid