Cost Function, Gradient Descent.
how to do the vectorized implementation of this algorithm as well. Section 4- Python implementation np.random.seed(42) X = 2 * np.random.rand(100, 1) y = (4 + 3 * X + np.random.randn(100, 1) > 5).astype(int) # Add a bias term to the feature matrix X_b = np.c_[np.ones((100, 1)), X] # Sigmoid