Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Matlab program of fuzzy c means final-edition

17,489 views

Published on

This slide is aim to introduce a p

Published in: Technology
  • hi,
    i could not find the loaddata_sparse.m and the other file?
    how can i find these two files?
    thanks alot.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Matlab program of fuzzy c means final-edition

  1. 1. C - m e a n s i n m a t l a b
  2. 2. K-Means Basic K-means algorithm Select K points as initial centroids. Repeat Form K clusters by assigning each point to its closest centroid. Recompute the centroid of each cluster. Until Centroids do not change.
  3. 3. Basic Fuzzy C-Means algorithm Allow an object to belong to a set with a degree of membership between 0 to 1. Fuzzy Clustering Fuzzy C-Means Select an initial fuzzy pseudo-partition, i.e., assign values to all the Wij. Repeat Compute the centroid of each cluster using the fuzzy pseudo-partition. Recompute the fuzzy pseudo-partition, i.e. the Wij. Until The centroids do not change.
  4. 4. Why I did Lack of programs of high quality Single distance function Poor effect Nonsupport of sparse data
  5. 5. What I did Matlab R2009b Fuzzy C-means Some Distance Functions Variable Neighborhood Search Support of sparse data and initialization Method
  6. 6. Run_fcm.m Loaddata_sparse.m Loaddata_dense.m Initialize.m Initcenter.m Iterate.m Run_vns.m To deal with input parameters and Call other functions To load data of sparse or dense Both of the files should be ASCII data To preprocess data based on different distance functions for further analysis To initialize centroids by random or given to start the algorithm The core of the Algorithm including updating membership matrix and centroids and computing objective function To proceed VNS method
  7. 7. Run_fcm Loaddata_sparse Loaddata_sparse Initialize Initcenter Iterate Dismat0 Distance_euc Distance_cos Output Run_vns Output Structure of the program
  8. 8. Deal with parameter S To attain a satisfied result, many input parameters are necessary . Such as Distance function File style Stop condition Exponent Max iteration Threshold Center type The number of class Use VNS method or not Although there times when we do not specify every parameters, since part of them could be defaults function [matrixu, centroid, niter, obj,vnsobj] = run_fcm(nclass,fname,filesty, ) varargin internal.stats.getargs [matrixu,centroid,niter,obj]=run_fcm(6,'la12.mat','sparse','expo',2,'distance','cosine','vns','on');
  9. 9. Read and store sparse data With the help of matlab function--------sparse() If we initialize a large matrix to store the whole data, that would be … Sparse data can not be Loaded directly Fopen() + Fgetl() + Strtok() + Spalloc() Out of memory ! My solution is to cut them into pieces and then make them up.
  10. 10. Different distance functions
  11. 11. Sparse data calculation When data stored as sparse matrix, what kind of calculation could it do? Basic operation between row vectors and another numerical value Dot product between row vectors and another sparse vector Ergodic of column vectors with zeros displayed Sum-of-squares of row vectors Logarithm of row vectors
  12. 12. Variable Neighborhood Search
  13. 13. THANKS THANKS Chen Liu [email_address]

×