search for: r2outputkknn

Displaying 1 result from an estimated 1 matches for "r2outputkknn".

2010 Jul 16
3
Help with Sink Function
...ular"), distance=1)) predictedTrain <- predict(fit.train1, miceTrainSample, miceTrainSample$pID50) pID50Train <- miceTrainSample$pID50 lmTrain <- lm(predictedTrain~pID50Train) slm <- summary(lmTrain) str(slm) if (i == 1) { previousR2 <-slm$r.squared sink(file="R2outputKKNN.txt", append=TRUE) previousR2 sink() } else if(i!=1) { currentR2 <- slm$r.squared if (previousR2 > currentR2) { currentR2 <- previousR2 } if (previousR2 < currentR2) { sink(file="R2outputKKNN.txt", append=TRUE) currentR2 sink()...