mtk3.googlecode.com</span>

setSeed(1);
[xtrain, ytrain, xtest, ytestNoisefree, ytest, sigma2] = <span class="keyword">...</span>
  polyDataMake(<span class="string">'sampling'</span>, <span class="string">'sparse'</span>, <span class="string">'deg'</span>, 2);
deg = 2;
addOnes = false;
Xtrain = degexpand(xtrain, deg, addOnes);
Xtest  = degexpand(xtest, deg, addOnes);
fs = 14;
</pre><h2>MLE<a name="2"></a></h2><pre class="codeinput">modelMLE = linregFit(Xtrain, ytrain);
[mu, v] = linregPredict(modelMLE, Xte