MACHINE LEARNING

APPLICATION OF SUPERVISED LEARNING

MACHINE LEARNINGHARD QUESTIONS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
print(’Training set score:{:.4f}’.format(logreg.score(X ____ train, y ____ train))) print(’Test set score:{:.4f}’.format(logreg.score(X ____ test, y ____ test)))What is the use of this code?
A
print the scores on training and test set
B
print the scores on training
C
print the scores on training and test set and format the data
D
none of these
Explanation: 

Detailed explanation-1: -accuracy score(y train, y train pred) to get the training accuracy. Alternatively, you can use clf. score(X train, y train), which should give you the same result.

Detailed explanation-2: -Step 1-Import required libraries. Step 2-Load, visualize and explore the dataset. Step 3-Clean the data set. Step 4-Deal with the outliers. Step 5: Define dependent and independent variables and then split the data into a training set and testing set. Step 6-Fit a logistic regression model using sklearn. More items •08-Feb-2022

There is 1 question to complete.