Skip to content

Commit 7094aed

Browse files
authored
improve plots (#225)
1 parent 72ecab2 commit 7094aed

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

docs/src/examples/autotuning-ridge.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,14 @@ end
9191

9292
Plots.plot(
9393
αs, mse_test ./ sum(mse_test),
94-
label="MSE test", xaxis = "α", yaxis="MSE", legend=(0.8, 0.2)
94+
label="MSE test", xaxis = "α", yaxis="MSE", legend=(0.8, 0.2),
95+
width=3,
9596
)
9697
Plots.plot!(
9798
αs, mse_train ./ sum(mse_train),
98-
label="MSE train"
99+
label="MSE train",
100+
linestyle=:dash,
101+
width=3,
99102
)
100103
Plots.title!("Normalized MSE on training and testing sets")
101104

@@ -169,9 +172,15 @@ iters = 1:length(ᾱ);
169172

170173
Plots.plot(
171174
αs, mse_test,
172-
label="MSE test", xaxis = ("α"), legend=:topleft
175+
label="MSE test", xaxis = ("α"),
176+
legend=:topleft,
177+
width=2,
178+
)
179+
Plots.plot!(
180+
ᾱ, msē,
181+
label="learned α", width = 5,
182+
style=:dot,
173183
)
174-
Plots.plot!(ᾱ, msē, label="learned α", lw = 2)
175184
Plots.title!("Regularizer learning")
176185

177186
# Visualize the convergence of α to its optimal value

0 commit comments

Comments
 (0)