3 %> @brief Grid Search Properties Window
8 function varargout = uip_gridsearch(varargin)
9 % Begin initialization code - DO NOT EDIT
11 gui_State =
struct(
'gui_Name', mfilename, ...
12 'gui_Singleton', gui_Singleton, ...
13 'gui_OpeningFcn', @uip_gridsearch_OpeningFcn, ...
14 'gui_OutputFcn', @uip_gridsearch_OutputFcn, ...
15 'gui_LayoutFcn', [] , ...
17 if nargin && ischar(varargin{1})
18 gui_State.gui_Callback = str2func(varargin{1});
22 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
24 gui_mainfcn(gui_State, varargin{:});
26 % End initialization code - DO NOT EDIT
28 % --- Executes just before uip_gridsearch is made visible.
29 function uip_gridsearch_OpeningFcn(hObject, eventdata, handles, varargin)
30 handles.output.flag_ok = 0;
31 handles.names_log_mold = {};
32 guidata(hObject, handles);
36 % --- Outputs from
this function are returned to the command line.
37 function varargout = uip_gridsearch_OutputFcn(hObject, eventdata, handles)
39 uiwait(handles.figure1);
40 handles = guidata(hObject); % Handles is not a handle(!), so gotta retrieve it again to see changes in .output
41 varargout{1} = handles.output;
46 varargout{1} = output;
50 %-----------------------------------------------------------------------------------------------------------
53 function refresh(handles)
57 v =
get(handles.listbox_log_mold,
'Value');
58 if sum(v > length(handles.names_log_mold)) > 0 && ~isempty(handles.names_log_mold)
59 set(handles.listbox_log_mold, 'Value', 1);
61 set(handles.edit_log_mold, 'String', handles.names_log_mold);
70 local_show_description(handles, []);
73 function local_show_description(handles, listbox)
75 set(handles.edit_description, 'String', {});
80 %-----------------------------------------------------------------------------------------------------------
83 % --- Executes on button press in pushbuttonOk.
84 function pushbuttonOk_Callback(hObject, eventdata, handles)
95 if isempty(spostpr_test)
99 if isempty(spostpr_est)
100 if get(handles.popupmenu_postpr_est, 'Value') == 1
108 irerror('Classifier not specified!');
111 if isempty(handles.names_log_mold)
112 %
irerror('No mold Train-Test Logs specified!');
115 s = get(handles.edit_paramspecs, 'String');
117 % Effort to make s into something that can be eval()'ed
119 s = sprintf('%s\n', s{:});
122 s(:, end+1) = 10; % line feed
123 s = reshape(s
', 1, numel(s));
126 handles.output.params = {...
129 'chooser
', schooser, ...
130 'postpr_test
', spostpr_test, ...
131 'postpr_est
', spostpr_est, ...
132 'log_mold
', params2str2(handles.names_log_mold) ...
133 'no_refinements
', int2str(eval(fel(get(handles.edit_no_iterations, 'String
')))), ...
134 'maxmoves
', int2str(eval(fel(get(handles.edit_maxtries, 'String
')))), ...
135 'paramspecs
', cell2str(eval(s)), ...
136 'flag_parallel
', int2str(get(handles.checkbox_flag_parallel, 'Value
')), ...
138 handles.output.flag_ok = 1;
139 guidata(hObject, handles);
142 irerrordlg(ME.message, 'Cannot
continue');
147 function listbox_log_mold_Callback(hObject, eventdata, handles) %#ok<*INUSL,*DEFNU>
148 local_show_description(handles, handles.listbox_log_mold);
151 function pushbutton_log_mold_add_Callback(hObject, eventdata, handles)
152 nn = listbox_get_selected_1stname(handles.listbox_log_mold);
154 handles.names_log_mold{end+1} = nn;
155 guidata(hObject, handles);
160 function pushbutton_log_mold_restart_Callback(hObject, eventdata, handles)
161 set(handles.edit_log_mold, 'String
', {});
162 handles.names_log_mold = [];
163 guidata(hObject, handles);
167 function popupmenu_clssr_Callback(hObject, eventdata, handles)
168 local_show_description(handles, handles.popupmenu_clssr);
171 function popupmenu_postpr_test_Callback(hObject, eventdata, handles)
172 local_show_description(handles, handles.popupmenu_postpr_test);
175 function popupmenu_postpr_est_Callback(hObject, eventdata, handles)
176 local_show_description(handles, handles.popupmenu_postpr_est);
179 function popupmenu_sgs_Callback(hObject, eventdata, handles)
180 local_show_description(handles, handles.popupmenu_sgs);
183 function popupmenu_chooser_Callback(hObject, eventdata, handles)
184 local_show_description(handles, handles.popupmenu_chooser);
185 %-------------------------------------------------------------------------------
189 function pushbutton_t_knn_Callback(hObject, eventdata, handles)
190 set(handles.edit_paramspecs, 'string', sprintf('{
''k
'', 1:2:20, 0}
'));
193 function pushbutton_t_svm_Callback(hObject, eventdata, handles)
194 set(handles.edit_paramspecs, 'string', sprintf('{
''c
'', 10.^[-1:2:7], 1; ...\n
''gamma
'', 10.^[-7:2:1], 1}
'));
197 function pushbutton_t_pcasvm_Callback(hObject, eventdata, handles)
198 set(handles.edit_paramspecs, 'string', sprintf('{
''blocks{1}.no_factors
'', 10:10:100, 0; ...\n
''blocks{2}.c
'', 10.^[-1:2:7], 1; ...\n
''blocks{2}.gamma
'', 10.^[-7:2:1], 1}
'));
201 function popupmenu_sgs_CreateFcn(hObject, eventdata, handles)
202 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
203 set(hObject,'BackgroundColor
','white
');
205 function checkbox_flag_parallel_Callback(hObject, eventdata, handles)
206 function popupmenu_clssr_CreateFcn(hObject, eventdata, handles)
207 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
208 set(hObject,'BackgroundColor
','white
');
210 function popupmenu_chooser_CreateFcn(hObject, eventdata, handles)
211 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
212 set(hObject,'BackgroundColor
','white
');
214 function edit_no_iterations_Callback(hObject, eventdata, handles)
215 function edit_no_iterations_CreateFcn(hObject, eventdata, handles)
216 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
217 set(hObject,'BackgroundColor
','white
');
219 function edit_paramspecs_Callback(hObject, eventdata, handles)
220 function edit_paramspecs_CreateFcn(hObject, eventdata, handles)
221 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
222 set(hObject,'BackgroundColor
','white
');
224 function edit_description_Callback(hObject, eventdata, handles) %#ok<*INUSD>
225 function edit_description_CreateFcn(hObject, eventdata, handles)
226 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
227 set(hObject,'BackgroundColor
','white
');
229 function popupmenu_postpr_test_CreateFcn(hObject, eventdata, handles)
230 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
231 set(hObject,'BackgroundColor
','white
');
233 function popupmenu_postpr_est_CreateFcn(hObject, eventdata, handles)
234 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
235 set(hObject,'BackgroundColor
','white
');
237 function edit_block_mold_Callback(hObject, eventdata, handles)
238 function edit_block_mold_CreateFcn(hObject, eventdata, handles)
239 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
240 set(hObject,'BackgroundColor
','white
');
242 function listbox_log_mold_CreateFcn(hObject, eventdata, handles)
243 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
244 set(hObject,'BackgroundColor
','white
');
246 function edit_log_mold_Callback(hObject, eventdata, handles)
247 function edit_log_mold_CreateFcn(hObject, eventdata, handles)
248 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
249 set(hObject,'BackgroundColor
','white
');
251 function listbox_block_mold_CreateFcn(hObject, eventdata, handles)
252 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
253 set(hObject,'BackgroundColor
','white
');
255 function edit_maxtries_Callback(hObject, eventdata, handles)
256 function edit_maxtries_CreateFcn(hObject, eventdata, handles)
257 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
258 set(hObject,'BackgroundColor
','white
');
Base Sub-dataset Generation Specification (SGS) class.
function show_description(in h_list, in h_edit)
function listbox_get_selected_1stname(in h_listbox)
Block that resolves estimato posterior probabilities into classes.
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)