3 %> @brief Repeated Train-Test (@ref
reptt) Properties Window
5 %> This window asks
for properties common to all @ref
reptt classes
7 %> @image html Screenshot-uip_reptt.png
20 function varargout = uip_reptt(varargin)
21 % Begin initialization code - DO NOT EDIT
23 gui_State =
struct(
'gui_Name', mfilename, ...
24 'gui_Singleton', gui_Singleton, ...
25 'gui_OpeningFcn', @uip_reptt_OpeningFcn, ...
26 'gui_OutputFcn', @uip_reptt_OutputFcn, ...
27 'gui_LayoutFcn', [] , ...
29 if nargin && ischar(varargin{1})
30 gui_State.gui_Callback = str2func(varargin{1});
34 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
36 gui_mainfcn(gui_State, varargin{:});
38 % End initialization code - DO NOT EDIT
40 % --- Executes just before uip_reptt is made visible.
41 function uip_reptt_OpeningFcn(hObject, eventdata, handles, varargin)
42 handles.output.flag_ok = 0;
43 handles.names_block_mold = {};
44 handles.names_log_mold = {};
45 guidata(hObject, handles);
49 % --- Outputs from
this function are returned to the command line.
50 function varargout = uip_reptt_OutputFcn(hObject, eventdata, handles)
52 uiwait(handles.figure1);
53 handles = guidata(hObject); % Handles is not a handle(!), so gotta retrieve it again to see changes in .output
54 varargout{1} = handles.output;
59 varargout{1} = output;
63 %############################################
64 %############################################
67 function refresh(handles)
69 % logs and classifiers
71 v =
get(handles.listbox_log_mold,
'Value');
72 if sum(v > length(handles.names_log_mold)) > 0 && ~isempty(handles.names_log_mold)
73 set(handles.listbox_log_mold, 'Value', 1);
75 set(handles.edit_log_mold, 'String', handles.names_log_mold);
78 v =
get(handles.listbox_block_mold,
'Value');
79 if sum(v > length(handles.names_block_mold)) > 0 && ~isempty(handles.names_block_mold)
80 set(handles.listbox_block_mold, 'Value', 1);
82 set(handles.edit_block_mold, 'String', handles.names_block_mold);
90 local_show_description(handles, []);
93 function local_show_description(handles, listbox)
95 set(handles.edit_description, 'String', {});
99 %############################################
100 %############################################
103 % --- Executes on button press in pushbuttonOk.
104 function pushbuttonOk_Callback(hObject, eventdata, handles)
107 if isempty(spostpr_test)
111 if isempty(spostpr_est)
112 irerror('Estimation Post-Processor not specified!');
115 if isempty(handles.names_block_mold)
116 irerror('No mold Classifiers specified!');
119 if isempty(handles.names_log_mold)
120 irerror('No mold Train-Test Logs specified!');
124 handles.output.params = {...
125 'postpr_test', spostpr_test, ...
126 'postpr_est', spostpr_est, ...
127 'log_mold',
params2str2(handles.names_log_mold) ...
128 'block_mold', [
params2str2(handles.names_block_mold),
''''], ... % Transposes the list of blocks to have a column instead of a row
130 handles.output.flag_ok = 1;
131 guidata(hObject, handles);
134 irerrordlg(ME.message, 'Cannot
continue');
137 % --- Executes on selection change in listbox_block_mold.
138 function listbox_block_mold_Callback(hObject, eventdata, handles) %#ok<*INUSL,*DEFNU>
139 local_show_description(handles, handles.listbox_block_mold);
141 % --- Executes on selection change in listbox_log_mold.
142 function listbox_log_mold_Callback(hObject, eventdata, handles)
143 local_show_description(handles, handles.listbox_log_mold);
146 % --- Executes on button press in pushbutton_block_mold_add.
147 function pushbutton_block_mold_add_Callback(hObject, eventdata, handles)
148 nn = listbox_get_selected_1stname(handles.listbox_block_mold);
150 handles.names_block_mold{end+1} = nn;
151 guidata(hObject, handles);
155 % --- Executes on button press in pushbutton_block_mold_restart.
156 function pushbutton_block_mold_restart_Callback(hObject, eventdata, handles)
157 set(handles.edit_block_mold, 'String
', {});
158 handles.names_block_mold = [];
159 guidata(hObject, handles);
162 % --- Executes on button press in pushbutton_log_mold_add.
163 function pushbutton_log_mold_add_Callback(hObject, eventdata, handles)
164 nn = listbox_get_selected_1stname(handles.listbox_log_mold);
166 handles.names_log_mold{end+1} = nn;
167 guidata(hObject, handles);
171 % --- Executes on button press in pushbutton_log_mold_restart.
172 function pushbutton_log_mold_restart_Callback(hObject, eventdata, handles)
173 set(handles.edit_log_mold, 'String
', {});
174 handles.names_log_mold = [];
175 guidata(hObject, handles);
178 function edit_description_Callback(hObject, eventdata, handles) %#ok<*INUSD>
180 % --- Executes during object creation, after setting all properties.
181 function edit_description_CreateFcn(hObject, eventdata, handles)
182 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
183 set(hObject,'BackgroundColor
','white
');
186 % --- Executes on selection change in popupmenu_postpr_test.
187 function popupmenu_postpr_test_Callback(hObject, eventdata, handles)
188 local_show_description(handles, handles.popupmenu_postpr_test);
190 % --- Executes during object creation, after setting all properties.
191 function popupmenu_postpr_test_CreateFcn(hObject, eventdata, handles)
192 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
193 set(hObject,'BackgroundColor
','white
');
198 % --- Executes on selection change in popupmenu_postpr_est.
199 function popupmenu_postpr_est_Callback(hObject, eventdata, handles)
200 local_show_description(handles, handles.popupmenu_postpr_est);
203 % --- Executes during object creation, after setting all properties.
204 function popupmenu_postpr_est_CreateFcn(hObject, eventdata, handles)
205 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
206 set(hObject,'BackgroundColor
','white
');
209 function edit_block_mold_Callback(hObject, eventdata, handles)
211 % --- Executes during object creation, after setting all properties.
212 function edit_block_mold_CreateFcn(hObject, eventdata, handles)
213 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
214 set(hObject,'BackgroundColor
','white
');
217 % --- Executes during object creation, after setting all properties.
218 function listbox_log_mold_CreateFcn(hObject, eventdata, handles)
219 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
220 set(hObject,'BackgroundColor
','white
');
223 function edit_log_mold_Callback(hObject, eventdata, handles)
225 % --- Executes during object creation, after setting all properties.
226 function edit_log_mold_CreateFcn(hObject, eventdata, handles)
227 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
228 set(hObject,'BackgroundColor
','white
');
231 % --- Executes during object creation, after setting all properties.
232 function listbox_block_mold_CreateFcn(hObject, eventdata, handles)
233 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
234 set(hObject,'BackgroundColor
','white
');
237 % --- Executes on selection change in popupmenu_data.
238 function popupmenu_data_Callback(hObject, eventdata, handles)
239 local_show_description(handles, handles.popupmenu_data);
242 % --- Executes during object creation, after setting all properties.
243 function popupmenu_data_CreateFcn(hObject, eventdata, handles)
245 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
246 set(hObject,'BackgroundColor
','white
');
Property log_mold
Cell array. Molds for the recording.
Property block_mold
Cell array. Blocks to be trained-tested.
function show_description(in h_list, in h_edit)
function listbox_get_selected_1stname(in h_listbox)
function params2str2(in params)
Property postpr_test
(Optional) Block to post-process the test data. For example, a grag_classes_first.
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)