一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【带钢厚度预测】基于matlab GUI SVM带钢厚度预测【含Matlab源码 173期】

获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。

备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);

二、SVM简介

机器学习的一般框架:
训练集 => 提取特征向量 => 结合一定的算法(分类器:比如决策树、KNN)=>得到结果
1 SVM定义
支持向量机(support vector machines,SVM)是一种二分类模型,它将实例的特征向量映射为空间中的一些点,SVM 的目的就是想要画出一条线,以 “最好地” 区分这两类点,以至如果以后有了新的点,这条线也能做出很好的分类。SVM 适合中小型数据样本、非线性、高维的分类问题。

SVM 最早是由 Vladimir N. Vapnik 和 Alexey Ya. Chervonenkis 在1963年提出,目前的版本(soft margin)是由 Corinna Cortes 和 Vapnik 在1993年提出,并在1995年发表。深度学习(2012)出现之前,SVM 被认为机器学习中近十几年来最成功,表现最好的算法。

2 SVM 基本概念
将实例的特征向量(以二维为例)映射为空间中的一些点,如下图的实心点和空心点,它们属于不同的两类。SVM 的目的就是想要画出一条线,以“最好地”区分这两类点,以至如果以后有了新的点,这条线也能做出很好的分类。

Q1:能够画出多少条线对样本点进行区分?
答:线是有无数条可以画的,区别就在于效果好不好,每条线都可以叫做一个划分超平面。比如上面的绿线就不好,蓝线还凑合,红线看起来就比较好。我们所希望找到的这条效果最好的线就是具有 “最大间隔的划分超平面”。

Q2:为什么要叫作“超平面”呢?
答:因为样本的特征很可能是高维的,此时样本空间的划分就不是一条线了。

Q3:画线的标准是什么?/ 什么才叫这条线的效果好?/ 哪里好?
答:SVM 将会寻找可以区分两个类别并且能使间隔(margin)最大的划分超平面。比较好的划分超平面,样本局部扰动时对它的影响最小、产生的分类结果最鲁棒、对未见示例的泛化能力最强。

Q4:间隔(margin)是什么?
答:对于任意一个超平面,其两侧数据点都距离它有一个最小距离(垂直距离),这两个最小距离的和就是间隔。比如下图中两条虚线构成的带状区域就是 margin,虚线是由距离中央实线最近的两个点所确定出来的(也就是由支持向量决定)。但此时 margin 比较小,如果用第二种方式画,margin 明显变大也更接近我们的目标。


Q5:为什么要让 margin 尽量大?
答:因为大 margin 犯错的几率比较小,也就是更鲁棒啦。

Q6:支持向量是什么?
答:从上图可以看出,虚线上的点到划分超平面的距离都是一样的,实际上只有这几个点共同确定了超平面的位置,因此被称作 “支持向量(support vectors)”,“支持向量机” 也是由此来的。

三、部分源代码

function varargout = main(varargin)
% MAIN MATLAB code for main.fig
%      MAIN, by itself, creates a new MAIN or raises the existing
%      singleton*.
%
%      H = MAIN returns the handle to a new MAIN or the handle to
%      the existing singleton*.
%
%      MAIN('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in MAIN.M with the given input arguments.
%
%      MAIN('Property','Value',...) creates a new MAIN or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before main_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to main_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 main% Last Modified by GUIDE v2.5 24-Apr-2020 08:53:33% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...'gui_Singleton',  gui_Singleton, ...'gui_OpeningFcn', @main_OpeningFcn, ...'gui_OutputFcn',  @main_OutputFcn, ...'gui_LayoutFcn',  [] , ...'gui_Callback',   []);
if nargin && ischar(varargin{1})gui_State.gui_Callback = str2func(varargin{1});
endif nargout[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
elsegui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT% --- Executes just before main is made visible.
function main_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 data (see GUIDATA)
% varargin   command line arguments to main (see VARARGIN)% Choose default command line output for main
handles.output = hObject;% Update handles structure
guidata(hObject, handles);% UIWAIT makes main wait for user response (see UIRESUME)
% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.
function varargout = main_OutputFcn(hObject, eventdata, handles)
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Get default command line output from handles structure
varargout{1} = handles.output;% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)DataGui% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
TrainNet% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% --- If Enable == 'on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over pushbutton1.
function pushbutton1_ButtonDownFcn(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
Predictfunction edit1_Callback(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');
endfunction edit2_Callback(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit2 as text
%        str2double(get(hObject,'String')) returns contents of edit2 as a double
set( handles.edit2,'FontName','Symbol');% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');
end% --- Executes on key press with focus on edit2 and none of its controls.
function edit2_KeyPressFcn(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL)
%   Key: name of the key that was pressed, in lower case
%   Character: character interpretation of the key(s) that was pressed
%   Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed
% handles    structure with handles and user data (see GUIDATA)% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% --- Executes on button press in pushbutton13.
function pushbutton13_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton13 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
load userData
temp1=get(handles.edit1,'String');
temp2=get(handles.edit2,'String');
biaoji=0;
for i=1:length(userData.username)if strcmp(userData.username{i},temp1)if strcmp(userData.password{i},temp2)biaoji=1;endend
end
if biaoji==1set(handles.text6,'String','登陆成功');set(handles.pushbutton15,'Enable','on');set(handles.pushbutton16,'Enable','on');
elseset(handles.text6,'String','登陆失败');
end% --- Executes on button press in pushbutton14.
function pushbutton14_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton14 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)set(handles.pushbutton15,'Enable','off');set(handles.pushbutton16,'Enable','off');set(handles.text6,'String','注销成功');% --- Executes on button press in pushbutton15.
function pushbutton15_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton15 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
main('Visible','off');
data_gui1('Visible','on');% --- Executes on button press in pushbutton16.
function pushbutton16_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton16 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
XuiGaiMiMa% --- Executes on button press in pushbutton17.
function pushbutton17_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton17 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
Zhuce

四、运行结果






五、matlab版本及参考文献

1 matlab版本
2019版

2 参考文献
[1] 包子阳,余继周,杨杉.智能优化算法及其MATLAB实例(第2版)[M].电子工业出版社,2016.
[2]张岩,吴水根.MATLAB优化算法源代码[M].清华大学出版社,2017.
[3]周品.MATLAB 神经网络设计与应用[M].清华大学出版社,2013.
[4]陈明.MATLAB神经网络原理与实例精解[M].清华大学出版社,2013.
[5]方清城.MATLAB R2016a神经网络设计与应用28个案例分析[M].清华大学出版社,2018.

【带钢厚度预测】基于matlab GUI SVM带钢厚度预测【含Matlab源码 173期】相关推荐

  1. 【运动学】基于matlab GUI三体运动模拟【含Matlab源码 871期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[运动学]基于matlab GUI三体运动模拟[含Matlab源码 871期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: ...

  2. 【音乐播放】基于matlab GUI动感音乐播放【含Matlab源码 778期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[音乐播放]基于matlab GUI动感音乐播放[含Matlab源码 778期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: ...

  3. 【雷达通信】基于matlab GUI相控阵雷达方向图【含Matlab源码 1048期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[雷达通信]基于matlab GUI相控阵雷达方向图[含Matlab源码 1048期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方 ...

  4. 【数据分析】基于matlab GUI齿轮箱振动数据分析【含Matlab源码 2122期】

    一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[数据分析]基于matlab GUI齿轮箱振动数据分析[含Matlab源码 2122期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方 ...

  5. 【光学】基于matlab GUI维达尔之眼计算【含Matlab源码 2545期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI维达尔之眼计算[含Matlab源码 2545期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: ...

  6. 【光学】基于matlab GUI双孔干涉【含Matlab源码 2119期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI双孔干涉[含Matlab源码 2119期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: 付费 ...

  7. 【光学】基于matlab GUI双缝干涉和牛顿环【含Matlab源码 2165期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI双缝干涉和牛顿环[含Matlab源码 2165期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2 ...

  8. 【数字信号】基于matlab GUI电话按键识别【含Matlab源码 2382期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[数字信号]基于matlab GUI电话按键识别[含Matlab源码 2382期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2 ...

  9. Matlab GUI/APP 浅谈(附计算器源码)

    Matlab GUI/APP 浅谈(附计算器源码) 今天没有什么段子,也没有心灵鸡汤.毒鸡汤啥的,纯粹聊一聊这些年从有关MATLAB GUI/APP开发中悟出的一点道理,顺便把计算器的源代码给大家. ...

  10. 【课程设计】基于java GUI实现学生个人信息管理系统(源码+论文+ppt+视频)

    源码资料 免费下载 不经常在线,需要源码和资料的留言私信我,主页有联系方式 技术架构 开发语言 主要用的是Java语言中的GUI(图形用户界面)和AWT(抽象窗口工具包)编程. (1) GUI 图形用 ...

最新文章

  1. SQL 将一列数据转为一行字符串[转]
  2. MySQL安装时MySQL server一直安装失败日志显示This application requires Visual Studio 2013 Redistributable...
  3. linux unset path,linux查看和修改PATH环境变量的方法
  4. 【ARM】ARM汇编程序设计(五) str和ldr
  5. Django(part23)--Django shell的使用
  6. 最速下降法和牛顿方法的Python实现和MATLAB实现
  7. mysql的事务与锁机制
  8. 【Flink】Flink 1.11深度解析 【视频笔记】
  9. 【100题】第三十二 数组、规划
  10. php递归源码,PHP递归算法的实例程序
  11. wkt文件java解析_WKT文件解析 以及各个投影坐标的wkt参数查询 | 学步园
  12. cad插入块_CAD制图软件中如何快速绘制推拉窗平面简图
  13. r52500u学计算机,AMD锐龙R5 2500U性能评测 性能提升幅度让Intel八代酷睿汗颜
  14. 填写个人资料的HTML文件,vsco注册填写个人资料名称无效怎么办?vsco怎么注册账号?...
  15. 盘点 Java 线程池配置的常见误区
  16. C语言:L1-078 吉老师的回归 (15 分)
  17. windows10系统怎么管理 右键-新建菜单
  18. 东南亚跨境电商平台Lazada、Shopee、速卖通转化率低怎么办?(测评自养号)
  19. 笔记本拆c面_继续拆解 C面下方还藏有玄机_神舟 战神GX8 PRO_笔记本评测-中关村在线...
  20. Java——博主的学习路线

热门文章

  1. Struts2之命名空间与Action的三种创建方式
  2. VS2010 安装包打包(转)
  3. Poj 1166 The Clocks(bfs)
  4. Android实现局部图片滑动指引效果
  5. POJ 1005 I Think I Need a Houseboat
  6. python aiohttp百万并发
  7. 20191225每日一句
  8. AR标记时虚实融合投影仪和相机的手动标定
  9. Atitit enhance dev effect提升开发效率的十大原理与方法v3 u66.docx Atitit enhance dev effect提升开发效率的十大原理与方法v2 u66.do
  10. Atiit 常见功能 常用功能与模块的最快速解决方案