IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_aggr_bag.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref aggr_bag
4 %> @image html Screenshot-uip_aggr_bag.png
5 %>
6 %> <b>Mold classifier</b> - see aggr_bag::block_mold
7 %>
8 %> <b>SGS</b> - see aggr_bag::sgs
9 %>
10 %> @sa @ref aggr_bag, aggr, uip_aggr.m
11 
12 %> @cond
13 function varargout = uip_aggr_bag(varargin)
14 % Last Modified by GUIDE v2.5 28-Aug-2011 23:27:02
15 
16 % Begin initialization code - DO NOT EDIT
17 gui_Singleton = 1;
18 gui_State = struct('gui_Name', mfilename, ...
19  'gui_Singleton', gui_Singleton, ...
20  'gui_OpeningFcn', @uip_aggr_bag_OpeningFcn, ...
21  'gui_OutputFcn', @uip_aggr_bag_OutputFcn, ...
22  'gui_LayoutFcn', [] , ...
23  'gui_Callback', []);
24 if nargin && ischar(varargin{1})
25  gui_State.gui_Callback = str2func(varargin{1});
26 end
27 
28 if nargout
29  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
30 else
31  gui_mainfcn(gui_State, varargin{:});
32 end
33 % End initialization code - DO NOT EDIT
34 
35 
36 % --- Executes just before uip_aggr_bag is made visible.
37 function uip_aggr_bag_OpeningFcn(hObject, eventdata, handles, varargin)
38 handles.output.flag_ok = 0;
39 guidata(hObject, handles);
40 gui_set_position(hObject);
41 refresh(handles);
42 
43 % --- Outputs from this function are returned to the command clae.
44 function varargout = uip_aggr_bag_OutputFcn(hObject, eventdata, handles)
45 try
46  uiwait(handles.figure1);
47  handles = guidata(hObject);
48  varargout{1} = handles.output;
49  delete(gcf);
50 catch
51  output.flag_ok = 0;
52  output.params = {};
53  varargout{1} = output;
54 end;
55 
56 
57 %############################################
58 
59 %#########
60 function refresh(handles)
61 listbox_load_from_workspace('sgs', handles.popupmenu_sgs, 0);
62 listbox_load_from_workspace({'clssr', 'block_cascade_base'}, handles.popupmenu_clssr, 0);
63 
64 
65 %############################################
66 %############################################
67 
68 % --- Executes on button press in pushbuttonOK.
69 function pushbuttonOK_Callback(hObject, eventdata, handles)
70 try
71  sclssr = listbox_get_selected_1stname(handles.popupmenu_clssr);
72  if isempty(sclssr)
73  sclssr = '[]';
74  end;
75  ssgs = listbox_get_selected_1stname(handles.popupmenu_sgs);
76  if isempty(ssgs)
77  ssgs = '[]';
78  end;
79 
80  other = uip_aggr();
81  if other.flag_ok
82  handles.output.params = [other.params, {...
83  'block_mold', sclssr, ...
84  'sgs', ssgs, ...
85  }];
86  handles.output.flag_ok = 1;
87  guidata(hObject, handles);
88  uiresume();
89  end;
90 catch ME
91  irerrordlg(ME.message, 'Cannot continue');
92 
93 end;
94 
95 % --- Executes on selection change in popupmenu_sgs.
96 function popupmenu_sgs_Callback(hObject, eventdata, handles)
97 
98 % --- Executes during object creation, after setting all properties.
99 function popupmenu_sgs_CreateFcn(hObject, eventdata, handles)
100 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
101  set(hObject,'BackgroundColor','white');
102 end
103 
104 % --- Executes on selection change in popupmenu_clssr.
105 function popupmenu_clssr_Callback(hObject, eventdata, handles)
106 
107 
108 % --- Executes during object creation, after setting all properties.
109 function popupmenu_clssr_CreateFcn(hObject, eventdata, handles)
110 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
111  set(hObject,'BackgroundColor','white');
112 end
113 
114 %> @endcond
Base Sub-dataset Generation Specification (SGS) class.
Definition: sgs.m:6
Property block_mold
must contain a block object that will be replicated as needed
Definition: aggr_bag.m:15
Base class for all ensemble classifiers.
Definition: aggr.m:6
function listbox_get_selected_1stname(in h_listbox)
Bagging ensemble.
Definition: aggr_bag.m:9
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)
Property sgs
SGS to do the bagging. Doesn't need to be a sgs_randsub one, actually. K-fold will work...
Definition: aggr_bag.m:18
function irerrordlg(in errorstring, in dlgname)