Example #1
0
 public SRMModel(SRM srm, IMessage msg)
 {
     this.srm      = srm;
     conf          = new EMConf();
     conf.StopCond = StopCondition.PARAMETER;
     status        = ModelStatus.NotIntialized;
 }
Example #2
0
 public void InitAll(SRMData data, EMConf emconf, IMessage msg)
 {
     foreach (HErlangEMSRM model in allmodels)
     {
         EM em = new EM(model, emconf, msg);
         em.Initialize(data);
         maxmodel = model;
     }
 }
Example #3
0
        public HErlangAll(int ndim) : base(ndim + "-HyperErlang SRGM", 2 * ndim)
        {
            this.ndim = ndim;
            maxconf   = new EMConf();

            allmodels = new List <HErlangEMSRM>();
            int[] list = new int[ndim];
            MakeShape(0, list, 1, ndim);
            maxmodel = allmodels[0];
        }
Example #4
0
 public void FitAll(SRMData data, EMConf emconf, IMessage msg)
 {
     maxllf = double.MinValue;
     foreach (HErlangEMSRM model in allmodels)
     {
         EM em = new EM(model, emconf, msg);
         em.Fit(data);
         if (emconf.Llf > maxllf)
         {
             maxllf   = emconf.Llf;
             maxmodel = model;
             maxconf.Set(emconf);
         }
     }
     emconf.Set(maxconf);
 }
Example #5
0
 public SRMConsoleMessage(SRM srm, EMConf emparam)
 {
     this.srm     = srm;
     this.emparam = emparam;
 }