Posts

Showing posts from July, 2018

Logistic Regression using German Credit Data

Image
Logistic Regression using German Credit Data In [1]: import numpy as np In [2]: import pandas as pd In [3]: from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score , classification_report The German Credit Data contains data on 20 variables and the classification whether an applicant is considered a Good or a Bad credit risk for 1000 loan applicants. In [9]: credit_dat = pd . read_csv ( "C:\Work\Datasets\germancreditdata.csv" ) In [10]: print ( credit_dat . head ()) Creditability Account Balance Duration of Credit (month) \ 0 1 1 18 1 1 1 9 2 1 2 12 3 1 1