Esempio n. 1
0
        public IntervalEstimation IntervalDistribution(double[] xArray, int[] vArray, double reponseProbability, double confidenceLevel)
        {
            var outputParameters = MLS_getMLS(xArray, vArray);

            MLR_polar.Likelihood_Ratio_Polar(xArray, vArray, "normal", outputParameters.μ0_final, outputParameters.σ0_final, reponseProbability, confidenceLevel, out var final_result);
            return(IntervalEstimation.Parse(final_result));
        }
Esempio n. 2
0
 private IntervalEstimation GetIntervalEstimationValue(IntervalEstimation rt)
 {
     rt.Confidence.Down = StandardSelection.ProcessValue(rt.Confidence.Down);
     rt.Confidence.Up   = StandardSelection.ProcessValue(rt.Confidence.Up);
     rt.Mu.Down         = StandardSelection.ProcessValue(rt.Mu.Down);
     rt.Mu.Up           = StandardSelection.ProcessValue(rt.Mu.Up);
     return(rt);
 }
Esempio n. 3
0
        public static IntervalEstimation Parse(double[] finalResult)
        {
            IntervalEstimation ret = new IntervalEstimation();

            ret.Confidence.Down = finalResult[5];
            ret.Confidence.Up   = finalResult[4];
            ret.Mu.Down         = finalResult[1];
            ret.Mu.Up           = finalResult[0];
            ret.Sigma.Down      = finalResult[3];
            ret.Sigma.Up        = finalResult[2];
            return(ret);
        }
Esempio n. 4
0
        public override IntervalEstimation IntervalDistribution(double[] xArray, int[] vArray, double reponseProbability, double confidenceLevel)
        {
            MLR_polar.Max_Likelihood_Estimate(xArray, vArray, "logistic", out var mu, out var sigma, out var L);
            MLR_polar.Likelihood_Ratio_Polar(xArray, vArray, "logistic", mu, sigma, reponseProbability, confidenceLevel, out var final_result);
            IntervalEstimation ret = new IntervalEstimation();

            ret.Confidence.Down = final_result[5];
            ret.Confidence.Up   = final_result[4];
            ret.Mu.Down         = final_result[1];
            ret.Mu.Up           = final_result[0];
            ret.Sigma.Down      = final_result[3];
            ret.Sigma.Up        = final_result[2];
            return(ret);
        }
Esempio n. 5
0
        public override IntervalEstimation IntervalDistribution(double[] xArray, int[] vArray, double reponseProbability, double confidenceLevel)
        {
            OutputParameters outputParameters = new OutputParameters();

            pub_function.norm_MLS_getMLS(xArray, vArray, out outputParameters.varmu, out outputParameters.varsigma, out outputParameters.Maxf, out outputParameters.Mins);

            MLR_polar.Likelihood_Ratio_Polar(xArray, vArray, "normal", outputParameters.varmu, outputParameters.varsigma, reponseProbability, confidenceLevel, out var final_result);
            IntervalEstimation ret = new IntervalEstimation();

            ret.Confidence.Down = final_result[5];
            ret.Confidence.Up   = final_result[4];
            ret.Mu.Down         = final_result[1];
            ret.Mu.Up           = final_result[0];
            ret.Sigma.Down      = final_result[3];
            ret.Sigma.Up        = final_result[2];
            return(ret);
        }
Esempio n. 6
0
            public SideReturnData BatchIntervalCalculate(double Y_Ceiling, double Y_LowerLimit, int Y_PartitionNumber, double ConfidenceLevel, double favg, double fsigma, double[] xArray, int[] vArray, int intervalChoose)
            {
                SideReturnData sideReturnData = new SideReturnData();
                double         Y_ScaleLength  = (DistributionSelection.QnormAndQlogisDistribution(Y_Ceiling) - DistributionSelection.QnormAndQlogisDistribution(Y_LowerLimit)) / Y_PartitionNumber;

                sideReturnData.responseProbability = new double[Y_PartitionNumber + 1];
                for (int i = 0; i <= Y_PartitionNumber; i++)
                {
                    if (i == 0)
                    {
                        sideReturnData.responseProbability[i] = Y_LowerLimit;
                    }
                    else
                    {
                        sideReturnData.responseProbability[i] = DistributionSelection.PointIntervalDistribution(DistributionSelection.QnormAndQlogisDistribution(Y_LowerLimit) + i * Y_ScaleLength, 0, 1);
                    }
                }
                sideReturnData.Y_Ceilings     = new double[sideReturnData.responseProbability.Length];
                sideReturnData.Y_LowerLimits  = new double[sideReturnData.responseProbability.Length];
                sideReturnData.responsePoints = new double[sideReturnData.responseProbability.Length];

                for (int i = 0; i < sideReturnData.responseProbability.Length; i++)
                {
                    IntervalEstimation ie = new IntervalEstimation();
                    if (intervalChoose == 0)
                    {
                        ie = SingleSideEstimation(xArray, vArray, sideReturnData.responseProbability[i], ConfidenceLevel);
                    }
                    else
                    {
                        ie = DoubleSideEstimation(xArray, vArray, sideReturnData.responseProbability[i], ConfidenceLevel);
                    }
                    sideReturnData.Y_LowerLimits[i] = ie.Confidence.Down;
                    sideReturnData.Y_Ceilings[i]    = ie.Confidence.Up;
                    double fq = sideReturnData.responseProbability[i];
                    sideReturnData.responsePoints[i] = StandardSelection.ProcessValue(StandardSelection.InverseProcessValue(favg) + (DistributionSelection.QnormAndQlogisDistribution(fq) * fsigma));
                }
                return(sideReturnData);
            }
Esempio n. 7
0
 public IntervalEstimation IntervalDistribution(double[] xArray, int[] vArray, double reponseProbability, double confidenceLevel)
 {
     MLR_polar.Max_Likelihood_Estimate(xArray, vArray, "logistic", out var mu, out var sigma, out var L);
     MLR_polar.Likelihood_Ratio_Polar(xArray, vArray, "logistic", mu, sigma, reponseProbability, confidenceLevel, out var final_result);
     return(IntervalEstimation.Parse(final_result));
 }