This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hyper_params <- list( | |
activation=c("Rectifier","Tanh","Maxout","RectifierWithDropout","TanhWithDropout","MaxoutWithDropout"), | |
hidden=list(c(200,200),c(500,500),c(500,500,500)), | |
input_dropout_ratio=c(0,0.05,0.1,0.2), | |
l1=seq(0,1e-4,1e-6), | |
l2=seq(0,1e-4,1e-6) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model.class<-multinom(IR~ .,data = Ist.class.2) | |
Call: | |
multinom(formula = IR ~ ., data = Ist.class.2) | |
Coefficients: | |
(Intercept) unem.rate BankLoan RealExport Personal.Consumption.Expenditures RGDP Total.Vehicle.Sales U.S.Dollar.Index | |
0 -2.452802 0.5361296 -0.1061213 0.04649329 -0.2893107 0.1903935 0.3060163 -0.05124506 | |
1 -6.171310 0.2994286 1.0046571 0.24750510 0.2660045 0.1271559 0.3456129 -0.02169250 | |
Std. Errors: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
randomForest(formula = IR ~ ., data = Ist.month.class.mc, importance = TRUE, subset = train.mc) | |
Type of random forest: classification | |
Number of trees: 500 | |
No. of variables tried at each split: 2 | |
OOB estimate of error rate: 26.25% | |
Confusion matrix: | |
-1 0 1 class.error | |
-1 21 54 1 0.7236842 | |
0 17 362 25 0.1039604 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###try to predict the outliers | |
abm<-Ist[c(373,622,667,706,709),-c(1,4)] | |
abm.pre<-predict(model.season_final.re,abm) | |
data.frame(Date=Ist$Date[c(373,622,667,706,709)],Prediction=abm.pre, Real=Ist$Interest.Rate[c(373,622,667,706,709)]) | |
Date Prediction Real | |
373 1981-01-01 7.250878 13.00 | |
622 2001-10-01 -2.935886 2.02 | |
667 2005-07-01 -1.307811 4.25 | |
706 2008-10-01 11.563449 1.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x<-Ist[c(373,622,667,706),] | |
ir.pre<-predict(model.season_final,x,type = "response") | |
data.frame(Date=Ist$Date[c(373,622,667,706)],Prediction=ir.pre,Real=Ist$Interest.Rate[c(373,622,667,706)]) | |
Date Prediction Real | |
373 1981-01-01 7.133682 13.00 | |
622 2001-10-01 -1.161944 2.02 | |
667 2005-07-01 -0.635116 4.25 | |
706 2008-10-01 8.995944 1.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####Remove the large outlier and leverage points:373,445,622,667,706,709 | |
Residuals: | |
Min 1Q Median 3Q Max | |
-4.2856 -0.8929 0.0166 0.8256 4.5421 | |
Coefficients: | |
Estimate Std. Error t value Pr(>|t|) | |
(Intercept) 17.078169 2.274732 7.508 5.09e-12 *** | |
unem.rate -1.165918 0.127226 -9.164 3.70e-16 *** | |
BankLoan 1.354565 0.150751 8.985 1.06e-15 *** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Call: | |
lm(formula = Interest.Rate ~ . - Date, data = Ist.complete_final) | |
Residuals: | |
Min 1Q Median 3Q Max | |
-7.7459 -0.9721 -0.1388 0.9188 5.8663 | |
Coefficients: | |
Estimate Std. Error t value Pr(>|t|) | |
(Intercept) 13.09168 2.50591 5.224 5.56e-07 *** |