Question: Question 2 Setup a logistic regression model on the data at adultUCl. Discuss the performance of your model using appropriate statistics. Use dummy variables to

Question 2
Setup a logistic regression model on the data at adultUCl. Discuss the performance of your model using appropriate statistics. Use dummy variables to handle categorical variables.
Prepare the data. Create dummy variables for categorical variables. See this
Get feature matrix x, and target variable y (>50k or 50k)
Split data into training and testing
Normalize data using MinMaxScaler
Creat a LogisticRegression object for modeling
Train the model with training data
Compare the precision, recall, and F1-score on the train and test data.
Question 2 Setup a logistic regression model on

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!