How to get the start and end values of the Regression series

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Kishore

How to get the start and end values of the Regression series

Post by Kishore » Tue Oct 29, 2002 6:27 am

Hello,
i want to use LinearRegression line. hear is my code.
//double dimensional array containing sample data
double [][] my2d=
{
{1,10},{2,11},{3,13},{4,15},{5,17},{6,18},{7,19},{8,20},{9,21},{10,22},{11,23},{12,24},
{12.1,10},{12.3,11},{12.5,13},{13.4,15},{13.8,17},{14.1,18},{14.7,19},{15,20},{15.9,21},{16,22},{18,23},{20,24}
};

double[] result=Regression.getOLSRegression(my2d);
LineFunction2D lf=new LineFunction2D(result[0],result[1]);
data2 =DatasetUtilities.sampleFunction2D(lf,double Start,double End,int samples,"regression");

DatasetUtilities.sampleFunction2D() function expects (fn,double start,double end,int samples,title) as arguments.
in this how do i get the values of start and end of the series.
is there a methods available to get the values of start and end values of the series,wcich i got it using my2d array.

Thanks in advance,
Kishore.

Dave Gilbert

Re: How to get the start and end values of the Regression se

Post by Dave Gilbert » Tue Oct 29, 2002 8:57 am


Locked