Package org.encog.ml.hmm.distributions

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


    out.writeProperty(HiddenMarkovModel.TAG_PI,net.getPi());
    out.writeProperty(HiddenMarkovModel.TAG_TRANSITION,new Matrix(net.getTransitionProbability()));
   
    for( int i=0; i<net.getStateCount();i++) {
      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());
View Full Code Here


      for (j--; j >= 0; j--) {
        weights[j] /= sum;
      }

      final StateDistribution opdf = nhmm.getStateDistribution(i);
      opdf.fit(this.training, weights);
    }

    this.method = nhmm;
  }
View Full Code Here

    for (int i = 0; i < hmm.getStateCount(); i++) {
      final Collection<MLDataPair> clusterObservations = this.clusters
          .cluster(i);

      if (clusterObservations.size() < 1) {
        final StateDistribution o = this.modelHMM
            .createNewDistribution();
        hmm.setStateDistribution(i, o);
      } else {
        final MLDataSet temp = new BasicMLDataSet();
        for (final MLDataPair pair : clusterObservations) {
View Full Code Here

TOP

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

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.