def get_coefs(self, feature_names: List[str], coef_func=None): """ Get dataframe of classifier coefficients. By default, assumes it is a pipeline with a logistic regression component :param feature_names: list of feature names to get coefficients for. if None, uses vectorizer vocabulary :param coef_func: function for accessing the list of coefficients from the classifier model :return: DataFrame of features and coefficients, indexed by feature names """ return get_coefs_helper(self.clf, feature_names, coef_func)
def get_coefs(self, feature_names: List[str], coef_func=None): """ Get dataframe of classifier coefficients. By default, assumes it is a pipeline with a logistic regression component. For other setups, the user should define a custom `coef_func`. :param feature_names: list of feature names to get coefficients for :param coef_func: (optional) function for accessing the list of coefficients from the classifier model :return: DataFrame of features and coefficients, indexed by feature names """ return get_coefs_helper(self.clf, feature_names, coef_func)