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