IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_aggr_hiesplit.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window to create a Hie-Split Aggregation
4 %> @image html Screenshot-uip_aggr_hiesplit.png
5 %>
6 %> <b>Mold classifier</b> - see aggr_hiesplit::block_mold
7 %>
8 %> <b>Class levels to use for splitting</b> - see aggr_hiesplit::hie_split
9 %>
10 %> <b>Class levels to use for classification</b> - see aggr_hiesplit::hie_classify
11 %>
12 %> @sa aggr_hiesplit, aggr, uip_aggr.m
13 
14 %> @cond
15 function varargout = uip_aggr_hiesplit(varargin)
16 % Begin initialization code - DO NOT EDIT
17 gui_Singleton = 0;
18 gui_State = struct('gui_Name', mfilename, ...
19  'gui_Singleton', gui_Singleton, ...
20  'gui_OpeningFcn', @uip_aggr_hiesplit_OpeningFcn, ...
21  'gui_OutputFcn', @uip_aggr_hiesplit_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 % --- Executes just before uip_aggr_hiesplit is made visible.
36 function uip_aggr_hiesplit_OpeningFcn(hObject, eventdata, handles, varargin)
37 handles.output.flag_ok = 0;
38 guidata(hObject, handles);
39 gui_set_position(hObject);
40 listbox_load_from_workspace({'clssr', 'block_cascade_base'}, handles.popupmenu_block_mold, 0);
41 
42 
43 % --- Outputs from this function are returned to the command line.
44 function varargout = uip_aggr_hiesplit_OutputFcn(hObject, eventdata, handles)
45 try
46  uiwait(handles.figure1);
47  handles = guidata(hObject); % Handles is not a handle(!), so gotta retrieve it again to see changes in .output
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 % --- Executes on button press in pushbuttonOk.
59 function pushbuttonOk_Callback(hObject, eventdata, handles)
60 try
61  sblock_mold = listbox_get_selected_1stname(handles.popupmenu_block_mold);
62  if isempty(sblock_mold)
63  error('Test dataset not specified!');
64  end;
65 
66  other = uip_aggr();
67  if other.flag_ok
68  handles.output.params = [other.params, {...
69  'block_mold', sblock_mold, ...
70  'hie_split', mat2str(eval(get(handles.edit_hie_split, 'String'))), ...
71  'hie_classify', mat2str(eval(get(handles.edit_hie_classify, 'String'))) ...
72  }];
73  handles.output.flag_ok = 1;
74  guidata(hObject, handles);
75  uiresume();
76  end;
77 catch ME
78  irerrordlg(ME.message, 'Cannot continue');
79 
80 end;
81 
82 % --- Executes on selection change in popupmenu_data_test.
83 function popupmenu_data_test_Callback(hObject, eventdata, handles)
84 
85 % --- Executes during object creation, after setting all properties.
86 function popupmenu_data_test_CreateFcn(hObject, eventdata, handles)
87 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
88  set(hObject,'BackgroundColor','white');
89 end
90 
91 function edit_hie_split_Callback(hObject, eventdata, handles)
92 
93 % --- Executes during object creation, after setting all properties.
94 function edit_hie_split_CreateFcn(hObject, eventdata, handles)
95 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
96  set(hObject,'BackgroundColor','white');
97 end
98 
99 function edit_hie_classify_Callback(hObject, eventdata, handles)
100 
101 % --- Executes during object creation, after setting all properties.
102 function edit_hie_classify_CreateFcn(hObject, eventdata, handles)
103 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
104  set(hObject,'BackgroundColor','white');
105 end
106 
107 % --- Executes on selection change in popupmenu_block_mold.
108 function popupmenu_block_mold_Callback(hObject, eventdata, handles)
109 
110 
111 % --- Executes during object creation, after setting all properties.
112 function popupmenu_block_mold_CreateFcn(hObject, eventdata, handles)
113 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
114  set(hObject,'BackgroundColor','white');
115 end
116 %> @endcond
Class-Hierarchical Training Data Split.
Definition: aggr_hiesplit.m:11
Base class for all ensemble classifiers.
Definition: aggr.m:6
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)
function gui_set_position(in hObject)
Property block_mold
must contain a block object that will be replicated as needed
Definition: aggr_hiesplit.m:17
function irerrordlg(in errorstring, in dlgname)