Skip to content

Commit

Permalink
remove normalization by popularity in tree kernels (idk why it does n…
Browse files Browse the repository at this point in the history
…ot work for tracin with it ...)
  • Loading branch information
pierrenodet committed Dec 3, 2024
1 parent 5fce365 commit f695194
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
14 changes: 10 additions & 4 deletions examples/plot_linearized.ipynb

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion mislabeled/probe/_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def linearize_trees(
),
):
leaves = OneHotEncoder().fit_transform(estimator.apply(X).reshape(X.shape[0], -1))
leaves = leaves / np.sqrt(leaves.sum(axis=0))
if is_classifier(estimator):
linear = default_linear_model["classification"]
else:
Expand Down

0 comments on commit f695194

Please sign in to comment.