Question: IN PYTHON ONLY For this case, you need to apply the decision rules and cutoff probability of 0 . 5 from Section to classify the
IN PYTHON ONLY
For this case, you need to apply the decision rules and cutoff probability of from Section
to classify the two loans in Table of the articleShould This Loan be Approved or Denied?: A Large Dataset with Class Assignment Guidelines
as higher risk or lower risk for loan approval by writing Python code to reproduce results not format in Tables a of this article using the SBA case data SBAcasecsv The variable Selected indicates which observations are the training data and which are the testing data training data to be used to build the model, testing data to validate the model Partition the data using this variable.
Ignore parts a b c and d
e For the Californiabased example, the final model with the risk indicators in Table is used to estimate the probability of default for the two loan applications. Use Python to predict the probability of default for Carmichael Realty Loan and SV Consulting Loan Applying the decision rules and cutoff probability of from Section
Links to an external site.
how should these two loans be classified as lower risk approve or higher risk deny
f The default cutoff value of is used in conjunction with the probability of default. Compute the threshold that should be used if we want to make a classification based on the odds of default, and the threshold for the corresponding logit
g When a higher riskmore likely to default loan is misclassified as lower riskmore likely to pay in full loan, the misclassification cost is much higher than when a lower riskmore likely to pay in full loan is misclassified as higher riskmore likely to default To minimize the expected cost of misclassification, should the cutoff value for classification which is currently at be increased or decreased?
h Review Python documentation: sklearn.linearmodel.LogisticRegression
Links to an external site.
and example code from the class.Fit a logistic regression model to reproduce results not format in Tables a of this article using the SBA case data SBAcasecsv by using sklearn LogisticRegression liblinear solver and sklearn LogisticRegression Default Solver lbfgs Adjust parameters such as "penalty" and "tol" as needed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
