ну, я должен сделать это для нейронной сети с помощью метода нейронной сети, но у меня есть проблема, потому что у меня есть ошибка, мне нужно знать, как ее решить, спасибо
library("readr")
library ("neuralnet")
#
datos <- read.csv("file:///D:/Students_Academic_Performance.csv")
summary(datos) #Resumen de datos
gender NationalITy PlaceofBirth StageID GradeID SectionID Topic Semester Relation raisedhands
F:175 KW :179 KuwaIT :180 HighSchool : 33 G-02 :147 A:283 IT : 95 F:245 Father:283 Min. : 0.00
M:305 Jordan :172 Jordan :176 lowerlevel :199 G-08 :116 B:167 French : 65 S:235 Mum :197 1st Qu.: 15.75
Palestine: 28 Iraq : 22 MiddleSchool:248 G-07 :101 C: 30 Arabic : 59 Median : 50.00
Iraq : 22 lebanon : 19 G-04 : 48 Science: 51 Mean : 46.77
lebanon : 17 SaudiArabia: 16 G-06 : 32 English: 45 3rd Qu.: 75.00
Tunis : 12 USA : 16 G-11 : 13 Biology: 30 Max. :100.00
(Other) : 50 (Other) : 51 (Other): 23 (Other):135
VisITedResources AnnouncementsView Discussion ParentAnsweringSurvey ParentschoolSatisfaction StudentAbsenceDays Class
Min. : 0.0 Min. : 0.00 Min. : 1.00 No :210 Bad :188 Above-7:191 H:142
1st Qu.:20.0 1st Qu.:14.00 1st Qu.:20.00 Yes:270 Good:292 Under-7:289 L:127
Median :65.0 Median :33.00 Median :39.00 M:211
Mean :54.8 Mean :37.92 Mean :43.28
3rd Qu.:84.0 3rd Qu.:58.00 3rd Qu.:70.00
Max. :99.0 Max. :98.00 Max. :99.00
n <- sample(1:480,144) #30% of datos
Train <- datos[-n,]
)Test <- datos[n,]
frml <- H + L + M ~ gender + NationalITy + PlaceofBirth + StageID + GradeID + SectionID + Topic + Semester + Relation + raisedhands + VisITedResources +
AnnouncementsView + Discussion + ParentAnsweringSurvey + ParentschoolSatisfaction + StudentAbsenceDays
modelo.net_1 <- neuralnet(frml,
data = Train,
algorithm = "rprop+",
threshold = 0.5,
hidden = 0,
rep = 10,
lifesign.step= 1000
)
Ошибка в нейронах [[length.weights]]% *% весов [[length.weights]]:
требуется числовая / сложная матрица / векторные аргументы