How to plot decision boundary for trained pattern recognition neural network in matlab?
10 views (last 30 days)
Show older comments
I have trained patternnet neural networks. I want to visualise the boundaries of this trained neural network. I have a feature set of 5*3000, which is five features and three classes. I am confused about what is the classifier of the patternnet.
0 Comments
Answers (1)
Aditya Srikar
on 27 May 2023
The Patternnet neural network is a type of feedforward artificial neural network. The classifier used in Patternnet is a softmax layer, which is a type of activation function that produces probabilities of the three classes.
To plot the decision boundaries of your trained Patternnet neural network, you can follow these steps:
1. Choose two of the five features in your feature set. These will be the x-axis and y-axis of your plot.
2. Create a grid of points in the two-dimensional feature space, covering all possible values of the two features you selected.
3. Pass each point in the grid through your trained neural network and evaluate which class it belongs to.
4. Plot the points using a scatter plot, with each point colored according to its predicted class.
You can repeat this process with different pairs of features to get a better understanding of the overall boundaries.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!