Package org.encog.ml.hmm.distributions

Examples of org.encog.ml.hmm.distributions.ContinousDistribution


    HiddenMarkovModel hmm = new HiddenMarkovModel(2);
   
    hmm.setPi(0, 0.8);
    hmm.setPi(1, 0.2);
   
    hmm.setStateDistribution(0, new ContinousDistribution(mean1,covariance1));
    hmm.setStateDistribution(1, new ContinousDistribution(mean2,covariance2));
   
    hmm.setTransitionProbability(0, 1, 0.05);
    hmm.setTransitionProbability(0, 0, 0.95);
    hmm.setTransitionProbability(1, 0, 0.10);
    hmm.setTransitionProbability(1, 1, 0.90);
View Full Code Here


    HiddenMarkovModel hmm = new HiddenMarkovModel(2);
   
    hmm.setPi(0, 0.8);
    hmm.setPi(1, 0.2);
   
    hmm.setStateDistribution(0, new ContinousDistribution(mean1,covariance1));
    hmm.setStateDistribution(1, new ContinousDistribution(mean2,covariance2));
   
    hmm.setTransitionProbability(0, 1, 0.05);
    hmm.setTransitionProbability(0, 0, 0.95);
    hmm.setTransitionProbability(1, 0, 0.10);
    hmm.setTransitionProbability(1, 1, 0.90);
View Full Code Here

    HiddenMarkovModel hmm = new HiddenMarkovModel(2);
   
    hmm.setPi(0, 0.9);
    hmm.setPi(1, 0.1);
   
    hmm.setStateDistribution(0, new ContinousDistribution(mean1,covariance1));
    hmm.setStateDistribution(1, new ContinousDistribution(mean2,covariance2));
   
    hmm.setTransitionProbability(0, 1, 0.10);
    hmm.setTransitionProbability(0, 0, 0.90);
    hmm.setTransitionProbability(1, 0, 0.15);
    hmm.setTransitionProbability(1, 1, 0.85);
View Full Code Here

    this.stateDistributions = new StateDistribution[states];

    for (int i = 0; i < states; i++) {
      this.pi[i] = 1. / states;

      this.stateDistributions[i] = new ContinousDistribution(
          getStateCount());      

      for (int j = 0; j < states; j++) {
        this.transitionProbability[i][j] = 1. / states;
      }
View Full Code Here

    return hmm;
  }

  public StateDistribution createNewDistribution() {
    if (isContinuous()) {
      return new ContinousDistribution(getStateCount());
    } else {
      return new DiscreteDistribution(this.items);
    }
  }
View Full Code Here

        final Map<String, String> params = section.parseParams();
        String t = params.get(HiddenMarkovModel.TAG_DIST_TYPE);
        if( "ContinousDistribution".equals(t) ) {
          double[] mean = section.parseDoubleArray(params, HiddenMarkovModel.TAG_MEAN);
          Matrix cova = section.parseMatrix(params, HiddenMarkovModel.TAG_COVARIANCE);
          ContinousDistribution dist = new ContinousDistribution(mean,cova.getData());
          distributions.add(dist);
        } else if( "DiscreteDistribution".equals(t) ) {
          Matrix prob = section.parseMatrix(params, HiddenMarkovModel.TAG_PROBABILITIES);
          DiscreteDistribution dist = new DiscreteDistribution(prob.getData());
          distributions.add(dist);
View Full Code Here

      out.addSubSection("DISTRIBUTION-"+i)
      StateDistribution sd = net.getStateDistribution(i);
      out.writeProperty(HiddenMarkovModel.TAG_DIST_TYPE, sd.getClass().getSimpleName());
     
      if( sd instanceof ContinousDistribution ) {
        ContinousDistribution cDist = (ContinousDistribution)sd;
        out.writeProperty(HiddenMarkovModel.TAG_MEAN, cDist.getMean());
        out.writeProperty(HiddenMarkovModel.TAG_COVARIANCE, cDist.getCovariance());
       
      } else if( sd instanceof DiscreteDistribution ) {
        DiscreteDistribution dDist = (DiscreteDistribution)sd;
        out.writeProperty(HiddenMarkovModel.TAG_PROBABILITIES, new Matrix(dDist.getProbabilities()));
      }
View Full Code Here

TOP

Related Classes of org.encog.ml.hmm.distributions.ContinousDistribution

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.