forked from LucasSouzaa/tcc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OutputMLPExaustivo.r
36 lines (34 loc) · 1.18 KB
/
OutputMLPExaustivo.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
tabble <- read.table("OutputParcialMLPExaustivo.txt", header = FALSE, sep = "/")
formatData = vector(mode = 'character', length = 10110)
rocValue = matrix(nrow = 10110, ncol = 2)
paramMLP = matrix(nrow = 10110, ncol = 4)
numAtt = matrix(nrow = 10110, ncol = 2)
table <- data.frame(lapply(tabble, as.character), stringsAsFactors=FALSE)
auxiliar = 1
auxiliar2 = 1
auxiliar3 = 1
for(i in 2:10110){
splitVector = strsplit(table[i,1], split = "=")
splitVector2 = strsplit(table[i,1], split = "-")
#print(formatData[auxiliar])
if(splitVector[[1]][1] =="ROC "){
rocValue[auxiliar] = splitVector
formatData[auxiliar] = table[i,1]#paste(formatData[auxiliar], table[i,1])
auxiliar = auxiliar+1
#formatData[auxiliar] = paste(formatData[auxiliar],",")
}
if(lengths(splitVector2) > 2){
paramMLP[auxiliar2] = splitVector2
auxiliar2 = auxiliar2 + 1
}
if(splitVector[[1]][1] == "Numero de atributos "){
print(splitVector)
numAtt[auxiliar3] = splitVector
auxiliar3 = auxiliar3+1
}
}
numericRocValue = vector(mode ='numeric', length = 2520)
for(x in 1:2520){
numericRocValue[x] = as.numeric(rocValue[[x]][2])
}
print(which((numericRocValue == max(numericRocValue) )))