luisegarduno / MachineLearning_Projects

Several notebooks that cover various ML concepts such LR, CNN's, RNN's, & more!
0 stars 0 forks source link

[Lab 3] (Quick fix) Update Hessian term in 'Modeling' section #6

Closed luisegarduno closed 2 years ago

luisegarduno commented 3 years ago

Feedback obtained: "Almost perfect. The hessian term is always using L2 regularization."

Criteria: Create a custom, one-versus-all logistic regression classifier using numpy and scipy to optimize. Use object oriented conventions identical to scikit-learn. You should start with the template developed by the instructor in the course. You should add the following functionality to the logistic regression classifier: Ability to choose optimization technique when class is instantiated: either steepest descent, stochastic gradient descent, or Newton's method. Update the gradient calculation to include a customizable regularization term (either using no regularization, L1 regularization, L2 regularization, or both L1 and L2 regularization). Associate a cost with the regularization term, "C", that can be adjusted when the class is instantiated

luisegarduno commented 2 years ago

The Hessian term was never only L2 regularization. In Cell #12, you can see that the penalty parameter is passed with a value of l1.