⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edagui.m

📁 常用ROBUST STATISTICAL
💻 M
字号:
function edagui
% EDAGUI  Exploratory Data Analysis Graphical User Interface
%   This is the main entry point for the EDA GUI Toolbox. This toolbox is
%   meant to accompany the EDA Toolbox described in 'Exploratory Data
%   Analysis with MATLAB' by Martinez and Martinez, CRC Press. 
%
%   One does not have to use this GUI to invoke the others. Each GUI
%   accessed via this one can be called separately. This GUI is for
%   convenience and to provide a suggested roadmap for exploratory data
%   analysis.
%
%   A list of GUIs available in this toolbox are:
%
%   loadgui:        Load the data set and other optional information.
%   transformgui:   Apply various transorms to the data.
%   gedagui:        Tools for visualizing the data.
%   univgui:        Methods for visualizing distributions of features.
%   bivgui:         Methods for visualizing distributions of 2 features.
%   tourgui:        Conduct grand tours and permutation tours.
%   ppedagui:       Projection pursuit for EDA.
%   mdsgui:         Classical and metric multidimensional scaling.
%   dimredgui:      Principal component analysis and nonlinear
%                   dimensionality reduction.
%   kmeansgui:      Implements k-means method for clustering.
%   agcgui:         Agglomerative clustering methods.
%   mbcgui:         Model-based clustering method for finding groups.

%   EDA GUI Toolbox, Wendy and Angel Martinez, November 2006,
%   martinezw@verizon.net.



ud = get(0,'userdata');

H.fig = figure('Tag','edagui',...
    'position',[150 150 726 524],...
    'resize','off',...
    'toolbar','none',...
    'menubar','none',...
    'numbertitle','off',...
    'name','Exploratory Data Analysis GUI');

%     'CloseRequestFcn','close(ud.guis)');

% put this in there to make sure the fonts look good with the later
% versions of matlab.
if strcmp(version('-release'),'14')
    set(0,'DefaultUicontrolFontname','Sans Serif');
end

%     'CloseRequestFcn','edagui(''close'')');

H.plots = [];
H.Z = [];

if ~isempty(ud)
    % Then something is there already. Add necessary handles to the
    % structure. 
    ud.guis = [ud.guis(:); H.fig];
else
    % Set the usual stuff and save in root.
    ud = userdata;
    set(0,'userdata',ud)
end

% set up all of the frames first.
uicontrol(H.fig, 'style','frame',...
    'position',[15 375 700 95]);

uicontrol(H.fig, 'style','frame',...
    'position',[15 220 700 150]);

uicontrol(H.fig,'style','frame',...
    'position',[15 120 700 95]);

uicontrol(H.fig,'style','frame',...
    'position',[15 5 700 110]);

%%%%%%% TEXT BOXES %%%%%%%%%%%%%%
% set up all of the text boxes
uicontrol(H.fig,'style','text',...
    'position',[220 485 300 27],...
    'fontweight','bold',...
    'fontsize',14,...
    'backgroundcolor',[.8 .8 .8],...
    'string','Exploratory Data Analysis')

% title text
uicontrol(H.fig,'style','text',...
    'position',[20 445 600 20],...
    'fontweight','bold',...
    'horizontalalignment','left',...
    'string','Set Up Data: These options can be used with all sections below.')

uicontrol(H.fig,'style','text',...
    'position',[20 345 600 20],...
    'fontweight','bold',...
    'horizontalalignment','left',...
    'string','Graphical EDA: Use these functions to visually explore your data set - both variables and observations.')

uicontrol(H.fig,'style','text',...
    'position',[20 190 600 20],...
    'fontweight','bold',...
    'horizontalalignment','left',...
    'string','Dimensionality Reduction: Use these functions to reduce the number of variables in your data set.')

uicontrol(H.fig,'style','text',...
    'position',[20 90 600 20],...
    'fontweight','bold',...
    'horizontalalignment','left',...
    'string','Search for Groups: Use these functions to search for groups or clusters.')


%%%%%%% BUTTONS  1st Frame  %%%%%%%%%%%%%%%%%%%%   
uicontrol(H.fig,'style','pushbutton',...
    'position',[20 415 170 23],...
    'string','LOAD DATA',...
    'tooltipstring','This will bring up the Load Data GUI',...
    'callback','loadgui')

uicontrol(H.fig,'style','text',...
    'position',[200 418 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Load the data and labels for class, cases, and variables.')

uicontrol(H.fig,'style','pushbutton',...
    'position',[20 385 170 23],...
    'string','TRANSFORM',...
    'tooltipstring','This will bring up the Transform Data GUI.',...
    'callback','transformgui')

uicontrol(H.fig,'style','text',...
    'position',[200 388 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','With this GUI, you can sphere the data and apply other common transforms.')


%%%%%%%%%  BUTTONS  2nd FRAME  %%%%%%%%%%%%%%%%%%%%%%

uicontrol(H.fig,'style','pushbutton',...
    'position',[20 327 170 23],...
    'string','GRAPHICS',...
    'tooltipstring','This will bring up the Graphical EDA GUI.',...
    'callback','gedagui')

uicontrol(H.fig,'style','text',...
    'position',[200 330 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Visualize using 2D/3D scatterplots, parallel coordinate plots, Andrews'' curves, scatterplot matrix.')

uicontrol(H.fig,'style','pushbutton',...
    'position',[20 301 170 23],...
    'string','SHAPES - UNIVARIATE',...
    'tooltipstring','This will bring up a GUI to explore single dimensions.',...
    'callback','univgui')

uicontrol(H.fig,'style','text',...
    'position',[200 304 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Construct boxplots, histograms, q-q plots to understand the distribution of single variables.')


uicontrol(H.fig,'style','pushbutton',...
    'position',[20 275 170 23],...
    'string','SHAPES - BIVARIATE',...
    'tooltipstring','This will bring up a GUI to explore two dimensions simultaneously.',...
    'callback','bivgui')

uicontrol(H.fig,'style','text',...
    'position',[200 278 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Explore two variables at a time with hexagonal binning, bivariate histograms, and polar smooths.')


uicontrol(H.fig,'style','pushbutton',...
    'position',[20 249 170 23],...
    'string','DATA TOURS',...
    'tooltipstring','This will bring up the GUI to do grand tours and the like.',...
    'callback','tourgui')

uicontrol(H.fig,'style','text',...
    'position',[200 252 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Search for structure using the grand tour and the permutation tour.')


uicontrol(H.fig,'style','pushbutton',...
    'position',[20 223 170 23],...
    'string','PROJECTION PURSUIT',...
    'tooltipstring','This will bring up the GUI to do projection pursuit.',...
    'callback','ppedagui')

uicontrol(H.fig,'style','text',...
    'position',[200 226 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Search for structure in 2-D using projection pursuit.')

%%%%%%%%%%%    BUTTONS - 3RD FRAME  %%%%%%%%%%%%%%%%%%%%%%5

uicontrol(H.fig,'style','pushbutton',...
    'position',[20 160 170 23],...
    'string','MULTIDIMENSIONAL SCALING',...
    'tooltipstring','This will bring up a GUI to do various flavors of MDS.',...
    'callback','mdsgui')

uicontrol(H.fig,'style','text',...
    'position',[200 163 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Reduce the dimensionality of your data using classical, metric, and nonmetric MDS.')

uicontrol(H.fig,'style','pushbutton',...
    'position',[20 130 170 23],...
    'string','DIMENSIONALITY REDUCTION',...
    'tooltipstring','This will bring up a GUI that allows one to reduce the dimensionality of the data before exploring further.',...
    'callback','dimredgui')

uicontrol(H.fig,'style','text',...
    'position',[200 133 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Reduce the dimensionality of your data using PCA, ISOMAP, and LLE.')

%%%%%%%%%%%%%5  BUTTONS - 4TH FRAME %%%%%%%%%%%%%%%%%%%%%%

uicontrol(H.fig,'style','pushbutton',...
    'position',[20 66 170 23],...
    'string','K-MEANS CLUSTERING',...
    'tooltipstring','This will bring up a GUI that runs k-means clustering.',...
    'callback','kmeansgui')

uicontrol(H.fig,'style','text',...
    'position',[200 69 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Partition the data into a specified number of groups.')

uicontrol(H.fig,'style','pushbutton',...
    'position',[20 38 170 23],...
    'string','AGGLOMERATIVE CLUSTERING',...
    'tooltipstring','This brings up the GUI that does various flavors of agglomerative clustering.',...
    'callback','agcgui')

uicontrol(H.fig,'style','text',...
    'position',[200 41 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Construct a hierarchy of nested partitions.')

uicontrol(H.fig,'style','pushbutton',...
    'position',[20 10 170 23],...
    'string','MODEL-BASED CLUSTERING',...
    'tooltipstring','This will bring up a GUI that does Model-Based Clustering - 9 finite mixture models.',...
    'callback','mbcgui')

uicontrol(H.fig,'style','text',...
    'position',[200 13 500 15],...
    'fontsize',9,...
    'horizontalalignment','left',...
    'string','Cluster your data based on probability density estimation (Gaussian finite mixtures).')

% Close button
uicontrol(H.fig,'style','pushbutton',...
    'position',[620 485 66 25],...
    'string','CLOSE',...
    'callback','delete(gcf)',...
    'tooltipstring','Push this button to close the GUI window.')



% Save Handles for THIS GUI in the UserData for this figure.
set(gcf,'userdata',H)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -