Gaussian

com.phasmidsoftware.number.core.numerical.Gaussian
case object Gaussian extends Shape

A "normal" probability distribution function. CONSIDER making this a case class with a member corresponding to the l value of wiggle.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
Self type
Gaussian.type

Members list

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredMonoType = this.type

The mirrored *-type.

The mirrored *-type.

Attributes

Inherited from:
Singleton
type MirroredType = this.type

Attributes

Inherited from:
Singleton

Inherited and Abstract types

type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def convolutionProduct(sigma1: Double, sigma2: Double, independent: Boolean): Double

For the convolution of the product of two (independent) Gaussian distributions (see https://en.wikipedia.org/wiki/Variance). You must not use this expression when multiplying a fuzzy number by itself, for example, because then they are not independent.

For the convolution of the product of two (independent) Gaussian distributions (see https://en.wikipedia.org/wiki/Variance). You must not use this expression when multiplying a fuzzy number by itself, for example, because then they are not independent.

Var(X Y) = mux mux Var(Y) + muy muy Var(X) + Var(X) Var(Y)

Therefore, (sigma(x*y))**2 = (mux sigma(y))**2 + (muy sigma(x))**2 + (sigma(x) sigma(y))**2

Or, dividing by (mux muy)**2 (i.e., using relative variations)

sigma(x/mux 8 y/muy)**2 = sigma(x/mux)**2 + sigma(y/muy)**2 + (sigma(x/mux) sigma(y/muy))**2

Value parameters

independent

whether the distributions are independent.

sigma1

the first standard deviation.

sigma2

the second standard deviation.

Attributes

def convolutionSum(sigma1: Double, sigma2: Double): Double

Get the convolution of sum of two Gaussian distributions.

Get the convolution of sum of two Gaussian distributions.

This follows the fact that Var(X + Y) = Var(X) + Var(Y)

See https://en.wikipedia.org/wiki/Variance

Value parameters

sigma1

the first standard deviation.

sigma2

the second standard deviation.

Attributes

Returns

a double which is the root-mean-square of the sigmas.

def effectiveMagnitude(l: Double): Double

Computes the effective magnitude of a Gaussian distribution based on the input parameter.

Computes the effective magnitude of a Gaussian distribution based on the input parameter.

Value parameters

l

the scale parameter, typically representing the standard deviation of a Gaussian distribution.

Attributes

Returns

a double representing the effective magnitude.

def probability(l: Double, x: Double): Double

Computes the probability that random points will be found with the range -x to +x where l is the standard deviation of this Gaussian.

Computes the probability that random points will be found with the range -x to +x where l is the standard deviation of this Gaussian.

Value parameters

l

the size or scale of the probability density function (e.g., standard deviation for a Gaussian distribution).

x

the specific point that bounds the region we're interested in.

Attributes

Returns

the calculated probability density at the given point.

def thresholdConfidence(x: Double, l: Double): Double

wiggle(c) = l * erfinv(c) / sigma Inverting: c = erf(x * sigma / l)

wiggle(c) = l * erfinv(c) / sigma Inverting: c = erf(x * sigma / l)

Attributes

def wiggle(l: Double, confidence: Double = ...): Double

Adjusts the given value based on the specified confidence level, using the properties of a Gaussian distribution.

Adjusts the given value based on the specified confidence level, using the properties of a Gaussian distribution.

Value parameters

confidence

the confidence level, a value between 0 and 1, representing the desired probability threshold.

l

the scale or size parameter, typically representing the standard deviation of a Gaussian distribution.

Attributes

Returns

a double representing the adjusted value based on the confidence level and scale.

Inherited methods

def fromProduct(p: Product): MirroredMonoType

Creates a new instance of type T with elements taken from product p.

Creates a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product

Concrete fields

val sigma: Double

The standard deviation of a normal distribution whose variance is 1/2. This is the basis of the inverse error function.

The standard deviation of a normal distribution whose variance is 1/2. This is the basis of the inverse error function.

Attributes