[regression] text and example for cost function figure

This commit is contained in:
2020-12-18 13:10:53 +01:00
parent 99a8a9d91e
commit fefe1c3726
2 changed files with 34 additions and 24 deletions

View File

@@ -0,0 +1,9 @@
cs = 2.0:0.1:8.0;
mses = zeros(length(cs));
for i = 1:length(cs)
mses(i) = meanSquaredErrorCubic(x, y, cs(i));
end
plot(cs, mses)
xlabel('c')
ylabel('mean squared error')