# svm-sgd-parallel

Compilation and Execution

Compile the Project
Run the following command to build the project:

stack build

Execute the Program
Run the program with the command below:

stack exec -- svm-sgd-parallel-exe normalized_data_binary.dat +RTS -l -N(number of cores) -RTS
Replace (number of cores) with the number of cores you want to test on.


Custom Parameters
To specify lambda and epochs (default 1e-5, 200), use flags:
e.g.
stack exec -- svm-sgd-parallel-exe normalized_data_binary.dat --lambda 0.00001 --epochs 200 +RTS -l -N4 -RTS

Running the Sequential Version

Comment out lines 35-38 in Train.hs.

Uncomment this line 33 for sequential execution.
trainEpoch wParam = trainBatch wParam (x, eta) -- seq