Example #1
0
        //constructor for manual processing (plotting)
        public Polynomial(double[] y, double[] x, string colname)
        {
            createResultsTable();
            _colname = colname;
            _modelDT = createModelTable(y, x);
            MultipleRegression model = new MultipleRegression(_modelDT, "Y", new[] { "X", "X**2" });

            model.Compute();
            DataTable result = model.Parameters;

            computePoly(result);
            _adjrsqrd = model.AdjustedR2;
            _rsqrd    = model.R2;
            savePolyInfo();
        }
Example #2
0
        //constructor for procedural processing in datasheet
        public Polynomial(DataTable dt, int colndx)
        {
            createResultsTable();
            _colname = dt.Columns[colndx].ColumnName;
            _modelDT = createModelTable(dt, colndx);
            MultipleRegression model = new MultipleRegression(_modelDT, "Y", new [] { "X", "X**2" });

            model.Compute();
            DataTable result = model.Parameters;

            computePoly(result);
            _adjrsqrd = model.AdjustedR2;
            _rsqrd    = model.R2;
            savePolyInfo();
        }