コード例 #1
0
 public CorrelatedFeatures(float corrlation, line lin_reg, float threshold,
                           string feature1, string feature2)
 {
     this.corrlation = corrlation;
     this.feature1   = feature1;
     this.feature2   = feature2;
     this.lin_reg    = lin_reg;
     this.threshold  = threshold;
 }
コード例 #2
0
        //sap-
        public List <DataPoint> line_to_points(line l, int size, List <float> x, List <float> y)
        {
            List <DataPoint> line_p = new List <DataPoint>();

            for (int i = 0; i < size; i++)
            {
                line_p.Add(new DataPoint(x[i], l.f(x[i])));
                line_p.Add(new DataPoint(l.g(y[i]), y[i]));
            }
            return(line_p);
        }
コード例 #3
0
        /*public float dev(Point p , List<Point> points)
         * {
         *  Line l = linear_reg(points);
         *  return dev(p, l);
         * }*/

        public float dev(point p, line l)
        {
            return(Math.Abs(p.y - l.f(p.x)));
        }