private void btnEstimateLaplacian_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
var laplacian = Laplacian.Estimate(inputs, inputs.Length, out range);
numLaplacianSigma.Value = (decimal)laplacian.Sigma;
}