Logistic regression for classification

Beijing Institute of Technology | Ming-Jian Li

The following Python code is a companion code for the course on Artificial Intelligence and Simulation Science. It functions to establish a logistic regression model to classify the given data, with parameters optimized using the gradient descent method.

The dataset is as follows:

The classification results for the given two points [2.5, 2.5] and [-6.0, -4.0] are:

Predicted Labels: [0. 1.]