A list,

How to understand the boundaries between fuzzy clustering objects, some are clear and some are fuzzy. When clustering involves fuzzy boundaries between things, fuzzy clustering analysis should be used. How to understand the “fuzziness” of fuzzy clustering: Suppose there are two sets respectively A and B, and there is A member A. The traditional classification concept A either belongs to A or B. In the concept of fuzzy clustering, A can be 0.3 belonging to A and 0.7 belonging to B, which is the “fuzziness” concept. There are two basic methods of fuzzy clustering analysis: systematic clustering and stepwise clustering. The system clustering method is similar to the density clustering algorithm, and the stepwise clustering method is the center point clustering method. Stepwise clustering method is a fuzzy clustering analysis method based on fuzzy division. It determines in advance how many categories the samples to be classified should be divided into, and then classifies them in accordance with the optimal principle. After several iterations, the classification is more reasonable. In the classification process, it can be considered that a sample belongs to a certain class with a certain degree of membership, and another class with a certain degree of membership. In this way, the sample is not explicitly in or out of a particular category. If there are n samples in the sample set to be divided into class C, his fuzzy partition matrix is C × N. The matrix has the following characteristics: ① The sum of the membership degree of each class is 1. ②. Every kind of fuzzy subset is not empty set.

Fuzzy C-means clustering algorithm (FCM). Among many fuzzy clustering algorithms, fuzzy C-mean (FCM) algorithm is the most widely used and successful. It obtains the membership degree of each sample point to all class centers by optimizing the objective function, and then automatically classifies the samples.

3. Principle of FCM algorithm

Suppose we have data set X, and we want to classify the data in X. If these data are divided into C classes, there will be c corresponding class centers as Ci, and each sample Xj belongs to a certain category of Ci and its membership degree is SET as Uij. Then define an FCM objective function and its constraints are as follows:





The objective function (Equation 1) is composed of the membership degree of the corresponding sample multiplied by the distance between the sample and various centers. Equation 2 is the constraint condition, that is, the sum of the membership degree of a sample belonging to all classes should be 1.

Type 1 m is a membership degree factor, generally is 2, | | Xj – Ci | | says Xj Euclidean distance to the center of Ci.

The smaller the objective function J is, the better. In order to obtain the minimum value of the objective function J, how to obtain the minimum value here will not be deduced.Blog.csdn.net/on2way/arti…

The iterative formula of Uij is:



The iterative formula of Ci is:



We find that Uij and Ci are interrelated, each contains the other, so the question is, the FCM algorithm starts with neither Uij nor Ci, so how do we solve it? Is very simple, at the beginning of the program when we will be randomly generated a Uij, as long as the value to meet the conditions, and then began to iteration, calculated by Uij Ci, the Ci and can calculate the Uij, repetition, the objective function in the process of J is changing all the time, crepe gradually to stability. So the algorithm converges to a better result when J is not changing.

Overview OF KFCM: An improved kernel based fuzzy C-means clustering algorithm. It maps points in the original space to feature space through kernel function. Considering that points in the original space cannot be divided by a linear function, it is transformed into a space of a higher dimension. A linear function can be found in this high-dimensional space, which is easy to divide the original data. This higher dimensional space is called the eigenspace. The inner product of a mapping function from lower to higher dimensions is called a kernel. An important reason for introducing kernels into machine learning is that when the dimension of the feature space is high and the computation of kernels is relatively small compared to the inner product computation in the feature space, it can improve computational efficiency. FCM clustering algorithm based on objective function has two major defects: on the one hand, it is sensitive to outliers and noises due to the constraint condition of membership degree sum of 1; On the other hand, it is an iterative descent algorithm, which makes its initial clustering center sensitive and difficult to converge to the global optimal. The KFCM algorithm improves the clustering performance and has better robustness to noise and outliers.

Ii. Source code

function varargout = MainGUI(varargin)
% MAINGUI M-file for MainGUI.fig
%      MAINGUI, by itself, creates a new MAINGUI or raises the existing
%      singleton*.
%
%      HKFCMPARA = MAINGUI returns the handle to a new MAINGUI or the handle to
%      the existing singleton*.
%
%      MAINGUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in MAINGUI.M with the given input arguments.
%
%      MAINGUI('Property'.'Value',...). creates anew MAINGUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before MainGUI_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to MainGUI_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one % instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Copyright 2002- 2003. The MathWorks, Inc.
% Edit the above text to modify the response to help MainGUI
% Last Modified by GUIDE v2. 5 10-May- 2005. 12:20:34

% Author: [email protected]
% Email: [email protected]
% URL:  http://genial.yculblog.com


% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @MainGUI_OpeningFcn, ...
                   'gui_OutputFcn',  @MainGUI_OutputFcn, ...
                   'gui_LayoutFcn', [],...'gui_Callback'[]);if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before MainGUI is made visible.
function MainGUI_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to MainGUI (see VARARGIN)

% Choose default command line output for MainGUI
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes MainGUI wait for user response (see UIRESUME)
% uiwait(handles.MainFig); % Date and time displayset(handles.timestr,'string',datestr(now,0));
htimer = timer('StartDelay'.1.'TimerFcn'.'htimestr=findall(0,''tag'', ''timestr''); set(htimestr,''string'',datestr(now,0)); '.'Period'.1.'ExecutionMode'.'fixedSpacing'.'tag'.'showtime');
start(htimer);



% --- Outputs from this function are returned to the command line.
function varargout = MainGUI_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes during object creation, after setting all properties.
function hslider_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hslider (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'[9. 9. 9.]);
end



% --- Executes during object creation, after setting all properties.
function hedit_fname_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hedit_fname (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'.'white');
end


% --- Executes during object creation, after setting all properties.
function hedit_heb_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hedit_heb (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'.'white');
end


% --- Executes during object creation, after setting all properties.
function hedit_xuhao_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hedit_xuhao (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'.'white');
end


% --- Executes during object creation, after setting all properties.
function hedit_zhishu_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hedit_zhishu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'.'white');
end


% --- Executes during object creation, after setting all properties.
function hedit_zuixiao_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hedit_zuixiao (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'.'white');
end



% --- Executes during object creation, after setting all properties.
function hedit_cishu_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hedit_cishu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'.'white');
end


% --- Executes during object creation, after setting all properties.
function hedit_leibie_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hedit_leibie (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'.'white');
end



% --- Executes during object creation, after setting all properties.
function hmenu_CreateFcn(hObject, eventdata, handles)
% hObject    handle to hmenu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0.'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor'.'white');
end
Copy the code

3. Operation results









Fourth, note

Version: 2014 a