From 826d899449d60b8f5aa909115c38b6040bcd1a41 Mon Sep 17 00:00:00 2001 From: Ugo Lancia Date: Thu, 25 Feb 2016 15:48:31 +0100 Subject: [PATCH] Update quiz_4.R --- quiz_4.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quiz_4.R b/quiz_4.R index f7d84bd..fa972fa 100644 --- a/quiz_4.R +++ b/quiz_4.R @@ -146,9 +146,10 @@ pred = predict(model, testing) RMSE = sqrt(sum((pred - testing$CompressiveStrength)^2)) predins = predict(model, training) -RMSEins = sqrt(sum((predins - training$CompressiveStrength)^2)) +RMSEins = sqrt(sum((predins - training$CompressiveStrength)^2)/length(predins)) +#this results will be close to the 2016 options, that are a little different I think because of the different packages versions # RMSE = 107.4401, this does not match any of the options... # It did however match the value of 11543.39 which is the MSE not the RMSE - \ No newline at end of file +