The earlier classification questions define a score, turn it into a probability, and determine the direction to correct it. Training is the repeated process that connects those pieces so a classifier learns its parameters from all examples.
Implement train_logistic_regression by reusing linear, sigmoid, bce_gradient, and gd_step in their forward-to-update order.
input is (batch_size, in_features) and binary target is (batch_size,).(weight, bias) with shapes (1, in_features) and (1,).(batch_size, 1).epochs full-batch updates; zero epochs returns the initialization.Open one at a time. Each gives away a little more than the last.
The forward pass has two stages: a linear score followed by a probability activation.
Within each epoch, pass sigmoid(linear(...)) and the reshaped targets to bce_gradient, then hand its results to gd_step.
No results yet
Run your code to check it against the examples, or submit to run every test.