Gradient Descent, Machine Learning.
Replicated equation for your convenience You can write a python helper function for convenience. Here’s a snippet for you to use. import numpy as np import matplotlib.pyplot as plt def sigmoid(z): return 1 / (1 + np.exp(-z)) def cross_entropy_loss(x, y, w): return -np.sum(np.log(sigmoid(y*x*w))) #