Open main menu

CDOT Wiki β

Changes

DPS921/Franky

148 bytes added, 00:02, 26 November 2018
Optimized with DAAL
The function called "lin_reg_norm_eq_dense_batch.cpp" in the DAAL library was manipulated to test the linear regression model. First, the function "trainModel()" is called. This function reads the "train.csv" data,
and then merges the columns based on the number of independent and dependent variables, in this case it is simple regression with 1 dependent and 1 independent variable. An optimized algorithm is then initialized, training data and dependent values are passed in, and trained based on the data within the csv file. A training result is produced, which is a line of best fit model for the data. The "testModel()" function is then called, which initilized initialized a test algorithm. The algorithm works by passing the dependent variable into the training model, and the independent values are predicted. The model predicted y = 0.5x + 1, which matches nearly perfectly with the random data which was stored to both the train.csv, and test.csv files.
14
edits