Skip to content

Commit 31f50dc

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 76511995f7804727c6f0494ca05e6e3f4d4f5430
1 parent c756a67 commit 31f50dc

File tree

1,259 files changed

+4455
-4494
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,259 files changed

+4455
-4494
lines changed
Binary file not shown.

dev/_downloads/3d58721191491072eecc520f0a45cdb3/plot_lasso_and_elasticnet.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,20 @@
7474
enet.coef_[enet.coef_ != 0],
7575
markerfmt="x",
7676
label="Elastic net coefficients",
77-
use_line_collection=True,
7877
)
7978
plt.setp([m, s], color="#2ca02c")
8079
m, s, _ = plt.stem(
8180
np.where(lasso.coef_)[0],
8281
lasso.coef_[lasso.coef_ != 0],
8382
markerfmt="x",
8483
label="Lasso coefficients",
85-
use_line_collection=True,
8684
)
8785
plt.setp([m, s], color="#ff7f0e")
8886
plt.stem(
8987
np.where(coef)[0],
9088
coef[coef != 0],
9189
label="true coefficients",
9290
markerfmt="bx",
93-
use_line_collection=True,
9491
)
9592

9693
plt.legend(loc="best")

dev/_downloads/6cd2f23417e24a8a2a445c34f1b57930/plot_lasso_and_elasticnet.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
},
8888
"outputs": [],
8989
"source": [
90-
"m, s, _ = plt.stem(\n np.where(enet.coef_)[0],\n enet.coef_[enet.coef_ != 0],\n markerfmt=\"x\",\n label=\"Elastic net coefficients\",\n use_line_collection=True,\n)\nplt.setp([m, s], color=\"#2ca02c\")\nm, s, _ = plt.stem(\n np.where(lasso.coef_)[0],\n lasso.coef_[lasso.coef_ != 0],\n markerfmt=\"x\",\n label=\"Lasso coefficients\",\n use_line_collection=True,\n)\nplt.setp([m, s], color=\"#ff7f0e\")\nplt.stem(\n np.where(coef)[0],\n coef[coef != 0],\n label=\"true coefficients\",\n markerfmt=\"bx\",\n use_line_collection=True,\n)\n\nplt.legend(loc=\"best\")\nplt.title(\n \"Lasso $R^2$: %.3f, Elastic Net $R^2$: %.3f\" % (r2_score_lasso, r2_score_enet)\n)\nplt.show()"
90+
"m, s, _ = plt.stem(\n np.where(enet.coef_)[0],\n enet.coef_[enet.coef_ != 0],\n markerfmt=\"x\",\n label=\"Elastic net coefficients\",\n)\nplt.setp([m, s], color=\"#2ca02c\")\nm, s, _ = plt.stem(\n np.where(lasso.coef_)[0],\n lasso.coef_[lasso.coef_ != 0],\n markerfmt=\"x\",\n label=\"Lasso coefficients\",\n)\nplt.setp([m, s], color=\"#ff7f0e\")\nplt.stem(\n np.where(coef)[0],\n coef[coef != 0],\n label=\"true coefficients\",\n markerfmt=\"bx\",\n)\n\nplt.legend(loc=\"best\")\nplt.title(\n \"Lasso $R^2$: %.3f, Elastic Net $R^2$: %.3f\" % (r2_score_lasso, r2_score_enet)\n)\nplt.show()"
9191
]
9292
}
9393
],

0 commit comments

Comments
 (0)