I one-lined a generalized polynomial regression algorithm using lambdas and broadcast operators the other day, so now I repent.
-
-
-
yhat = @(x,y,k)polyval(fliplr(((x.^[0..k])'*x.^[0..k])\((x.^[0..k])'*y)),x) I'm like 99% sure this is perfectly valid matlab
-
Whoops, colons instead of double dots.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.