Model Accuracy


Model accuracy is at 76%, which is a practical ratio without over fitting the model.

Responsive image

Prediction Results Output


The Project Team compared 250 rows of Actual and Predicted DEFAULT results from the test data Credit_Data_Original.csv.

First, the model.predict_classes() function was used on the test data.
  • encoded_predictions = default_model.predict_classes(X_test_scaled[:])
  • prediction_labels = label_encoder.inverse_transform(encoded_predictions)
Then, Actual Outcomes and Variable Outcomes were printed for comparison.
  • print(f"DEFAULT OUTCOME KEY: (DEFAULT YES: 1 , DEFAULt NO: 0 )")
  • print(f"------------------------------------------------------")
  • print(f"Predicted Outcome: {prediction_labels}")
  • print(f"Actual Outcome: {list(y_test[:])}")
Responsive image

Approval Status Data Frame


The Data Frame below shows the first 20 results of an Approval-Status For Loop that was applied to the test data to generate Approval Status.

The For Loop function applied string values to each account in the test data and the results appear in the Approval_Status column.

The three For Loop parameters were:
  • If predictive and actual outcomes both return default, approval status = Denied
  • If both outcomes did not return default, approval status = Approved
  • If mixed results, approval status = Pending Further Analysis
Responsive image

Aggregate Predictive Outcomes Data Frame


Responsive image
In order to generate the aggregate predictive outcomes, the total Approval Status count and total Status Outcome were determined.

    statusValueCount= approval_df["Approval_Status"].value_counts()
    totalStatusOutcome = len(approval_df["Approval_Status"])
Then the percentages were calculated using the two counts.

    statusOutcomeRatio = statusValueCount/ totalStatusOutcome
The results of the Default Model indicated a high Approved rating of nearly 64%.


Visualizations


Each of these bar charts shows that the Approved rating is greater than the Pending Further Analysis and Denied ratings combined.

Both Total Predictive Outcomes and Percentages Predictive Outcomes are plotted on the Double Y Axis line and bar chart.

Simple Bar Graph

AltText

Double-Axis Graph