IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_estlog_classxclass.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref estlog_classxclass
4 %>
5 %> <b>Title</b> Title needs to be a valid MATLAB field name (if the log will be ever used to build a @ref sovalues). A default random title is automatically generated.
6 %>
7 %> <b>Test Dataset class labels</b> - see estlog_classxclass::testlabels
8 %>
9 %> <b>Estimation class labels</b> - see estlog_classxclass::estlabels
10 %>
11 %> <b>Classification rate obtention mode</b> - see estlog_classxclass::ratemode
12 %>
13 %> <b>Index of diagonal element</b> - see estlog_classxclass::idx_rate
14 %>
15 %> @sa estlog_classxclass
16 
17 %> @cond
18 function varargout = uip_estlog_classxclass(varargin)
19 % Begin initialization code - DO NOT EDIT
20 gui_Singleton = 0;
21 gui_State = struct('gui_Name', mfilename, ...
22  'gui_Singleton', gui_Singleton, ...
23  'gui_OpeningFcn', @uip_estlog_classxclass_OpeningFcn, ...
24  'gui_OutputFcn', @uip_estlog_classxclass_OutputFcn, ...
25  'gui_LayoutFcn', [] , ...
26  'gui_Callback', []);
27 if nargin && ischar(varargin{1})
28  gui_State.gui_Callback = str2func(varargin{1});
29 end
30 
31 if nargout
32  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
33 else
34  gui_mainfcn(gui_State, varargin{:});
35 end
36 % End initialization code - DO NOT EDIT
37 
38 % --- Executes just before uip_estlog_classxclass is made visible.
39 function uip_estlog_classxclass_OpeningFcn(hObject, eventdata, handles, varargin)
40 handles.output.flag_ok = 0;
41 guidata(hObject, handles);
42 gui_set_position(hObject);
43 set(handles.edit_title, 'string', sprintf('rate%03d', randi([1, 999])));
44 
45 
46 % --- Outputs from this function are returned to the command line.
47 function varargout = uip_estlog_classxclass_OutputFcn(hObject, eventdata, handles) %#ok<*INUSL>
48 try
49  uiwait(handles.figure1);
50  handles = guidata(hObject); % Handles is not a handle(!), so gotta retrieve it again to see changes in .output
51  varargout{1} = handles.output;
52  delete(gcf);
53 catch %#ok<*CTCH>
54  output.flag_ok = 0;
55  output.params = {};
56  varargout{1} = output;
57 end;
58 
59 
60 
61 % --- Executes on button press in pushbuttonOk.
62 function pushbuttonOk_Callback(hObject, eventdata, handles)
63 try
64  handles.output.params = {...
65  'title', ['''', get(handles.edit_title, 'String'), ''''], ...
66  'testlabels', get(handles.edit_testlabels, 'String'), ...
67  'estlabels', get(handles.edit_estlabels, 'String'), ...
68  'ratemode', int2str(get(handles.popupmenu_ratemode, 'Value')-1), ...
69  'idx_rate', int2str(eval(fel(get(handles.edit_idx_rate, 'String')))), ...
70  'flag_support', int2str(get(handles.checkbox_flag_support, 'Value')) ...
71  };
72  handles.output.flag_ok = 1;
73  guidata(hObject, handles);
74  uiresume();
75 catch ME
76  irerrordlg(ME.message, 'Cannot continue');
77 
78 end;
79 
80 function popupmenu_ratemode_Callback(hObject, eventdata, handles) %#ok<*INUSD,*DEFNU>
81 function popupmenu_ratemode_CreateFcn(hObject, eventdata, handles)
82 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
83  set(hObject,'BackgroundColor','white');
84 end
85 function edit_idx_rate_Callback(hObject, eventdata, handles)
86 function edit_idx_rate_CreateFcn(hObject, eventdata, handles)
87 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
88  set(hObject,'BackgroundColor','white');
89 end
90 function edit_testlabels_Callback(hObject, eventdata, handles)
91 function edit_testlabels_CreateFcn(hObject, eventdata, handles)
92 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
93  set(hObject,'BackgroundColor','white');
94 end
95 function edit_estlabels_Callback(hObject, eventdata, handles)
96 function edit_estlabels_CreateFcn(hObject, eventdata, handles)
97 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
98  set(hObject,'BackgroundColor','white');
99 end
100 function pushbutton_pick_test_Callback(hObject, eventdata, handles)
101 ouch = ask_dataset([], 'Dataset to pick class labels from', 0);
102 if ouch.flag_ok
103  set(handles.edit_testlabels, 'String', [ouch.params{2}, '.classlabels']);
104 end;
105 function pushbutton_pick_est_Callback(hObject, eventdata, handles)
106 ouch = ask_dataset([], 'Dataset to pick class labels from', 0);
107 if ouch.flag_ok
108  set(handles.edit_estlabels, 'String', [ouch.params{2}, '.classlabels']);
109 end;
110 function checkbox_flag_support_Callback(hObject, eventdata, handles)
111 function edit_title_Callback(hObject, eventdata, handles)
112 function edit_title_CreateFcn(hObject, eventdata, handles)
113 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
114  set(hObject,'BackgroundColor','white');
115 end
116 %> @endcond
Property estlabels
All possible class labels in estimation datasets.
Property idx_rate
=1. Diagonal element if ratemode is 1.
Property ratemode
=0. What to give as a "rate". 0-mean sensitivity; 1-diagonal element defined by idx_rate ...
Records (test class)x([rejected, estimation class]) hits.
function fel(in c, in n)
function gui_set_position(in hObject)
function irerrordlg(in errorstring, in dlgname)
function ask_dataset(in varargin)