Exemple #1
0
 def _weights(label_id, scale=1.0):
     weights = feature_weights[:, label_id]
     return get_top_features_filtered(x, flt_feature_names, flt_indices,
                                      weights, top, scale)
Exemple #2
0
 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)
Exemple #3
0
 def get_top_features(weights, scale=1.0):
     return get_top_features_filtered(x, flt_feature_names, flt_indices,
                                      weights, top, scale)