Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

MLP neural network in R

$
0
0

I'm trying to write a code in R to predict the currency rate of USD/EUR using MLP neural Network I facing a problem with the input of the function neuralnet it keeps giving me an error of

Error in terms.formula(formula, data = data) : 
  invalid model formula in ExtractVars  

This is the code that i have written so far

library(readxl)
ExchangeUSD <- read_excel("C:/Users/GTS/Desktop/ML project/ExchangeUSD.xlsx")
plot(ExchangeUSD$`USD/EUR`)

#traning and test data 
trainset <- ExchangeUSD[1:350,]
testset <- ExchangeUSD[351:500,] 

set.seed(12345)
library(neuralnet)
nn <- neuralnet(`USD/EUR`~ "YYYY/MM/DD"+"Wdy",data = trainset)

the data-set contains 500 rows and 3 columns the first column is YYYY/MM/DD and it contains the date from October 2011 until October 2013 (500 data). the second column is Wdy and it contain the weakly days the final column is the USD/EUR and contains the currency rate a part of the data set


Viewing all articles
Browse latest Browse all 201894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>