This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > %SYS namespace > %DeepSee.extensions.stat.MixedDistribution

%DeepSee.extensions.stat.MixedDistribution

class %DeepSee.extensions.stat.MixedDistribution extends %Library.RegisteredObject, %DeepSee.extensions.stat.AbstractContinuousDistribution

Represents multicomponent continues distribution. For example let the user to create a distribution consisting of mixed Gaussian components or a mixed Normal/Exponential distribution.

Here is an example of it's usage:

  set ndist = ##class(%DeepSee.extensions.stat.NormalDistribution).create(m, (sigma * sigma))
  set edist = ##class(%DeepSee.extensions.stat.ExpDistribution).create(lambda)
  set mdist = ##class(%DeepSee.extensions.stat.MixedDistribution).%New()
  set sc = mdist.AddComponent(ndist, w)
  Quit:$$$ISERR(sc)
  set sc = mdist.AddComponent(edist, (1-w))
  Quit:$$$ISERR(sc)
  set sc = mdist.balance()
  Quit:$$$ISERR(sc)
  w "Mean = "_mdist.Mean
  w "; Var = "_mdist.Variance
  w "; Entropy = "_mdist.Entropy, !
  	

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property N as %Integer [ InitialExpression = 0 ];
Property methods: NDisplayToLogical(), NGet(), NIsValid(), NLogicalToDisplay(), NNormalize(), NSet()
property P as AbstractContinuousDistribution [ MultiDimensional ];
Property methods: PGet(), PGetSwizzled(), PIsValid(), PNewObject(), PSet()
property w as %Double [ MultiDimensional ];
Property methods: wDisplayToLogical(), wGet(), wIsValid(), wLogicalToDisplay(), wNormalize(), wOdbcToLogical(), wSet()

Methods (Including Private)

method AddComponent(p As AbstractContinuousDistribution, weight As %Double) as %Status
Add a component p to the distribution with the given weight. After all components are added application must call balance()
method balance() as %Status
The method to call after all components of the distribution are specified.
method cdf(x1 As %Double, x2 As %Double = "") as %Double
Inherited description: An interface method for cumulative distribution function (CDF). Optionally provides a cumulative probability of a value being between two values x1 and x2.

If called with 1 argument(x1) or if the value of second argument is empty string then returns CDF value for x1. If called with two arguments, x1 and x2 then returns a probability of a value being between x1 and x2.

method pdf(x As %Double) as %Double
Inherited description: An interface method for probability distribution function (PDF). Returns PDF value for x.

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)

Feedback