Questions tagged [sgd]

63 questions
0
votes
1 answer

Gradient for log regression loss

I'm trying to write mini-batch gradient descent for log regression. Given numpy matrices X_batch (of shape (n_samples, n_features)) and y_batch (of shape (n_samples,)). Naive way is to write loop: def calc_loss_grad(self, X_batch, y_batch): …
A.King
  • 172
  • 2
  • 11
-1
votes
4 answers

SGD Classifier with Logloss and L2 regularization Using SGD without using sklearn python

I'm working on an assignment problem on SGD manual implementation using python. I'm stuck at the dw derivative function. import numpy as np import pandas as pd from sklearn.datasets import make_classification X, y =…
1 2 3 4
5