如何在RSNNS中每50个周期后进行预测

时间:2015-12-31 11:04:41

标签: r modeling

我是RSNNS制作模型。我正在使用QuickProp算法。这是我的神经网络:

mydata1 <- read.csv("-1-5_rand1.csv");
mydata <- mydata1[1:151, ]
test_set <- mydata1[152:168, ]
test_set1 <- test_set[c(-7)]
a <- SnnsRObjectFactory()
input <- mydata[c(-7)]
output <- mydata[c(7)]
b <- splitForTrainingAndTest(input, output, ratio = 0.22)
a <- mlp(b$inputsTrain, b$targetsTrain, size = 9, maxit = 650, learnFunc = "Quickprop", learnFuncParams = c(0.01, 2.5, 0.0001, 0, 0), updateFunc = "Topological_Order",
     updateFuncParams = c(0.0), hiddenActFunc = "Act_TanH", computeError=TRUE, initFunc = "Randomize_Weights", initFuncParams = c(-1,1),
     shufflePatterns = TRUE, linOut = FALSE, inputsTest = b$inputsTest, targetsTest = b$targetsTest)

我预测使用测试集:

predictions <- predict(a, test_set1)

是否有可能在RSNNS中使用测试集后每50个周期预测一次,而不是在650个周期后进行预测?

1 个答案:

答案 0 :(得分:3)

答案是您无法使用高级接口,但使用低级接口,您可以查看,例如,在RSNNS中包含的mlp_irisSnnsR.R演示