Skip Navigation
16 comments
  • I'd say since you're a beginner, it's much better to try to implement your regression functions and any necessary helper functions (train/test split etc...) yourself in the beginning. Learn the necessary linear algebra and quadratic programming and try to implement linear regression, logistic regression and SVMs using only numpy and cvxpy.

    Once you get the hang of it, you can jump straight into sklearn and be confident that you understand sort of what those "blackboxes" really do and that will also help you a lot with troubleshooting.

    For neural networks and deep learning, pytorch is imposing itself as an industry standard right now. Look up "adjoint automatic differentiation" ("backpropagation" doesn't do it any justice as pytorch instead implements a very general dynamic AAD) and you'll understand the "magic" behind the gradients that pytorch gives you. Karpathy's YouTube tutorials are really good to get an intro to AAD/autodiff in the context of deep learning.

    • So I should learn sklearn first before pytorch to understand the basics?

      • Linear and logistic regression are much easier (and less error prone) to implement from scratch than neural network training with backpropagation.

        That way you can still follow the progression I suggested: implement those regressions by hand using numpy -> compare against (and appreciate) sklearn -> implement SVMs by hand using cvxpy -> appreciate sklearn again.

        If you get the hang of "classical" ML, then deep learning becomes easy as it's still machine learning, just with more complicated models and no closed-form solutions.

  • For more "traditional" or "statistical" modeling (not NN) 100% start with sklearn. It has a plethora of algorithms, and their docs read like a book. You can learn a whole bunch of new methods and techniques from there too. In tandum, you should familiarize yourself with matplotlib, which is the plotting library it uses under the hood (and is by far the most popular plotting library.)

    For deep learning, I'd say PyTorch? Tensorflow used to be standard but its fallen out of favor compared to PyTorch. I don't use either so I'm nit sure.

16 comments