How to use the eli5.sklearn.utils.get_coef function in eli5

To help you get started, we’ve selected a few eli5 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TeamHG-Memex / eli5 / eli5 / sklearn / explain_prediction.py View on Github external
def _weights(label_id, scale=1.0):
        coef = get_coef(clf, label_id)
        scores = _multiply(x, coef)
        return get_top_features_filtered(x, flt_feature_names, flt_indices,
                                         scores, top, scale)
    return _weights
github TeamHG-Memex / eli5 / eli5 / sklearn / explain_weights.py View on Github external
def _features(target_id):
        coef = get_coef(reg, target_id, scale=coef_scale)
        if flt_indices is not None:
            coef = coef[flt_indices]
        return get_top_features(feature_names, coef, top)
github TeamHG-Memex / eli5 / eli5 / sklearn / explain_weights.py View on Github external
def _features(label_id):
        coef = get_coef(clf, label_id, scale=coef_scale)
        if flt_indices is not None:
            coef = coef[flt_indices]
        return get_top_features(feature_names, coef, top)