In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article Xiaobian for you to introduce in detail "matlab how to achieve neural network classification", the content is detailed, the steps are clear, the details are handled properly, I hope that this "matlab how to achieve neural network classification" article can help you solve your doubts, following the editor's ideas slowly in-depth, together to learn new knowledge.
% clear environment variables
Clear
Clc
%% training set / test set generation
% Import data
Load water_data.mat
% data normalization
Attributes = mapminmax (attributes)
% training set-35 samples
P_train = attributes (:, 1:35)
T_train = classes (:, 1:35)
% Test set-4 samples
P_test = attributes (:, 36:end)
T_test = classes (:, 36:end)
%% competitive neural network creation, training and simulation testing
% create a network
Net = competlayer (4)
% set training parameters
Net.trainParam.epochs = 500,
% training network
Net = train (net,P_train)
% Simulation Test
% training set
T_sim_compet_1 = sim (net,P_train)
T_sim_compet_1 = vec2ind (t_sim_compet_1)
% Test set
T_sim_compet_2 = sim (net,P_test)
T_sim_compet_2 = vec2ind (t_sim_compet_2)
%% SOFM neural network creation, training and simulation testing
% create a network
Net = selforgmap ([4 4])
% set training parameters
Net.trainParam.epochs = 200
% training network
Net = train (net,P_train)
% Simulation Test
% training set
T_sim_sofm_1 = sim (net,P_train)
T_sim_sofm_1 = vec2ind (t_sim_sofm_1)
% Test set
T_sim_sofm_2 = sim (net,P_test)
T_sim_sofm_2 = vec2ind (t_sim_sofm_2)
%% distribution of network neurons
View Network Topology structure
Figure
Plotsomtop (net)
% to view the direct distance of neighboring neurons
Figure
Plotsomnd (net)
% View the classification of each neuron
Figure
Plotsomhits (net,P_train)
%% result comparison
% competitive neural network
Result_compet_1 = [Troubles' Tubes simplex TV1']
Result_compet_2 = [Thumtest`This simplex examples are tantalized 2']
% SOFM neural network
Result_sofm_1 = [Troubles' Tubes simplex softplaces 1']
Result_sofm_2 = [Tempest 'Tunable simplex softfloor 2']
After reading this, the article "how to classify neural networks in matlab" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.