SHARE
TWEET

Untitled

a guest Aug 27th, 2015 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var h = new MultivariateNormalDistribution[2];
  2.             for (int i = 0; i < h.Length; i++)
  3.             {
  4.                 h[i] = new MultivariateNormalDistribution(6);
  5.             }
  6.             var Hmm = new HiddenMarkovClassifier<MultivariateMixture<MultivariateNormalDistribution>>(classes.Count,
  7.                 new Forward(states), new MultivariateMixture<MultivariateNormalDistribution>(h), classes.ToArray());
  8.             // I tried to change the topology from Forward to Ergodic and the performence is nearly the same
  9.             // 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).
  10.             // Create the learning algorithm for the ensemble classifier
  11.             var teacher = new HiddenMarkovClassifierLearning<MultivariateMixture<MultivariateNormalDistribution>>(Hmm,
  12.  
  13.                 // Train each model using the selected convergence criteria
  14.                 i => new BaumWelchLearning<MultivariateMixture<MultivariateNormalDistribution>>(Hmm.Models[i])
  15.                 {
  16.                     Tolerance = tolerance,
  17.                     Iterations = iterations,
  18.  
  19.                     FittingOptions = new MixtureOptions()
  20.                     {
  21.                         InnerOptions = new NormalOptions()
  22.                         {
  23.                             Diagonal = false
  24.                         },
  25.                         Logarithm = true,
  26.                         Threshold = 1e-5
  27.                         // , Diagonal = true
  28.  
  29.                     }
  30.                 }
  31.             );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top