Homework 6 Flashcards
(8 cards)
1
Q
coeffs=polyfit (x, y, c)
(c - exponents)
A
gives you m and b at the c exponent
2
Q
absolute error
A
abs(y-yfit)
[max_error,max_loc]=max(abs_err)
3
Q
SSE
A
sum((y-yfit).^2)
4
Q
SST
A
sum((y-mean(y)).^2)
5
Q
rSquared
A
1(SSE/SST)
6
Q
polyval(ybestfit,x)
A
returns the value of ybestfit at x
7
Q
ybestfit(linear) =
A
coeffs(1)x + coeffs(2)
8
Q
ybestfit(polynomial) =
A
coeffs=polyfit(x,y,order)
xnew=linspace(min(x),max(x),300)
= polyval (coeffs,xnew)