Starting from:

$30

Assignment 3 binary class label

Homework Assignment 3
This assignment includes three problems for practicing logistic regression methods and evaluation metrics.

Problem I. Logistic Regression

Overview. The goal of this mini-project is to predict the binary class label for any sample described with two features. You will be instructed to use Logistic Regression (LR) method for solving a simulated problem.

Sample Codes. The file “main_part1.py” provides sample codes to start with. There are four major steps: generate dataset, training LR model, testing, and evaluating the prediction results.

The first step is to generate data (provided) and split it into training and testing subsets. You will need to write your codes to do the split. Then, the code will display the splitting results as the following figures:

The second step is to train a logistic regression model using the training data. To do so, you will need to use the functions we provided in the folder ‘codeLogit’. Remember there are two different implementations. Please try both methods in this placefolder and report their performance differences.

The third step is to apply the learned model to get the binary classes of testing samples. This step should be modified according to the implementation of the second step.

The fourth step is to compare the predictions with the ground-truth labels and calculate average errors and standard deviation.

You will need to replace the PLACEHOLDERs with your codes for splitting datasets (step 1) , training (step 2) , and testing (step 3). While there is no need to change the step 4, you are encouraged to implement your own ways.

In your report, please include both figures of sample scatters and quantitative results of your implementation.

More products