src/03_modelling/011_modelling.py
def explain_model(pip, df, verbose=True):
        """
        This function will output a pandas dataframe to
        show the important features and their weights in a model
        """
        pp1_features = num_vars + \
            list(pip['preprocessor'].transformers_[
                1][1]['onehot'].get_feature_names())

        return eli5.formatters.as_dataframe.explain_weights_df(
            pip['classifier'],
            feature_names=pp1_features,
            top=30)

        This function will output a pandas dataframe to
        show the important features and their weights in a model
        
This function will output a pandas dataframe to
show the important features and their weights in a model
This function will output a pandas dataframe to show the important features and their weights in a model
def explain_model(pip, df, verbose=True):
        pp1_features = num_vars + \
            list(pip['preprocessor'].transformers_[
                1][1]['onehot'].get_feature_names())
        return eli5.formatters.as_dataframe.explain_weights_df(
            pip['classifier'],
            feature_names=pp1_features,
            top=30)
def explain_model ( pip , df , verbose = True ) : pp1_features = num_vars + list ( pip [ 'preprocessor' ] . transformers_ [ 1 ] [ 1 ] [ 'onehot' ] . get_feature_names ( ) ) return eli5 . formatters . as_dataframe . explain_weights_df ( pip [ 'classifier' ] , feature_names = pp1_features , top = 30 )
This function will output a pandas dataframe to
show the important features and their weights in a model
This function will output a pandas dataframe to show the important features and their weights in a model
"""
        This function will output a pandas dataframe to
        show the important features and their weights in a model
        """
pip
df
verbose