[regression] text and example for cost function figure
This commit is contained in:
9
regression/code/plotcubiccosts.m
Normal file
9
regression/code/plotcubiccosts.m
Normal 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')
|
||||
Reference in New Issue
Block a user