⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classifier.m

📁 Duda的《模式分类》第二版的配套的Matlab源代码
💻 M
📖 第 1 页 / 共 2 页
字号:
	'Tag','Redraws');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 35.25 25 1.5], ...
	'String','Number of redraws: ', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 33.25 35 1.5], ...
	'String','Precentage of training vectors: ', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','                           ', ...
	'ListboxTop',0, ...
	'Position',[44 33.25 8 1.5], ...
	'String','20', ...
	'Style','edit', ...
	'Tag','PercentTraining');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 31.25 35 1.5], ...
	'String','Preprocessing: ', ...
	'Style','text', ...
	'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''Changed Preprocessing'')', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[20 31.25 30 1.5], ...
	'String',mat3, ...
	'Style','popupmenu', ...
	'Tag','Preprocessing', ...
	'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[1 1 1], ...
	'ListboxTop',0, ...
	'Position',[41 29.25 11 1.5], ...
	'Style','edit', ...
	'Tag','txtPreprocessingParameters', ...
	'Visible','off');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 29.25 35 1.5], ...
	'Style','text', ...
	'Tag','lblPreprocessingParameters');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 27.25 35 1.5], ...
	'String','Algorithm: ', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''Changed Algorithm'')', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[20 27.25 32 1.5], ...
	'String',mat4, ...
	'Style','popupmenu', ...
	'Tag','Algorithm', ...
	'Value',5);
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[1 1 1], ...
	'ListboxTop',0, ...
	'Position',[44 25.25 8 1.5], ...
	'Style','edit', ...
	'Tag','txtAlgorithmParameters', ...
	'Visible','off');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[1 1 1], ...
	'ListboxTop',0, ...
	'Position',[5 23.25 47 1.5], ...
	'Style','edit', ...
	'Tag','txtAlgorithmParametersLong', ...
	'Visible','off');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 25 37 1.5], ...
	'Style','text', ...
	'Tag','lblAlgorithmParameters');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 37.25 32 1.5], ...
	'String','Error estimation method:', ...
	'Style','text', ...
	'Tag','txtRedrawingmethod1');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'ListboxTop',0, ...
	'Position',[32 37.25 20 1.5], ...
	'String',mat5, ...
	'Style','popupmenu', ...
	'Tag','popErrorEstimationMethod', ...
	'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[62 9.5 60 1], ...
	'Style','text', ...
	'Tag','TestSetError');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[62 8 60 1], ...
	'Style','text', ...
	'Tag','TrainSetError');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[62 6.5 60 1], ...
	'Style','text', ...
	'Tag','BayesError');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontSize',10, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[6 1.5 125 1.5], ...
	'Style','text', ...
	'Tag','Messages');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[62 11 60 2], ...
	'String','Classification Errors:', ...
	'Style','text', ...
	'Tag','txtErrors');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[6 3.5 80 1.25], ...
	'String','Messages:', ...
	'Style','text', ...
	'Tag','txtMessages');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[4 10 49 12], ...
	'Style','frame', ...
	'Tag','frmDistInput');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''EnterManualDist'')', ...
	'HorizontalAlignment','center', ...
	'ListboxTop',0, ...
	'Position',[5 19.5 47 1.75], ...
	'String','Manually enter distributions', ...
	'Tag','pshManual');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 12.75 30 1.5], ...
	'Style','text', ...
    'String','Points per click:', ...
	'Tag','lblNumberofManualPoints');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','                           ', ...
	'ListboxTop',0, ...
	'Position',[22 12.75 7 1.5], ...
	'String','20', ...
	'Style','edit', ...
	'Tag','txtNumberPointsPerClick');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[36 12.75 16 1.5], ...
	'String',mat6, ...
	'Style','popupmenu', ...
	'Tag','Distribution', ...
	'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[5 10.75 40 1.5], ...
	'String','Display Bayes decision boundaries', ...
	'Style','checkbox', ...
	'Tag','chkBayes', ...
	'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''GenerateDistData'')', ...
	'HorizontalAlignment','center', ...
	'ListboxTop',0, ...
	'Position',[5 17.25 47 1.75], ...
	'String','Generate a sample data set', ...
	'Tag','pshGenerateData');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''ManualGraphData'')', ...
	'HorizontalAlignment','center', ...
	'ListboxTop',0, ...
	'Position',[5 15 47 1.75], ...
	'String','Graphically enter a data set', ...
	'Tag','pshGraphData');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','multialgorithms', ...
	'ListboxTop',0, ...
	'Position',[4 6 10 3], ...
	'String','Compare', ...
	'Tag','MultiAlgorithms');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''Params'')', ...
	'ListboxTop',0, ...
	'Position',[17 6 10 3], ...
	'String','Params', ...
	'Tag','Parameters');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''ClearBounds'')', ...
	'ListboxTop',0, ...
	'Position',[30 6 10 3], ...
	'String','Clear', ...
	'Tag','Clear');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''Start'')', ...   
	'FontWeight','bold', ...
	'ListboxTop',0, ...
	'Position',[43 6 10 3], ...
	'String','Start', ...
	'Tag','Start');
if nargout > 0, fig = h0; end
classifier_commands('Init');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -