|
From: Ethan M. <merritt@u.washington.edu> - 2009-02-02 17:33:19
|
On Saturday 31 January 2009 17:37:51 James R. Van Zandt wrote:
>
> Currently gnuplot has these data formats for fitting functions with
> one or two independent variables:
>
> y
> x:y
> x:y:s
> x:y:z:s
>
> I propose to implement these additional data formats for fitting
> functions with 3-5 independent variables:
>
> v:x:y:z:s
> u:v:x:y:z:s
> t:u:v:x:y:z:s
I am not familiar with the "fit" subsystem, so I may be missing
some essential point....
but the above looks very strange to me. Why stick your additional
dummy variables at the start rather than the end? Surely it is
more natural to have
x
x:y
x:y:z
...
x:y:z:t:u:v
> For example, if there are five columns:
>
> The first column inherits its data range and time/date flag from the
> V axis unless a specific data range is given, and has the dummy
> variable 'v' unless a different name is given in a range or "set
> dummy v" statement. The first range spec in a fit command would
> affect this variable.
>
> The second column inherits its data range and time/date flag from
> the first X axis unless a specific data range is given, and has the
> dummy variable 'x' unless a different name is given in a range or
> "set dummy x" statement. The second range spec in a fit command
> would affect this variable.
>
> The third column inherits its data range and time/date flag from the
> first Y axis unless a specific data range is given, and has the
> dummy variable 'y' unless a different name is given in a range or
> "set dummy y" statement.
>
> The fourth column has the dependent variable, and inherits from the
> Z axis.
>
> The last column gives the error standard deviation.
>
> Linear regression would look like this:
>
> h(v,x,y) = a*v + b*x + c*y
> fit h(v,x,y) 'foo.dat' using 1:2:3:4:(1) via a,b,c
Wouldn't it be far more natural to say
h(x,y,z) = a*x + b*y + c*z
fit h(x,y,z) 'foo.dat' using 1:2:3:4 via a,b,c
As I say, I am not familiar with the 'fit' subsystem, but that's
what I would expect it to behave like, and I suspect other naive
users would expect the same.
Ethan
> fit [q=-8:8] [r=*:*] [s=*:*] [t=0:10] a*q+b*r+c*s+d*t \
> 'foo.dat' using 1:2:3:4:5:(1) via a, b, c, d
>
> I think I see how to do this.
>
> Comments?
>
> - Jim Van Zandt
--
Ethan A Merritt
|