3 %> @brief Dialogbox
for Distribution-based Outlier Removal
4 %> @image html Screenshot-uip_blmisc_rowsout_distr.png
8 %> <b>Mark outliers only</b> -
9 %> @arg If not checked, the dataset will be split in two: the first one will contain the inliers, whereas the second one will contain the outliers.
10 %> @arg If checked, only one
new dataset will be generated, where the outliers will be marked (outliers
' class will be
11 %> -2). See blmisc_rowsout::flag_mark_only
13 %> <b>Threshold</b> - See blmisc_rowsout_distr::threshold
15 %> <b>Range filter</b> - See blmisc_rowsout_distr::quantile
17 %> <b>Tail trimming mode</b> - See blmisc_rowsout_distr::flag_trim_tail
19 %> <b>Number of bins</b> - See blmisc_rowsout_distr::no_bins
21 %> @sa blmisc_rowsout_distr
24 function varargout = uip_blmisc_rowsout_distr(varargin)
25 % Last Modified by GUIDE v2.5 07-Sep-2011 18:23:40
27 % Begin initialization code - DO NOT EDIT
29 gui_State = struct('gui_Name
', mfilename, ...
30 'gui_Singleton
', gui_Singleton, ...
31 'gui_OpeningFcn
', @uip_blmisc_rowsout_distr_OpeningFcn, ...
32 'gui_OutputFcn
', @uip_blmisc_rowsout_distr_OutputFcn, ...
33 'gui_LayoutFcn
', [] , ...
35 if nargin && ischar(varargin{1})
36 gui_State.gui_Callback = str2func(varargin{1});
40 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
42 gui_mainfcn(gui_State, varargin{:});
44 % End initialization code - DO NOT EDIT
47 % --- Executes just before uip_blmisc_rowsout_distr is made visible.
48 function uip_blmisc_rowsout_distr_OpeningFcn(hObject, eventdata, handles, varargin)
49 handles.input.block = varargin{1};
51 handles.input.data = varargin{2};
53 handles.input.data = [];
55 handles.output.flag_ok = 0;
56 guidata(hObject, handles);
57 gui_set_position(hObject);
60 % --- Outputs from this function are returned to the command clae.
61 function varargout = uip_blmisc_rowsout_distr_OutputFcn(hObject, eventdata, handles)
63 uiwait(handles.figure1);
64 handles = guidata(hObject);
65 varargout{1} = handles.output;
70 varargout{1} = output;
73 %############################################
77 function preview(handles)
78 data = handles.input.data;
80 irerrordlg('Dataset not specified!
', 'Cannot preview
');
82 blk = handles.input.block;
83 eval(['blk = blk.setbatch(
', params2str(get_params(handles)), ');
']);
84 blk = blk.train(data);
89 function params = get_params(handles)
90 types = {'threshold
', 'ranges
'};
93 'flag_mark_only
', int2str(get(handles.checkbox_flag_mark_only, 'Value
')), ...
94 'idx_fea
', int2str(eval(get(handles.edit_idx_fea, 'String
'))), ...
95 'no_bins
', int2str(eval(get(handles.edit_no_bins, 'String
'))), ...
96 'threshold
', get(handles.edit_threshold, 'String
'), ...
97 'quantile
', int2str(get(handles.popupmenu_quantile, 'Value
')-1), ...
98 'flag_trim_tail
', int2str(get(handles.checkbox_flag_trim_tail, 'value
')), ...
102 %############################################
103 %############################################
106 % --- Executes on button press in pushbuttonOk.
107 function pushbuttonOk_Callback(hObject, eventdata, handles)
109 handles.output.params = get_params(handles);
110 handles.output.flag_ok = 1;
111 guidata(hObject, handles);
114 irerrordlg(ME.message, 'Cannot
continue');
118 function edit_no_bins_Callback(hObject, eventdata, handles)
120 % --- Executes during object creation, after setting all properties.
121 function edit_no_bins_CreateFcn(hObject, eventdata, handles)
122 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
123 set(hObject,'BackgroundColor
','white
');
126 function edit_threshold_Callback(hObject, eventdata, handles)
128 % --- Executes during object creation, after setting all properties.
129 function edit_threshold_CreateFcn(hObject, eventdata, handles)
130 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
131 set(hObject,'BackgroundColor
','white
');
134 % --- Executes on button press in pushbuttonPreview.
135 function pushbuttonPreview_Callback(hObject, eventdata, handles)
138 function edit_idx_fea_Callback(hObject, eventdata, handles)
140 % --- Executes during object creation, after setting all properties.
141 function edit_idx_fea_CreateFcn(hObject, eventdata, handles)
142 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
143 set(hObject,'BackgroundColor
','white
');
146 % --- Executes on selection change in popupmenu_quantile.
147 function popupmenu_quantile_Callback(hObject, eventdata, handles)
149 % --- Executes during object creation, after setting all properties.
150 function popupmenu_quantile_CreateFcn(hObject, eventdata, handles)
151 if ispc && isequal(get(hObject,'BackgroundColor
'), get(0,'defaultUicontrolBackgroundColor
'))
152 set(hObject,'BackgroundColor
','white
');
155 % --- Executes on button press in checkbox_flag_trim_tail.
156 function checkbox_flag_trim_tail_Callback(hObject, eventdata, handles)
159 % --- Executes on button press in checkbox_flag_mark_only.
160 function checkbox_flag_mark_only_Callback(hObject, eventdata, handles)
Distribution-Based Outlier Removal.