'R neuralnet multi output nodes based on a value

I am attempting to have 2 output nodes in a network that take the quality of a wine (1-10) scale and separate them between high and low quality which is then output to the network.

I have been trying all different types of combination of converting values but at the end of the day I am stuck and lost as to how to progress.

input1 <- input
input1$qual <- ifelse(input$quality >= 5, "High", "Low")

input1$qual

input1qual <- as.numeric
indexes=createDataPartition(input1$qual, p=.80, list = F)
indexes

train = input[indexes, ]
test = input[-indexes, ] 

nnet=neuralnet(input1$qual~., train, hidden = 4, linear.output = FALSE)


plot(nnet) 

I dont know if I even need to convert them to a string or if I can do it easier and just compare them in the NN - it seems counter productive to convert them from a INT to a string then back to an INT for the network to look at.

r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source