现有训练集数据,1000 × 7,如下: xxxxxxxxxxxxxxxxxxxx 有测试集数据,100 × 7,如下: xxxxxxxxxxxxxxxxxxxx 以上数据分别是从某系统采集的数据,  训练数据集中,分别是采集的数据和标注结果,其中1、2分别表示该系统有无故障;  测试数据集中,分别是采集的数据和真实结果,其中1、2分别表示该系统有无故障; 现在需要使用训练数据集训练BP神经网络,然后用训练好的神经网络对测试数据集进行测试,并与真实结果进行对比,最终分析出神经网络的性能。 % --- Executes on button press in pushbutton6. function pushbutton6_Callback(hObject, eventdata, handles) % hObject handle to pushbutton6 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global output_test inputn_train outputn_train inputn_test ... outputps BPoutput_test xunlian_num Error input_train output_train %创建网络 %获得gui_set中值 num_yinhan=str2num(get(findobj('tag','edit_yinhan'),'string')); TF=get(findobj('tag','transfer'),'string'); %传递函数 valueTF=get(findobj('tag','transfer'),'value'); TF=TF{valueTF}; BTF=get(findobj('tag','train'),'string'); %训练函数 valueBTF=get(findobj('tag','train'),'value'); BTF=BTF{valueBTF}; BLF=get(findobj('tag','learn'),'string'); %学习函数 valueBLF=get(findobj('tag','learn'),'value'); BLF=BLF{valueBLF}; tic;%启动一个定时器 net=newff(inputn_train,outputn_train,num_yinhan,{TF},BTF,BLF); net.trainParam.epochs=str2num(get(findobj('tag','cishu'),'string')); net.trainParam.goal=str2num(get(findobj('tag','goal'),'string')); net.trainParam.lr=str2num(get(findobj('tag','rate'),'string')); net=train(net,inputn_train,outputn_train); an=sim(net,inputn_test); t=toc;%关闭定时器,获取程序运行时间 %网络输出反归一化
【瑕疵检测】基于Otsu实现织物疵点检测matlab源码含 GUI.md
2022-01-03 13:46:47 7KB 算法 源码
1
function varargout = ganshe(varargin) % GANSHE M-file for ganshe.fig % GANSHE, by itself, creates a new GANSHE or raises the existing % singleton*. % % H = GANSHE returns the handle to a new GANSHE or the handle to % the existing singleton*. % % GANSHE('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in GANSHE.M with the given input arguments. % % GANSHE('Property','Value',...) creates a new GANSHE or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before ganshe_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to ganshe_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help ganshe % Last Modified by GUIDE v2.5 21-Jun-2014 11:31:04 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @ganshe_OpeningFcn, ... 'gui_OutputFcn', @ganshe_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % --- Executes just before ganshe is made visible. function ganshe_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user d
【数学建模】冰山运输系统matlab源码含GUI.md
2021-12-30 17:28:09 9KB 算法 源码
1
【图像融合】基于拉普拉斯金字塔+小波变换+NSCT图像融合matlab源码含GUI
2021-12-29 21:16:22 12KB
1
【图像分割】基于FCM+KFCM MRI图像分割matlab源码含GUI.md
2021-12-28 22:09:13 13KB 算法 源码
1
【路缝识别】基于形态学实现路缝识别matlab源码含GUI.md
2021-12-28 19:41:29 14KB 算法 源码
1
【图像识别】基于BP神经网络的手写字体识别matlab源码含GUI界面.md
2021-12-26 20:08:59 12KB 算法 源码
1
【TSP问题】基于遗传算法求解旅行商问题matlab源码含GUI.zip
2021-12-25 20:15:10 955KB 简介
1
【细胞分割】基分水岭算法实现细胞分割计数matlab源码含 GUI.zip
2021-12-25 09:51:01 643KB 简介
1