Subscribe to DSC Newsletter

Machine Learning with C++ - Polynomial Regression on GPU

Hello, this is my second article about how to use modern C++ for solving machine learning problems. This time I will show how to make a model for polynomial regression problem described in previous article, but now with another library which allows you to use your GPU easily.

For this tutorial I chose MShadow library, you can find documentation for it here. This library was chosen because it is actively developed now, and used as a basis for one of a wide used deep learning framework MXNet. Also it is a header only library with minimal dependencies, so it's integration is not hard at all.

Continue reading the article and source code here. Please feel free to leave comment or create issue in repository if you find some mistakes.

Content

  1. Preparations
  2. Loading data to MShadow data-structures
  3. Standardization
  4. Generating additional polynomial components
  5. Generating new data for testing model predictions
  6. Batch gradient descent implementation
  7. Training the regression model
  8. Making predictions
  9. Plot results

Views: 2312

Tags: C++, example, gpu, linear regression, tensor

Comment

You need to be a member of Data Science Central to add comments!

Join Data Science Central

Videos

  • Add Videos
  • View All

© 2019   Data Science Central ®   Powered by

Badges  |  Report an Issue  |  Privacy Policy  |  Terms of Service