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

📄 fcmdemo.html

📁 模糊控制工具箱,很好用的,有相应的说明文件,希望对大家有用!
💻 HTML
字号:
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">   <head>      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <!--This HTML is auto-generated from an M-file.To make changes, update the M-file and republish this document.      -->      <title>Fuzzy C-means Clustering</title>      <meta name="generator" content="MATLAB 7.0.4">      <meta name="date" content="2005-03-16">      <meta name="m-file" content="fcmdemo_codepad"><style>body {  background-color: white;  margin:10px;}h1 {  color: #990000;   font-size: x-large;}h2 {  color: #990000;  font-size: medium;}p.footer {  text-align: right;  font-size: xx-small;  font-weight: lighter;  font-style: italic;  color: gray;}pre.codeinput {  margin-left: 30px;}span.keyword {color: #0000FF}span.comment {color: #228B22}span.string {color: #A020F0}span.untermstring {color: #B20000}span.syscmd {color: #B28C00}pre.showbuttons {  margin-left: 30px;  border: solid black 2px;  padding: 4px;  background: #EBEFF3;}pre.codeoutput {  color: gray;  font-style: italic;}pre.error {  color: red;}/* Make the text shrink to fit narrow windows, but not stretch too far in wide windows.  On Gecko-based browsers, the shrink-to-fit doesn't work. */ p,h1,h2,div {  /* for MATLAB's browser */  width: 600px;  /* for Mozilla, but the "width" tag overrides it anyway */  max-width: 600px;  /* for IE */  width:expression(document.body.clientWidth > 620 ? "600px": "auto" );}    </style></head>   <body>      <h1>Fuzzy C-means Clustering</h1>      <introduction>         <p>This demo illustrates performing fuzzy c-means clustering on 2-dimensional data.</p>         <p>Clustering of numerical data forms the basis of many classification and system modeling algorithms. The purpose of clustering            is to identify natural groupings of data from a large data set to produce a concise representation of a system's behavior.         </p>      </introduction>      <h2>Contents</h2>      <div>         <ul>            <li><a href="#1">What is Fuzzy c-means clustering?</a></li>            <li><a href="#2">What does this demo illustrate?</a></li>         </ul>      </div>      <h2>What is Fuzzy c-means clustering?<a name="1"></a></h2>      <p>Fuzzy c-means (FCM) is a data clustering technique wherein a dataset is grouped into n clusters with every datapoint in the         dataset belonging to every cluster to a certain degree. For example, a certain datapoint that lies close to the center of         a cluster will have a high degree of belonging or membership to that cluster and another datapoint that lies far away from         the center of a cluster will have a low degree of belonging or membership to that cluster.      </p>      <p>The Fuzzy Logic Toolbox command line function, fcm, starts with an initial guess for the cluster centers, which are intended         to mark the mean location of each cluster. The initial guess for these cluster centers is most likely incorrect. Additionally,         fcm assigns every data point a membership grade for each cluster. By iteratively updating the cluster centers and the membership         grades for each data point, fcm iteratively moves the cluster centers to the right location within a data set. This iteration         is based on minimizing an objective function that represents the distance from any given data point to a cluster center weighted         by that data point's membership grade.      </p>      <h2>What does this demo illustrate?<a name="2"></a></h2>      <p>This demo displays a GUI window and lets you try out various parameter settings for the fuzzy c-means algorithm and observe         the clustering for 2-D data. You can choose a sample data set and an arbitary number of clusters from the drop down menus         on the right, and then click "Start" to start the fuzzy clustering process.      </p><pre class="codeinput">fcmdemo</pre><img vspace="5" hspace="5" src="fcmdemo_codepad_01.png"> <p>fcm is a command line function whose output is a list of n cluster centers and n membership grades for each data point. You         can use the information returned by fcm to build a fuzzy inference system by creating membership functions to represent the         fuzzy qualities of each cluster.      </p>      <p>Here is the underlying code that performs the clustering. "n_clusters" refers to the number of clusters set by the user in         the GUI and "data" refers to the dataset currently being visualized in the GUI. The function FCM performs the fuzzy c-means         clustering on the data and in this case seperates it into 3 clusters.      </p><pre class="codeinput">n_clusters = 3;[center,U,obj_fcn] = fcm(data, n_clusters);</pre><p>You can also tune the 3 optional parameters for the FCM algorithm (exponent, maximum number of iterations and minimum amount         of improvement) from the demo GUI and observe how the clustering process is altered consequently.      </p>      <p>Once the clustering is done, you can select one of the clusters by clicking on it and view the membership function surface         by clicking the "Plot MF" button. (Note that "Plot MF" is slow because MATLAB is using the command "griddata" to do interpolation         among all data points.) To get a better viewing angle, click and drag inside the figure to rotate the MF surface.      </p>      <p class="footer"><br>         Published with MATLAB&reg; 7.0.4<br></p>      <!--##### SOURCE BEGIN #####%% Fuzzy C-means Clustering% This demo illustrates performing fuzzy c-means clustering on% 2-dimensional data.%% Clustering of numerical data forms the basis of many classification and% system modeling algorithms. The purpose of clustering is to identify % natural groupings of data from a large data set to produce a concise % representation of a system's behavior. %%% What is Fuzzy c-means clustering? %% Fuzzy c-means (FCM) is a data clustering technique wherein a dataset is% grouped into n clusters with every datapoint in the dataset belonging to% every cluster to a certain degree. For example, a certain datapoint that% lies close to the center of a cluster will have a high degree of% belonging or membership to that cluster and another datapoint that lies% far away from the center of a cluster will have a low degree of belonging% or membership to that cluster.%% The Fuzzy Logic Toolbox command line function, fcm, starts with an initial % guess for the cluster centers, which are intended to mark the mean % location of each cluster. The initial guess for these cluster centers is % most likely incorrect. Additionally, fcm assigns every data point a % membership grade for each cluster. By iteratively updating the cluster % centers and the membership grades for each data point, fcm iteratively % moves the cluster centers to the right location within a data set. This % iteration is based on minimizing an objective function that represents % the distance from any given data point to a cluster center weighted by % that data point's membership grade.%% What does this demo illustrate?% This demo displays a GUI window and lets you try out various parameter% settings for the fuzzy c-means algorithm and observe the clustering for % 2-D data. You can choose a sample data set and an arbitary number of % clusters from the drop down menus on the right, and then click "Start" to % start the fuzzy clustering process.%fcmdemo%% % fcm is a command line function whose output is a list of n cluster centers% and n membership grades for each data point. You can use the % information returned by fcm to build a fuzzy inference system by creating % membership functions to represent the fuzzy qualities of each cluster.%% Here is the underlying code that performs the clustering. "n_clusters" % refers to the number of clusters set by the user in the GUI and "data" % refers to the dataset currently being visualized in the GUI. The function% FCM performs the fuzzy c-means clustering on the data and in this case % seperates it into 3 clusters. n_clusters = 3; [center,U,obj_fcn] = fcm(data, n_clusters);%%% You can also tune the 3 optional parameters for the FCM algorithm % (exponent, maximum number of iterations and minimum amount of % improvement) from the demo GUI and observe how the clustering process is % altered consequently.%%%% Once the clustering is done, you can select one of the clusters by % clicking on it and view the membership function surface by clicking the % "Plot MF" button. (Note that "Plot MF" is slow because MATLAB is using % the command "griddata" to do interpolation among all data points.) To get % a better viewing angle, click and drag inside the figure to rotate the % MF surface.%##### SOURCE END #####-->   </body></html>

⌨️ 快捷键说明

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