Page MenuHomec4science

stochastic_gradient_descent.py
No OneTemporary

File Metadata

Created
Sun, Feb 23, 17:36

stochastic_gradient_descent.py

# -*- coding: utf-8 -*-
"""Stochastic Gradient Descent"""
def compute_stoch_gradient(y, tx, w):
"""Compute a stochastic gradient from just few examples n and their corresponding y_n labels."""
# ***************************************************
# INSERT YOUR CODE HERE
# TODO: implement stochastic gradient computation.It's same as the gradient descent.
# ***************************************************
raise NotImplementedError
def stochastic_gradient_descent(y, tx, initial_w, batch_size, max_iters, gamma):
"""Stochastic gradient descent algorithm."""
# ***************************************************
# INSERT YOUR CODE HERE
# TODO: implement stochastic gradient descent.
# ***************************************************
raise NotImplementedError
return losses, ws

Event Timeline