Open source German credit data has been utilized from the UCI machine learning repository to model logistic regression: https://archive.ics.uci.edu/ml/datasets/Statlog+(German+Credit+Data).
>>> import os >>> os.chdir("D:\\Book writing\\Codes\\Chapter 3") >>> import numpy as np >>> import pandas as pd >>> from sklearn.model_selection import train_test_split >>> from sklearn.metrics import accuracy_score,classification_report >>> credit_data = pd.read_csv("credit_data.csv")
The following code describes the top five rows of the data:
>>> print (credit_data.head())
Altogether, we have ...