SGD Framework is basically two parts: gradient calculation and weight update. Gradient calculation loads data from DDR and calculates the gradient of the preset weight and is a dataflow function. Weight update calculates the next weight based on the gradient and the chosen method and is executed after gradient calculation. The block diagram is shown as follows.
The correctness of Linear Regression/LASSO Regression/Ridge Regression Training using the SGD framework is verified by comparing results with Spark mllib. The results are identical.