System.out.println("Setting smoothing parameter...");
NNBandwidth BW = (NNBandwidth)lpreg.getBandwidthMethod();
FixedSmoothMethod SM = (FixedSmoothMethod)BW.getSmoothMethod();
DblMatrix sp = this.getParam("smoothing_param");
if (DblMatrix.test(sp.lt(0.01))) //Can't let window get so small that the number of data points is less than the model df+1+number of derivatives you want to estimate.
{
return(DblMatrix.INF);
}
SM.setSmoothParameter(sp.getDoubleAt(0)); //The proportion of N that gives K in the NN method.