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

📄 classifier.m

📁 Duda的《模式分类》第二版的配套的Matlab源代码
💻 M
📖 第 1 页 / 共 2 页
字号:
function fig = classifier()
% This is the machine-generated representation of a Handle Graphics object
% and its children.  Note that handle values may change when these objects
% are re-created. This may cause problems with any callbacks written to
% depend on the value of the handle at the time the object was saved.
% This problem is solved by saving the output as a FIG-file.
%
% To reopen this object, just type the name of the M-file at the MATLAB
% prompt. The M-file and its associated MAT-file must be on your path.
% 
% NOTE: certain newer features in MATLAB may not have been saved in this
% M-file due to limitations of this format, which has been superseded by
% FIG-files.  Figures which have been annotated using the plot editor tools
% are incompatible with the M-file/MAT-file format, and should be saved as
% FIG-files.

if (~isempty(findobj('Tag','classifier_GUI')))
    error('There is already an open classifier GUI. Two GUI''s cannot work simultaneously.')
end

load classifier
v = version;

if (v(1) == '5') %Matlab 5
	h0 = figure('Units','characters', ...
		'Color',[0.8 0.8 0.8], ...
		'Colormap',mat0, ...
		'CreateFcn','                                                                        ', ...
		'MenuBar','none', ...
		'PaperPosition',[18 180 576 432], ...
		'PaperType','A4', ...
		'Position',[44 11.46 139 45.38], ...
		'Renderer','zbuffer', ...
		'RendererMode','manual', ...
		'Tag','classifier_GUI');
else
	h0 = figure('Units','characters', ...
		'Color',[0.8 0.8 0.8], ...
		'Colormap',mat0, ...
		'CreateFcn','                                                                        ', ...
		'FileName','D:\Users\elad\HW\Classification_toolbox\classifier.m', ...
		'MenuBar','none', ...
		'PaperPosition',[18 180 576 432], ...
		'PaperType','A4', ...
		'Position',[44 11.46 139 45.38], ...
		'Renderer','zbuffer', ...
		'RendererMode','manual', ...
		'Tag','classifier_GUI', ...
		'ToolBar','none');
end
h1 = uimenu('Parent',h0, ...
	'Callback','                                    ', ...
	'Label','&File', ...
	'Tag','&File1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''SearchForFile'')', ...
	'Label','&Load', ...
	'Tag','&FileLoad');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''Save'')', ...
	'Label','Save', ...
	'Tag','&FileSave');
h2 = uimenu('Parent',h1, ...
	'Label','Clear', ...
	'Tag','&FileClear1');
h3 = uimenu('Parent',h2, ...
	'Callback','classifier_commands(''ClearBounds'')', ...
	'Label','Clear &bounds', ...
	'Tag','&File&ClearBounds');
h3 = uimenu('Parent',h2, ...
	'Callback','classifier_commands(''ClearWorkspace'')', ...
	'Label','Clear &workspace', ...
	'Tag','&File&ClearWorkspace');
h2 = uimenu('Parent',h1, ...
	'Tag','&FileMenu1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''Mixpatterns'')', ...
	'Label','&Permute patterns', ...
	'Tag','&Mixpatterns');
h2 = uimenu('Parent',h1, ...
	'Tag','&FileMenu1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''Exit'')', ...
	'Label','&Exit', ...
	'Tag','&File&Exit');
h1 = uimenu('Parent',h0, ...
	'Callback','                                    ', ...
	'Label','&Edit', ...
	'Tag','&Edit1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''Print'')        ', ...
	'Label','&Print', ...
	'Tag','&Edit&Print1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''Copy'')         ', ...
	'Label','&Copy', ...
	'Tag','&Edit&Copy1');
h1 = uimenu('Parent',h0, ...
	'Callback','                                    ', ...
	'Label','&View', ...
	'Tag','&View1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''MenuGrid'')     ', ...
	'Checked','on', ...
	'Label','&Grid', ...
	'Tag','&View&Grid1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''MenuZoom'')     ', ...
	'Label','&Zoom', ...
	'Tag','&View&Zoom1');
h1 = uimenu('Parent',h0, ...
	'Label','&Actions', ...
	'Tag','&Actions');
h2 = uimenu('Parent',h1, ...
   'Label','&Start classification', ...
	'Callback','classifier_commands(''Start'')', ...   
	'Tag','&Actions&Start');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''Params'') ', ...
   'Label','Sho&w distribution parameters', ...
	'Tag','&Actions&ShowParams');
h2 = uimenu('Parent',h1, ...
   'Label','&Find best parameters for the chosen classifier', ...
	'Callback','FindParameters', ...   
	'Tag','&Actions&FindBest');
h2 = uimenu('Parent',h1, ...
   'Label','&Compare algorithms', ...
	'Callback','multialgorithms', ...   
	'Tag','&Actions&Start');
h2 = uimenu('Parent',h1, ...
	'Tag','&FileMenu1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''EnterManualDist'')', ...
   'Label','&Manually enter distributions', ...
	'Tag','&Actions&ManualDistributions');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''GenerateDistData'')', ...
   'Label','&Generate dataset', ...
	'Tag','&Actions&Generatedataset');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''ManualGraphData'')', ...
   'Label','G&raphically enter a dataset', ...
	'Tag','&Actions&Graphicaldataset');
h1 = uimenu('Parent',h0, ...
	'Label','&Options', ...
	'Tag','&Options');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''SeparatePreprocessing'') ', ...
	'Label','&Perform preprocessing separately for each class', ...
	'Tag','&Options&SeparatePreprocessing');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''ShowPartitions'') ', ...
	'Label','&Show center of partitions during training', ...
	'Tag','&Options&ShowPartitions');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''ShowVoronoiPartitions'') ', ...
	'Label','Show &Voronoi regions during training', ...
	'Tag','&Options&ShowVoronoiPartitions');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''ShowTrainingPoints'') ', ...
	'Label','Show &Training points', ...
	'Tag','&Options&ShowTraining');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''ShadeDecisionRegion'') ', ...
	'Label','Shade &Decision Regions', ...
	'Checked','on', ...
	'Tag','&Options&ShadeDecision');
h1 = uimenu('Parent',h0, ...
	'Label','&Help', ...
	'Tag','&Help');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''HelpPreprocessing'') ', ...
	'Label','Help of the &Preprocessing algorithm', ...
	'Tag','&Help&HelpPreprocessing');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''HelpClassifier'') ', ...
	'Label','Help of the &Classification algorithm', ...
	'Tag','&Help&HelpClassifier');
h2 = uimenu('Parent',h1, ...
	'Tag','&Help1');
h2 = uimenu('Parent',h1, ...
	'Callback','classifier_commands(''About'') ', ...
	'Label','&About', ...
	'Tag','&About');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[4 1 131 4], ...
	'Style','frame', ...
	'Tag','frmMessages');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[60.5 5.5 74.5 8], ...
	'Style','frame', ...
	'Tag','frmErrors');
h1 = axes('Parent',h0, ...
	'Box','on', ...
	'CameraUpVector',[0 1 0], ...
	'CameraUpVectorMode','manual', ...
	'Color',[1 1 1], ...
	'Position',[0.4353846153846154 0.366852886405959 0.5353846153846154 0.5884543761638734], ...
	'Tag','axsPlotArea', ...
	'XColor',[0 0 0], ...
	'XGrid','on', ...
	'YColor',[0 0 0], ...
	'YGrid','on', ...
	'ZColor',[0 0 0], ...
	'ZGrid','on');
h2 = line('Parent',h1, ...
	'Color',[0 0 1], ...
	'Tag','Line1', ...
	'XData',0, ...
	'YData',0);
h2 = text('Parent',h1, ...
	'Color',[0 0 0], ...
	'HandleVisibility','off', ...
	'HorizontalAlignment','center', ...
	'Position',[-0.005813953488372103 -1.151898734177215 17.32050807568877], ...
	'Tag','Text4', ...
	'VerticalAlignment','cap');
set(get(h2,'Parent'),'XLabel',h2);
h2 = text('Parent',h1, ...
	'Color',[0 0 0], ...
	'HandleVisibility','off', ...
	'HorizontalAlignment','center', ...
	'Position',[-1.191860465116279 -0.006329113924050667 17.32050807568877], ...
	'Rotation',90, ...
	'Tag','Text3', ...
	'VerticalAlignment','baseline');
set(get(h2,'Parent'),'YLabel',h2);
h2 = text('Parent',h1, ...
	'Color',[0 0 0], ...
	'HandleVisibility','off', ...
	'HorizontalAlignment','center', ...
	'Position',[-0.005813953488372103 1.044303797468354 17.32050807568877], ...
	'Tag','Text1', ...
	'VerticalAlignment','bottom');
set(get(h2,'Parent'),'Title',h2);
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[4 40 49 3], ...
	'Style','frame', ...
	'Tag','frmFilename');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'ListboxTop',0, ...
	'Position',[4 22.5 49 17], ...
	'Style','frame', ...
	'Tag','frmParameters');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[5 41 30 1], ...
	'String','File name: ', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','classifier_commands(''FileNameInput'')', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[16 40.5 30 1.75], ...
	'Style','edit', ...
	'Tag','FileNameInput');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','classifier_commands(''SearchForFile'')', ...
	'ListboxTop',0, ...
	'Position',[47 40.5 5 1.75], ...
	'String','...', ...
	'Tag','pshLocateFile');
h1 = uicontrol('Parent',h0, ...
	'Units','characters', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','                 ', ...
	'ListboxTop',0, ...
	'Position',[44 35.25 8 1.5], ...
	'String','1', ...
	'Style','edit', ...

⌨️ 快捷键说明

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