HORA1
The inputs variables includs the MONTH,DAY,WEEKDAY,HORA.x SEASON, O3.MAXY1(miximum ozone level one day before),and O3N(ozone level) ,NOx,NO2,RH,TMP,WDR,WSP.CO and SO2 at one oclock in the morining.
load("~/prepareData/H 1 .RData")
source("~/function//NormalizeAndTrainingFunction.r")
Target <- H[, "O3"]
Inputs <- H[, c("MONTH", "DAY", "WEEKDAY", "HORA.x", "SEASON", "O3MAXY1", "O3N",
"NOx", "NO2", "RH", "TMP", "WDR", "WSP", "CO", "SO2")]
library(RSNNS)
# Prepare database for training
PreData("H1", Inputs, Target)
load("H1 TrainingAndTesting.RData")
# Training model
Training(inputsTrain, targetsTrain, inputsTest, targetsTest)
load("lmFit.RData")
load("svmFit.RData")
load("rfFit.RData")
load("nnetFit.RData")
models <- list(lmFit, svmFit, rfFit, nnetFit)
preValues <- extractPrediction(models, testX = inputsTest, testY = targetsTest)
plotObsVsPred(preValues)
load("Error.RData")
Error
## svmE lmE rfE nnetE
## MAE 0.07929 0.07447 0.07902 0.08104
## RMSE 0.10093 0.09712 0.09840 0.10491
## RELE 0.50265 0.50196 0.51743 0.53836
summary(lmFit)
##
## Call:
## lm(formula = modFormula, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.4310 -0.0925 -0.0157 0.0856 0.6388
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.089573 0.039772 -2.25 0.024 *
## V1 -0.084880 0.047812 -1.78 0.076 .
## V2 -0.009594 0.012268 -0.78 0.434
## V3 -0.054331 0.010745 -5.06 4.7e-07 ***
## V4 0.496716 0.049965 9.94 < 2e-16 ***
## V5 0.087561 0.041123 2.13 0.033 *
## V6 0.529774 0.025746 20.58 < 2e-16 ***
## V7 0.166422 0.027072 6.15 9.7e-10 ***
## V8 -0.000729 0.071520 -0.01 0.992
## V9 0.077294 0.039744 1.94 0.052 .
## V10 -0.028197 0.018538 -1.52 0.128
## V11 0.018575 0.025506 0.73 0.467
## V12 -0.011332 0.014118 -0.80 0.422
## V13 -0.072789 0.033834 -2.15 0.032 *
## V14 0.223630 0.037300 6.00 2.4e-09 ***
## V15 0.020166 0.027698 0.73 0.467
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.148 on 1786 degrees of freedom
## Multiple R-squared: 0.369, Adjusted R-squared: 0.364
## F-statistic: 69.6 on 15 and 1786 DF, p-value: <2e-16