(self, X=None, y=None)
Calculate feature importances.
        Importances are calculated using sklearn.inspection.permutation_importance to provide this capability for all sklearn algorithms.
        https://scikit-learn.org/stable/modules/permutation_importance.html
Calculate feature importances.
        Importances are calculated using sklearn.inspection.permutation_importance to provide this capability for all sklearn algorithms.
        https://scikit-learn.org/stable/modules/permutation_importance.html
Calculate feature importances . Importances are calculated using sklearn . inspection . permutation_importance to provide this capability for all sklearn algorithms . https : // scikit - learn . org / stable / modules / permutation_importance . html
def _calc_importances(self, X=None, y=None):
        """
        Calculate feature importances.
        Importances are calculated using sklearn.inspection.permutation_importance to provide this capability for all sklearn algorithms.
        https://scikit-learn.org/stable/modules/permutation_importance.html
        """
        
        # Fill null values in the test set according to the model settings
        X_test = utils.fillna(X, method=self.model.missing)
        
        # Calculate mean importances
        importances = permutation_importance(self.model.pipe, X, y, n_repeats=self.model.importances_n_repeats, random_state=self.model.random_state)

        # Structure into a dataframe
        self.model.importances = pd.DataFrame({"feature_name": X_test.columns, "importance": importances.importances_mean})
def _calc_importances ( self , X = None , y = None ) : # Fill null values in the test set according to the model settings X_test = utils . fillna ( X , method = self . model . missing ) # Calculate mean importances importances = permutation_importance ( self . model . pipe , X , y , n_repeats = self . model . importances_n_repeats , random_state = self . model . random_state ) # Structure into a dataframe self . model . importances = pd . DataFrame ( { "feature_name" : X_test . columns , "importance" : importances . importances_mean } )