Example #1
0
        public void Initialize(SRMData data)
        {
            Alloc(data);
            double[] p = { 2.0, 4.0, 8.0, 16.0, 32.0, 64.0 };
            SetPowerStructuredParameter(data, p[0]);
            double   maxllf   = DoEstimation(data, 5);
            CPHParam maxparam = param.Create() as CPHParam;

            param.CopyTo(maxparam);
            for (int i = 1; i < p.Length; i++)
            {
                SetPowerStructuredParameter(data, p[i]);
                double llf = DoEstimation(data, 5);
                if (maxllf < llf)
                {
                    maxllf = llf;
                    param.CopyTo(maxparam);
                }
            }
            for (int i = 0; i < p.Length; i++)
            {
                SetLinearStructuredParameter(data, p[i]);
                double llf = DoEstimation(data, 5);
                if (maxllf < llf)
                {
                    maxllf = llf;
                    param.CopyTo(maxparam);
                }
            }
            maxparam.CopyTo(param);
            CPHDist cph = dist as CPHDist;

            cph.ClearCache();
        }
Example #2
0
        public void Post_em(SRMData data)
        {
            CPHDist cph = dist as CPHDist;

            cph.ClearCache();
        }