MAKE A MEME View Large Image NadarayaWatsonCrossvalidation.png en Resubstitution and LOO crossvalidation for bandwidth selection of the Nadaraya-Watson estimator own Sigbert 2010-06-27 The R program to create the PNG file library np library mlbench data BostonHousing s ...
View Original:NadarayaWatsonCrossvalidation.png (480x480)
Download: Original    Medium    Small Thumb
Courtesy of:commons.wikimedia.org More Like This
Keywords: NadarayaWatsonCrossvalidation.png en Resubstitution and LOO crossvalidation for bandwidth selection of the Nadaraya-Watson estimator own Sigbert 2010-06-27 The R program to create the PNG file library np library mlbench data BostonHousing s <- sort BostonHousing 13 index return T x <- BostonHousings ix 13 y <- BostonHousings ix 14 h <- 4 30 /20 mse <- ase <- 0 h for i in 1 length x for j in 1 length h nwi <- npreg y-i~x-i bws hj exdat xi asej <- asej + fitted nwi -yi 2 for j in 1 length h nwi <- npreg y~x bws hj msej <- msej + sum fitted nwi -y 2 ase <- ase / length x mse <- mse / length x png CV png plot h ase t l xlab Bandweite h ylab Mittlerer Quadratischer Fehler main Boston Housing Daten lwd 2 ylim c 23 30 col blue lines h mse col red lwd 2 legend bottomright legend c Leave-one-out Kreuzvalidierung Resubstitutions Schätzung col c blue red lwd 2 lty 1 abline v 0 7 dev off Created with R Statistics
Terms of Use   Search of the Day