SampleApp.MainForm.btnEstimateGaussian_Click C# (CSharp) Method

btnEstimateGaussian_Click() private method

private btnEstimateGaussian_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void btnEstimateGaussian_Click(object sender, EventArgs e)
        {
            DataTable source = dgvLearningSource.DataSource as DataTable;

            // Creates a matrix from the source data table
            double[,] sourceMatrix = source.ToMatrix(out columnNames);

            // Get only the input vector values (in the first two columns)
            double[][] inputs = sourceMatrix.GetColumns(0, 1).ToArray();

            DoubleRange range; // valid range will be returned as an out parameter
            Gaussian gaussian = Gaussian.Estimate(inputs, inputs.Length, out range);

            numSigma.Value = (decimal)gaussian.Sigma;
        }
MainForm