/** * Computes the sufficient statistic \f$ t(x)\f$. * * @param x a point * @return \f$ t(x) = x \f$ */ public PVector t(PVector x) { PVector t = (PVector) x.clone(); t.type = Parameter.TYPE.EXPECTATION_PARAMETER; return t; }
/** * Computes \f$ \nabla G (\mathbf{H})\f$ * * @param H expectation parameters \f$ \mathbf{H} = \eta \f$ * @return \f$ \nabla G(\mathbf{H}) = \eta \f$ */ public PVector gradG(PVector H) { PVector gradient = (PVector) H.clone(); gradient.type = Parameter.TYPE.NATURAL_PARAMETER; return gradient; }
/** * Computes \f$ \nabla F ( \mathbf{\Theta} )\f$. * * @param T natural \f$ \mathbf{\Theta} = \theta \f$ * @return \f$ \nabla F( \mathbf{\Theta} ) = \theta \f$ */ public PVector gradF(PVector T) { PVector gradient = (PVector) T.clone(); gradient.type = Parameter.TYPE.EXPECTATION_PARAMETER; return gradient; }
/** * Converts expectation parameters to source parameters. * * @param H expectation parameters \f$ \mathbf{H} = \eta \f$ * @return source parameters \f$ \mathbf{\Lambda} = \eta \f$ */ public PVector Eta2Lambda(PVector H) { PVector L = (PVector) H.clone(); L.type = Parameter.TYPE.SOURCE_PARAMETER; return L; }
/** * Converts source parameters to expectation parameters. * * @param L source parameters \f$ \mathbf{\Lambda} = \mu \f$ * @return expectation parameters \f$ \mathbf{H} = \mu \f$ */ public PVector Lambda2Eta(PVector L) { PVector H = (PVector) L.clone(); H.type = Parameter.TYPE.EXPECTATION_PARAMETER; return H; }
/** * Converts source parameters to natural parameters. * * @param L source parameters \f$ \mathbf{\Lambda} = \mu \f$ * @return natural parameters \f$ \mathbf{\Theta} = \mu \f$ */ public PVector Lambda2Theta(PVector L) { PVector T = (PVector) L.clone(); T.type = Parameter.TYPE.NATURAL_PARAMETER; return T; }