Logistic Regression from scratch (and how to make it nonlinear)
Logistic Regression is a staple of the data science workflow. Below, I show how to implement Logistic Regression with Stochastic Gradient Descent (SGD) in a few dozen lines of Python code, using NumPy. Then I will show how to build a nonlinear decision boundary with Logistic Regression by using feature crosses. Here is the repo with the full code shown below. Although, in many applications Logistic Regression has been replaced by more advanced techniques such as ensemble tree-based methods (like gradient boosting) or by deep neural networks. However, it is still commonly used due to its simplicity and interpretability.
Jun-27-2018, 02:52:09 GMT
- Technology: