Question: use python please Logistic Regression versus LDA. In this question, we will compare the performance of Logistic Regression and LDA through a simulation. Let X

use python please
Logistic Regression versus LDA. In this question, we will compare the performance of Logistic Regression and LDA through a simulation. Let X represent the input random vari- able and Y represent the output random variable for Binary classification. Let the conditional distributions be as follows: X|(Y = 1) is a t - distribution with 1 degree of freedom with mean ui X|(Y = -1) is a t - distribution with 1 degree of freedom with mean 0. and let P(Y = 1) = 0.5. Details about t-distribution could be found in the wikipedia link here. You could use np.random.standard-t and np.random.binomial for this question. (a) Repeat the following procedure for 100 trails: Set Mi = 1 and generate n = 100 training data samples (21,41),..., (C100;Y100) from the above model. Train a logistic regression and LDA classifier on this training data. Generate n = 100 testing data from the sam model. Note that you will know the true labels in this testing data as you generated it. Plot a box-plot of the test error of logistic regression and LDA across all the 100 trails. What is the mean and variance of the test errors of Logistic regression and LDA ? (Here, for each trail, the test error is defined as the number of misclassified samples on the testing data.) Logistic Regression versus LDA. In this question, we will compare the performance of Logistic Regression and LDA through a simulation. Let X represent the input random vari- able and Y represent the output random variable for Binary classification. Let the conditional distributions be as follows: X|(Y = 1) is a t - distribution with 1 degree of freedom with mean ui X|(Y = -1) is a t - distribution with 1 degree of freedom with mean 0. and let P(Y = 1) = 0.5. Details about t-distribution could be found in the wikipedia link here. You could use np.random.standard-t and np.random.binomial for this question. (a) Repeat the following procedure for 100 trails: Set Mi = 1 and generate n = 100 training data samples (21,41),..., (C100;Y100) from the above model. Train a logistic regression and LDA classifier on this training data. Generate n = 100 testing data from the sam model. Note that you will know the true labels in this testing data as you generated it. Plot a box-plot of the test error of logistic regression and LDA across all the 100 trails. What is the mean and variance of the test errors of Logistic regression and LDA ? (Here, for each trail, the test error is defined as the number of misclassified samples on the testing data.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
