This is an example application for the publication:
Asai, Ryo, "Introduction to Intel DAAL: Polynomial Regression
with Batch Mode Computation", (2015) Colfax Research

The publication is available for download at:
http://colfaxresearch.com/intro-to-daal-1/

To get the data set used in our publication, download
the original data set from UCI Machine Learning Repository.
http://archive.ics.uci.edu/ml/datasets/Yacht+Hydrodynamics

Reference:
M. Lichman. UCI machine learning repository, 2013.
http://archive.ics.uci.edu/ml

-----------------------------
Requirements:
-----------------------------

- Intel C++ Compiler ver 16.0 or higher
- Intel Data Anaytics Acceleration Library 
- Linux Operating System

-----------------------------
Compilation:
-----------------------------

To compile, type the following into the terminal session:
~>  icpc -daal -o poly_reg batch_polynomial_regression.cc 

This will produce an executable "poly_reg".

To generate the data set used in the publication, go to
the UCI Machine Learning Repository and download the 
original data set:
http://archive.ics.uci.edu/ml/datasets/Yacht+Hydrodynamics

Then type: 
~>  ./convert-to-csv.sh yacht_hydrodynamics.data

This will create 4 files: trnFeatures.csv, trnResponse.csv, 
tstFeatures.csv, and refResponse.csv. See the Usage section
for more information on these files.

-----------------------------
Usage:
-----------------------------
The executable "poly_reg" (see above) requires 6 inputs:

~> ./poly_reg trnFeatures.csv trnResponse.csv numTrnVecs \
             tstFeatures.csv numTstVecs expansion

Note that this is one line ("\" is newline).
The inputs are:
-- trnFeatures.csv  - The CSV file containing the training 
                       feature vectors
-- trnResponse.csv - The CSV file response to features in 
                       trnFeatures.csv
-- numTrnVecs       - The number of training feature vectors
-- tstFeatures.csv  - The CSV file containing the test 
                       feature vectors
-- numTstVecs       - The number of test feature vectors
-- expansion        - The order of expansion to use. Higher
                       numbers may not work.

To run the application with the included test example, type:
~> ./poly_reg trnFeatures.csv trnResponse.csv 300 \
             tstFeatures.csv 7 3

This will output the prediction for responses to the test 
features in tstFeatures.csv using a 3rd Order polynomial 
regression. To compare with the actual results, refer to
refResponse.csv

To use the application for other data sets, first create
a valid set CSV files from the data set to be tested. See
the publication for more information on what constitutes 
a valid CSV file set. Then enter the proper numTrnVecs and 
numTstVecs for the data set, then finally pick an expansion. 
It is recommended to start with expansion set to 1, and 
gradually increasing this value.