MATLAB: Neural network training – 2 input parameter to 1 output result training

multiple input parameterneural network

im stuck at training net with 2 parameter.
right now im trying to clasify test data. by using example "Classify Text Data Using Deep Learning".
for that example if i want to have "description" and "category" as training input and "resolution" as target output.
which part of code in the example that i have to change.
i need help

Best Answer

Hi Ridza,
I understand that you want to train the LSTM network using description and category values instead of just description. As the preprocessText function, tokenization of input data is taking place. One simple way of training the network on both these values is to just prepend category data and continue with the procedure in the same way.
Note that you will have to change the target length of your training data by visualizing the histogram of the document length.
sequenceLength = %new Sequence Length;
XTrain = doc2sequence(enc,documentsTrain,'Length',sequenceLength);
Attaching code snippet for better explanation.
documentsTrain = preprocessText(dataTrain.Description + " " + dataTrain.Category);
documentsValidation = preprocessText(dataValidation.Description + " " + dataValidation.Category);
YTrain = categorical(dataTrain.Resolution);
YValidation = categorical(dataValidation.Resolution);
Refer this example for details -
Hope this helps.