Skip to content
/ ml-hpx Public

Implementation of common ML algorithms from scratch, and improving their runtime using HPX.

Notifications You must be signed in to change notification settings

vrnimje/ml-hpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML - HPX

Implementation of common ML algorithms from scratch, and improving their runtime using HPX.

Build Instructions

Pre-requisites: Installing HPX

cmake -S . -Bbuild -GNinja
cmake --build build
./build/linear_reg [path_to_dataset]

Algorithms

1. Simple Linear Regression (One Variable), using Gradient Descent

linear_reg.cpp

Results with dataset containing 10000 points:

$ ./build/linear_reg datasets/linear_regressor_dataset_10000.csv
Final Parameters: W = 2.577991, B = -0.136139
Final Parameters: W = 2.514959, B = 3.057930
Final Parameters: W = 2.530195, B = 2.043939
Final Parameters: W = 2.523242, B = 2.506657
Results:

name: Sequential GD, for-loop,
executor: seq,
average: 0.72105570925


name: Linear Regression GD, STL, seq,
executor: seq  ,
average: 0.961342297166667


name: Linear Regression, GD, STL, par,
executor: std::execution::par,
average: 0.945831261333333


name: Linear Regression, GD, HPX, par,
executor: hpx::execution::par,
average: 0.51301071275

Note: Execution time of each implementation is averaged for 10 runs

Plot:

About

Implementation of common ML algorithms from scratch, and improving their runtime using HPX.

Resources

Stars

Watchers

Forks