IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_as_fsel_forward.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref as_fsel_forward (Forward Feature Selection)
4 %> <b>Number of features</b> - see as_fsel_forward::nf_select
5 %>
6 %> <b>Feature Subset Grader</b> - see as_fsel_forward::fsg
7 %>
8 %> @sa as_fsel_forward
9 
10 %>@cond
11 function varargout = uip_as_fsel_forward(varargin)
12 
13 % Last Modified by GUIDE v2.5 07-Aug-2012 19:27:26
14 
15 % Begin initialization code - DO NOT EDIT
16 gui_Singleton = 1;
17 gui_State = struct('gui_Name', mfilename, ...
18  'gui_Singleton', gui_Singleton, ...
19  'gui_OpeningFcn', @uip_as_fsel_forward_OpeningFcn, ...
20  'gui_OutputFcn', @uip_as_fsel_forward_OutputFcn, ...
21  'gui_LayoutFcn', [] , ...
22  'gui_Callback', []);
23 if nargin && ischar(varargin{1})
24  gui_State.gui_Callback = str2func(varargin{1});
25 end
26 
27 if nargout
28  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
29 else
30  gui_mainfcn(gui_State, varargin{:});
31 end
32 % End initialization code - DO NOT EDIT
33 
34 
35 % --- Executes just before uip_as_fsel_forward is made visible.
36 function uip_as_fsel_forward_OpeningFcn(hObject, eventdata, handles, varargin)
37 handles.output.flag_ok = 0;
38 guidata(hObject, handles);
39 gui_set_position(hObject);
40 
41 refresh(handles);
42 
43 
44 % --- Outputs from this function are returned to the command clae.
45 function varargout = uip_as_fsel_forward_OutputFcn(hObject, eventdata, handles) %#ok<*INUSL>
46 try
47  uiwait(handles.figure1);
48  handles = guidata(hObject);
49  varargout{1} = handles.output;
50  delete(gcf);
51 catch
52  output.flag_ok = 0;
53  varargout{1} = output;
54 end;
55 
56 
57 
58 
59 %############################################
60 
61 %#########
62 function refresh(handles)
63 listbox_load_from_workspace('fsg', handles.popupmenuFsg);
64 
65 
66 %############################################
67 %############################################
68 
69 % --- Executes on button press in pushbuttonOk.
70 function pushbuttonOk_Callback(hObject, eventdata, handles) %#ok<*DEFNU>
71 sfsg = listbox_get_selected_1stname(handles.popupmenuFsg);
72 if isempty(sfsg)
73  irerrordlg('Please specify FSG object!', 'Cannot continue');
74 else
75  handles.output.params = {...
76  'nf_select', int2str(eval(get(handles.editNf, 'String'))), ...
77  'fsg', sfsg ...
78  };
79  handles.output.flag_ok = 1;
80  guidata(hObject, handles);
81  uiresume();
82 end;
83 
84 function editVariables_Callback(hObject, eventdata, handles) %#ok<*INUSD>
85 
86 % --- Executes during object creation, after setting all properties.
87 function editVariables_CreateFcn(hObject, eventdata, handles)
88 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
89  set(hObject,'BackgroundColor','white');
90 end
91 
92 
93 function editNf_Callback(hObject, eventdata, handles)
94 
95 % --- Executes during object creation, after setting all properties.
96 function editNf_CreateFcn(hObject, eventdata, handles)
97 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
98  set(hObject,'BackgroundColor','white');
99 end
100 
101 
102 % --- Executes on selection change in popupmenuFsg.
103 function popupmenuFsg_Callback(hObject, eventdata, handles)
104 
105 
106 % --- Executes during object creation, after setting all properties.
107 function popupmenuFsg_CreateFcn(hObject, eventdata, handles)
108 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
109  set(hObject,'BackgroundColor','white');
110 end
111 
112 %> @endcond
Property fsg
Feature Subset Grader object.
function listbox_get_selected_1stname(in h_listbox)
Forward Feature Selection.
function listbox_load_from_workspace(in classname, in h_list, in flag_blank, in string_empty, in input)
function gui_set_position(in hObject)
FSG - Feature Subset Grader.
Definition: fsg.m:6
function irerrordlg(in errorstring, in dlgname)
Property nf_select
=10. Number of features to be selected