public static CoefficientCharacteristicsCatalog CalculateCoefficientCharacteristics()
        {
            CoefficientCharacteristicsCatalog coefficientCharacteristicsCatalog = new CoefficientCharacteristicsCatalog();

            coefficientCharacteristicsCatalog.pairCoefficientCorrelation = CorrelationField.CalculatePairCorrelationCoefficient();
            coefficientCharacteristicsCatalog.correlationRatio = CorrelationField.CalculateCorrelationRatio();
            coefficientCharacteristicsCatalog.coefficientSpearman = CorrelationField.CalculateSpearmanCoefficient();
            coefficientCharacteristicsCatalog.coefficientKendall = CorrelationField.CalculateKendallCoefficient();

            return coefficientCharacteristicsCatalog;
        }
예제 #2
0
        private void UpdateCellsOnCoefficientTable(CoefficientCharacteristicsCatalog _coefficientCharacteristicsCatalog)
        {
            dataGridView_CorrelationCoefficients.Rows[0].Cells[0].Value = _coefficientCharacteristicsCatalog.pairCoefficientCorrelation.name;
            dataGridView_CorrelationCoefficients.Rows[0].Cells[1].Value = _coefficientCharacteristicsCatalog.pairCoefficientCorrelation.value;
            dataGridView_CorrelationCoefficients.Rows[0].Cells[2].Value = _coefficientCharacteristicsCatalog.pairCoefficientCorrelation.statistic;
            dataGridView_CorrelationCoefficients.Rows[0].Cells[3].Value = _coefficientCharacteristicsCatalog.pairCoefficientCorrelation.quantil;

            if (_coefficientCharacteristicsCatalog.pairCoefficientCorrelation.valuability)
            {
                dataGridView_CorrelationCoefficients.Rows[0].Cells[4].Style = new DataGridViewCellStyle { ForeColor = Color.Green };
            }
            else
            {
                dataGridView_CorrelationCoefficients.Rows[0].Cells[4].Style = new DataGridViewCellStyle { ForeColor = Color.Red };
            }

            dataGridView_CorrelationCoefficients.Rows[0].Cells[4].Value = _coefficientCharacteristicsCatalog.pairCoefficientCorrelation.valuability;
            dataGridView_CorrelationCoefficients.Rows[0].Cells[5].Value = "["
                                                + _coefficientCharacteristicsCatalog.pairCoefficientCorrelation.confidenceInterval.min
                                                + ", " + _coefficientCharacteristicsCatalog.pairCoefficientCorrelation.confidenceInterval.max
                                                + "]";


            //


            dataGridView_CorrelationCoefficients.Rows[1].Cells[0].Value = _coefficientCharacteristicsCatalog.correlationRatio.name;
            dataGridView_CorrelationCoefficients.Rows[1].Cells[1].Value = _coefficientCharacteristicsCatalog.correlationRatio.value;
            dataGridView_CorrelationCoefficients.Rows[1].Cells[2].Value = _coefficientCharacteristicsCatalog.correlationRatio.statistic;
            dataGridView_CorrelationCoefficients.Rows[1].Cells[3].Value = _coefficientCharacteristicsCatalog.correlationRatio.quantil;

            if (_coefficientCharacteristicsCatalog.correlationRatio.valuability)
            {
                dataGridView_CorrelationCoefficients.Rows[1].Cells[4].Style = new DataGridViewCellStyle { ForeColor = Color.Green };
            }
            else
            {
                dataGridView_CorrelationCoefficients.Rows[1].Cells[4].Style = new DataGridViewCellStyle { ForeColor = Color.Red };
            }

            dataGridView_CorrelationCoefficients.Rows[1].Cells[4].Value = _coefficientCharacteristicsCatalog.correlationRatio.valuability;
            dataGridView_CorrelationCoefficients.Rows[1].Cells[5].Value = "[-, -]";


            //


            dataGridView_CorrelationCoefficients.Rows[2].Cells[0].Value = _coefficientCharacteristicsCatalog.coefficientSpearman.name;
            dataGridView_CorrelationCoefficients.Rows[2].Cells[1].Value = _coefficientCharacteristicsCatalog.coefficientSpearman.value;
            dataGridView_CorrelationCoefficients.Rows[2].Cells[2].Value = _coefficientCharacteristicsCatalog.coefficientSpearman.statistic;
            dataGridView_CorrelationCoefficients.Rows[2].Cells[3].Value = _coefficientCharacteristicsCatalog.coefficientSpearman.quantil;

            if (_coefficientCharacteristicsCatalog.coefficientSpearman.valuability)
            {
                dataGridView_CorrelationCoefficients.Rows[2].Cells[4].Style = new DataGridViewCellStyle { ForeColor = Color.Green };
            }
            else
            {
                dataGridView_CorrelationCoefficients.Rows[2].Cells[4].Style = new DataGridViewCellStyle { ForeColor = Color.Red };
            }

            dataGridView_CorrelationCoefficients.Rows[2].Cells[4].Value = _coefficientCharacteristicsCatalog.coefficientSpearman.valuability;
            dataGridView_CorrelationCoefficients.Rows[2].Cells[5].Value = "[-, -]";


            //


            dataGridView_CorrelationCoefficients.Rows[3].Cells[0].Value = _coefficientCharacteristicsCatalog.coefficientKendall.name;
            dataGridView_CorrelationCoefficients.Rows[3].Cells[1].Value = _coefficientCharacteristicsCatalog.coefficientKendall.value;
            dataGridView_CorrelationCoefficients.Rows[3].Cells[2].Value = _coefficientCharacteristicsCatalog.coefficientKendall.statistic;
            dataGridView_CorrelationCoefficients.Rows[3].Cells[3].Value = _coefficientCharacteristicsCatalog.coefficientKendall.quantil;

            if (_coefficientCharacteristicsCatalog.coefficientKendall.valuability)
            {
                dataGridView_CorrelationCoefficients.Rows[3].Cells[4].Style = new DataGridViewCellStyle { ForeColor = Color.Green };
            }
            else
            {
                dataGridView_CorrelationCoefficients.Rows[3].Cells[4].Style = new DataGridViewCellStyle { ForeColor = Color.Red };
            }

            dataGridView_CorrelationCoefficients.Rows[3].Cells[4].Value = _coefficientCharacteristicsCatalog.coefficientKendall.valuability;
            dataGridView_CorrelationCoefficients.Rows[3].Cells[5].Value = "[-, -]";
        }