# OK, now lets use linear regression to fit my $reg = Statistics::Regression->new( $data->{Name}, [ "Const", "Theta1", "Theta2" ] ); # Add data points for ( @{$data->{values}} ) { # some time conversion goes on here to make times into Epoch ... my $epoch = mktime($s, $m, $h, $D, $M-1, $Y); my $x = $_->[2]; print "\$reg->include ( $epoch, [1, $x, ". $x**2 ." ] )\n"; $reg->include ( $epoch, [1, $x, $x**2 ] ); } print "Results are ...\n"; $reg->print();