Polynomial regression calculator using Hermite polynomials
The calculator was created as a part of Programming languages and methodology laboratories (Warsaw University of Technology, Electrical Faculty, Applied Computer Science, semester I)
make clean
./approx -s spline-file [-m max-polynomial] [-d max-derivative] [-p points-file] [ -g gnuplot-file [-f from_x -t to_x -n n_points ] ]
- spline-file - name of the file to which the spline functions will be written if
points-file
was also given, otherwise the spline will be read from a given file - max-polynomial - max polynomial degree which will be used for calculations (the bigger - the better approximation but also longer calculation time), by default 20
- max-derivative - max derivative degree which will be used for calculations (the bigger - the better approximation but also longer calculation time), by default 20
- points-file - name of the file from which the base two-dimensional points will be read
- gnuplot-file - name of the file to which
n_points
generated approximation points will be written - from_x - min point of approximation, by default x coordinate of the first point
- to_x - max point of approximation, by default x coordinate of the last point
- n_points - number of points to calculate, by default 1000
An example output files can be found in test
directory
Example program usage commands can be found in makefile
Command: ./approx -s test/1,m=25,d=25/spline -p test/dane.1 -g test/1,m=25,d=25/plotfile -m 25 -d 25
Command: ./approx -s test/2,m=5/spline -p test/dane.2 -g test/2,m=5/plotfile -m 5
Command: ./approx -s test/3,m=6,d=7/spline -p test/dane.3 -g test/3,m=6,d=7/plotfile -m 6 -d 7
Command: ./approx -s test/4default/spline -p test/dane.4 -g test/4default/plotfile
The calculator is licensed under MIT License - https://choosealicense.com/licenses/mit/