How to get target data for neural networking toolbox?

I am a student and new to the Neural Networking Toolbox on Matlab. I am building a road monitoring system which distinguishes between different road conditions, being speed bumps, potholes, roughness and good road. I have collected 3D accelerometer data (x,y,z) using my smartphone by driving over speedbumps, into potholes, on rough roads and good roads. I have calculated features, min, max ,mean, median, variance, skewness and kurtosis on each axis of the data. I now need to train a neural network to predict the given road condition but I am having some confusion with my input and target target. I think my input data would be the features calculated for each road condition but how do I get my target data? I know that the target that must consist of 1s and 0s to give the correct output. Can anyone give some advice?

 Akzeptierte Antwort

Greg Heath
Greg Heath am 24 Feb. 2016
Use class indices 1:4 for the classes
speedbumps, potholes, roughness and goodroad.
Then use the ind2vec function to obtain your target matrix
target = ind2vec([ 4 1 3 2 2 1 3 4 ])
Then get the estimated classindices from new data
output = net(newinput);
estimatedclassindices = vec2in(output)
help patternnet
doc patternnet
Hope this helps.
Thank you for formally accepting my answer
Greg

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by