Package com.statslibextensions.statistics.distribution

Examples of com.statslibextensions.statistics.distribution.ScaledInverseGammaCovDistribution


       */
      mvGaussianBayesUpdate(augResponseDist, priorGlobalMeanSample,
          updatedBetaMean, observation.getObservedData());

      final Vector betaMeanError = postBetaSmoothedSample.minus(priorBetaSmoothedSample);
      final ScaledInverseGammaCovDistribution updatedBetaCov = particle.getPriorBetaCov().clone();
      updateCovariancePrior(updatedBetaCov, betaMeanError);
      final Matrix betaCovSmpl = updatedBetaCov.sample(random);
      Preconditions.checkState(betaCovSmpl.getElement(0, 0) >= 0d);
      updatedBetaMean.setCovariance(lambdaSamplesMatrix.times(betaCovSmpl
          .times(updatedBetaMean.getCovariance())));

      /*
       * Now, do the above for the the global mean term.
       */
      final MultivariateGaussian updatedGlobalMean =
          particle.getPriorBeta().times(particle.getAugmentedResponseDistribution());

      mvGaussianBayesUpdate(augResponseDist,
          observation.getObservedData().times(priorBetaSmoothedSample), updatedGlobalMean,
          MatrixFactory.getDenseDefault().createIdentity(
            augResponseDist.getInputDimensionality(), augResponseDist.getInputDimensionality()));

      final Vector globalMeanError = postGlobalMeanSample.minus(priorGlobalMeanSample);
      final ScaledInverseGammaCovDistribution updatedGlobalMeanCov =
          particle.getPriorBetaCov().clone();
      updateCovariancePrior(updatedGlobalMeanCov, globalMeanError);
      final Matrix globalMeanCovSmpl = updatedGlobalMeanCov.sample(random)
          .times(updatedGlobalMean.getCovariance());
      Preconditions.checkState(globalMeanCovSmpl.getElement(0, 0) > 0d);
      updatedGlobalMean.setCovariance(globalMeanCovSmpl);

      final PolyaGammaLogitDistribution updatedParticle =
View Full Code Here


     */

    final Vector betaCovPriorMean = VectorFactory.getDefault().copyArray(
      new double[] {200d});
    final double betaPriorCovDof = 2 + betaCovPriorMean.getDimensionality();
    final ScaledInverseGammaCovDistribution priorBetaCov =
        new ScaledInverseGammaCovDistribution(betaCovPriorMean.getDimensionality()
          betaCovPriorMean.scale(betaPriorCovDof - 1d).getElement(0),
          betaPriorCovDof);
    final MultivariateGaussian priorBeta =
        new MultivariateGaussian(VectorFactory.getDenseDefault().copyArray(
            new double[] {0d}), priorBetaCov.getMean());

    /*
     * Create and initialize the PL filter
     */
    final PolyaGammaLogitPLFilter plFilter =
View Full Code Here

        new DefaultDataDistribution<LassoRegressionDistribution>();
    for (final LassoRegressionDistribution particle : resampledParticles) {

      final MultivariateGaussian postBeta = particle.getPriorBeta().clone();

      final ScaledInverseGammaCovDistribution postObsCov = particle.getPriorObsCov();

      final Matrix augCovLassoSample = this.augLassoDist.sample(random);
      final Matrix obsCovSample = postObsCov.sample(random);
     
      /*
       * Update sufficient stats.
       * TODO FIXME not done
       */
 
View Full Code Here

TOP

Related Classes of com.statslibextensions.statistics.distribution.ScaledInverseGammaCovDistribution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.