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

Non-conformable arrays in neural network - neuralnet package

$
0
0

I am trying to create a neural network using this code:

countries=read.table('countries.txt',header =TRUE,sep='\t',quote="",dec=",")
#install.packages("neuralnet")
library(neuralnet)

trainset<-countries[1:85,]
testset<-countries[86:118,]

retea<-neuralnet(Tari.europene~Enrolement_P+Enrolement_S, trainset, 
                 hidden=4, lifesign="minimal", linear.output=FALSE, threshold=0.1)

and I get this error:

hidden: 4 thresh: 0.1 rep: 1/1 steps: Error in x - y : non-conformable arrays

I don't have Nan values and the columns have the same shape.


This is my data frame. Tari.europene means if the country is from Europe or not (1= European country; 0=non-European country.) The P and S from Repeaters, Enrolement and Teachers means primary and secondary cycles from system education.

enter image description here


Viewing all articles
Browse latest Browse all 201839

Trending Articles



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