Esempio n. 1
0
        private void UpdataCrossValidationRegression(string fieldX, string fieldY, string title, int indexListOfValuesX, int indexListOfValuesY)
        {
            CalculateErrorsCrossValidation cal = new CalculateErrorsCrossValidation(this._data, this._check);
            List<double[]> listOfValues = cal.UpdatePredictedTable(dataK, Trend, Transformation);
            double[] regression = cal.CrossValidationRegression(fieldX, fieldY);
            double MaxZValue = dataK.GetMaxValuesZ()[1];
            crossValidation = new CrossValidationCheck(zedGraphControl2, listOfValues);
            crossValidation.DrawPoints(fieldX, fieldY, title, indexListOfValuesX, indexListOfValuesY);
            if (title == "Cross Validation")
                crossValidation.GuideLine(MaxZValue);
            crossValidation.RegressionLine(MaxZValue, regression[0], regression[1]);

            kriggingResult.RegressionValue1 = Math.Round(regression[0], 3).ToString();
            kriggingResult.RegressionValue2 = Math.Round(regression[1], 3).ToString();
            kriggingResult.RegressionR = Math.Round(regression[2], 3).ToString();

        }
Esempio n. 2
0
        private void UpdataCrossValidationRegression(string fieldX, string fieldY, string title, int indexListOfValuesX, int indexListOfValuesY)
        {

            //ListOFValues  ->  true value, predicted value, error, std error /////////////////
            //"Measured","Trans","Trend","Predicted","Error","StdError"       /////////////////
            CalculateErrorsCrossValidation cal = new CalculateErrorsCrossValidation(env.Data, env.CheckData);
            List<double[]> listOfValues = cal.UpdatePredictedTable(dataK, env.Trend, env.Transformation);
            double[] regression = cal.CrossValidationRegression(fieldX, fieldY);
            double MaxZValue = dataK.GetMaxValuesZ()[1];
            crossValidation = new CrossValidationCheck(zedGraphControl2, listOfValues);
            uxRegression.Text = string.Format(
                fieldX + @" = {1} + {0}*" + fieldY + " r= {2}", Math.Round(regression[0], 3), Math.Round(regression[1], 3), Math.Round(regression[2], 3));

            crossValidation.DrawPoints(fieldX, fieldY, title, indexListOfValuesX, indexListOfValuesY);
            if (title == "Cross Validation")
                crossValidation.GuideLine(MaxZValue);

            crossValidation.RegressionLine(MaxZValue, regression[0], regression[1]);
        }