Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.35 KB | None | 0 0
  1. Hmm = new HiddenMarkovClassifier<MultivariateMixture<MultivariateNormalDistribution>>(classes.Count,
  2.                 new Forward(states), new MultivariateMixture<MultivariateNormalDistribution>(new MultivariateNormalDistribution[6]), classes.ToArray());
  3.             // I tried to change the topology from Forward to Ergodic and the performence is nearly the same
  4.             // Ergodic models are commonly used to represent models in which a single (large) sequence of observations is used for training (such as when a training sequence does not have well defined starting and ending points and can potentially be infinitely long).
  5.             // Create the learning algorithm for the ensemble classifier
  6.             var teacher = new HiddenMarkovClassifierLearning<MultivariateMixture<MultivariateNormalDistribution>>(Hmm,
  7.  
  8.                 // Train each model using the selected convergence criteria
  9.                 i => new BaumWelchLearning<MultivariateMixture<MultivariateNormalDistribution>>(Hmm.Models[i])
  10.                 {
  11.                     Tolerance = tolerance,
  12.                     Iterations = iterations,
  13.  
  14.                     FittingOptions = new NormalOptions()
  15.                     {
  16.                         Regularization = 1e-5
  17.                        // , Diagonal = true
  18.                        
  19.                     }
  20.                 }
  21.             );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement