Model interpretation

function: scorecardbundle.model_interpretation.ScorecardExplainer.important_features()

Identify features who contribute the most in pushing the total score above a threshold.

Parameters

scored_df: pandas.DataFrame, shape (number of instances,number of features)
    The dataframe that contains the both each feature's scores and total scores 

feature_names: python list
    The names of features 

col_totalscore: python string
    The name of the total score column. Default is 'TotalScore'

threshold_method: float in (0,1) or string 'bins' or integer in [1,number of features].
    The method to get the thresholds to filter importance features. Default is 0.8
    
    - When threshold_method is a float in interval (0,1), the thresholds will be calculated as the 
    threshold_method percentage of total scores.
    
    - When threshold_method is a integer in [1,number of features]. Top n important features 
    will be returned.
    
    - When threshold_method=='bins', the thresholds will be determined by predefined bins 
    (defined in `bins` parameter).
    The largest bin value below the total score will be selected for each instance.
    The method 'bins' is not recommended 
    

bins: numpy.array, shape (number of bins,).
    The predefined bins to bin the total score into intervals. This parameter is only used when
    threshold_method=='bins'. Default is None.

Return

ifeatures_list: python list.
    A list of dictionaries of importance features with feature names as keys and scores as values.