Credit Scoring Model

Background and overview

Further links of the project

Data Structure Queries

Insights of the analysis

Summary of findings

Insights Deep Dive

Machine Lerning model

Model selection

Model performance

Python code

The following code shows the way the Pipelines were created.


                    from sklearn.pipeline import Pipeline
                    from sklearn.preprocessing import StandardScaler, OneHotEncoder
                    from sklearn.compose import ColumnTransformer
                    from sklearn.linear_model import LogisticRegression
                    
                    numeric_features = ['income', 'age', 'debt_ratio']
                    numeric_transformer = Pipeline(steps=[('scaler', StandardScaler())])
                    
                    categorical_features = ['employment_type', 'residence_state']
                    categorical_transformer = Pipeline(steps=[('onehot', OneHotEncoder(handle_unknown='ignore'))])
                    
                    preprocessor = ColumnTransformer(
                        transformers=[
                            ('num', numeric_transformer, numeric_features),
                            ('cat', categorical_transformer, categorical_features)
                        ]
                    )
                    
                    model = Pipeline(steps=[
                        ('preprocessor', preprocessor),
                        ('classifier', LogisticRegression())
                    ]) 
                

Recommendations