Lpreg lpreg = new Lpreg(pHi,LOF);
System.out.println("Finished instantiating Lpreg");
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.
System.out.println("Finished setting smoothing parameter...");
System.out.println("Lpreg prediction...");
//DblMatrix LOFhat = lpreg.predict(pHi); //These should be iid Normal