Skip to content

Latest commit

 

History

History

q03_logistic_regression

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Logistic Regression (Model Building and Fitting)

If you have reached here so that means you have tackled the most difficult task for this data, and believe me, I appreciate your efforts.

So, what next? Here we go...

Write a functionlogistic_regression that :

  • Build the logistic regression model with random_state=9.
  • Fit that model on the test part.
  • Gives the confusion matrix as evaluation metric of how good fit model is.

Hint :Perform the feature scaling on testing and training data set on variables(ApplicantIncome, CoapplicantIncome, LoanAmount) using standardScaler() package from sklearn.preprocessing.

Parameters:

Parameter dtype argument type default value description
X_train Numpy arrays for training any format acceptable by sklearn scaled X_train
X_test Numpy arrays for testing any format acceptable by sklearn scaled X_test
y_train Numpy arrays for training any format acceptable by sklearn y_train
y_test Numpy arrays for testing any format acceptable by sklearn y_test

Returns:

Parameter dtype description
cm array of matrix Confusion matrix to evaluate your model