Skip to content

Commit 8ec8082

Browse files
committed
Pushing the docs to dev/ for branch: master, commit 19a473e77d6d4ff548c6210d81c4eafe03f58b8d
1 parent 11974dc commit 8ec8082

File tree

1,215 files changed

+3738
-3732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,215 files changed

+3738
-3732
lines changed

dev/_downloads/0e54710c34c6326f0886857069d1cc1f/plot_permutation_importance_multicollinear.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
},
6363
"outputs": [],
6464
"source": [
65-
"result = permutation_importance(clf, X_train, y_train, n_repeats=10,\n random_state=42)\nperm_sorted_idx = result.importances_mean.argsort()\n\ntree_importance_sorted_idx = np.argsort(clf.feature_importances_)\ntree_indicies = np.arange(1, len(clf.feature_importances_) + 1)\n\nfig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 8))\nax1.barh(tree_indicies, clf.feature_importances_[tree_importance_sorted_idx])\nax1.set_yticklabels(data.feature_names)\nax1.set_yticks(tree_indicies)\nax2.boxplot(result.importances[perm_sorted_idx].T, vert=False,\n labels=data.feature_names)\nfig.tight_layout()\nplt.show()"
65+
"result = permutation_importance(clf, X_train, y_train, n_repeats=10,\n random_state=42)\nperm_sorted_idx = result.importances_mean.argsort()\n\ntree_importance_sorted_idx = np.argsort(clf.feature_importances_)\ntree_indices = np.arange(0, len(clf.feature_importances_)) + 0.5\n\nfig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 8))\nax1.barh(tree_indices,\n clf.feature_importances_[tree_importance_sorted_idx], height=0.7)\nax1.set_yticklabels(data.feature_names)\nax1.set_yticks(tree_indices)\nax1.set_ylim((0, len(clf.feature_importances_)))\nax2.boxplot(result.importances[perm_sorted_idx].T, vert=False,\n labels=data.feature_names)\nfig.tight_layout()\nplt.show()"
6666
]
6767
},
6868
{
Binary file not shown.

dev/_downloads/34da82a8792cf79d06c7598ae139cc1c/plot_permutation_importance_multicollinear.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@
5555
perm_sorted_idx = result.importances_mean.argsort()
5656

5757
tree_importance_sorted_idx = np.argsort(clf.feature_importances_)
58-
tree_indicies = np.arange(1, len(clf.feature_importances_) + 1)
58+
tree_indices = np.arange(0, len(clf.feature_importances_)) + 0.5
5959

6060
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 8))
61-
ax1.barh(tree_indicies, clf.feature_importances_[tree_importance_sorted_idx])
61+
ax1.barh(tree_indices,
62+
clf.feature_importances_[tree_importance_sorted_idx], height=0.7)
6263
ax1.set_yticklabels(data.feature_names)
63-
ax1.set_yticks(tree_indicies)
64+
ax1.set_yticks(tree_indices)
65+
ax1.set_ylim((0, len(clf.feature_importances_)))
6466
ax2.boxplot(result.importances[perm_sorted_idx].T, vert=False,
6567
labels=data.feature_names)
6668
fig.tight_layout()
Binary file not shown.

dev/_downloads/scikit-learn-docs.pdf

-25.1 KB
Binary file not shown.

dev/_images/iris.png

0 Bytes
-315 Bytes
-315 Bytes
290 Bytes
290 Bytes

0 commit comments

Comments
 (0)