CSIE Dept., National Taiwan Univ., Taiwan

Slides:



Advertisements
Similar presentations
Clustering. How are we doing on the pass sequence? Pretty good! We can now automatically learn the features needed to track both people But, it sucks.
Advertisements

K-means Clustering Given a data point v and a set of points X,
CMPUT 615 Applications of Machine Learning in Image Analysis
Clustering.
Unsupervised Learning Clustering K-Means. Recall: Key Components of Intelligent Agents Representation Language: Graph, Bayes Nets, Linear functions Inference.
Clustering Basic Concepts and Algorithms
PARTITIONAL CLUSTERING
Yasuhiro Fujiwara (NTT Cyber Space Labs)
Clustering & image segmentation Goal::Identify groups of pixels that go together Segmentation.
Image Indexing and Retrieval using Moment Invariants Imran Ahmad School of Computer Science University of Windsor – Canada.
Communities in Heterogeneous Networks Chapter 4 1 Chapter 4, Community Detection and Mining in Social Media. Lei Tang and Huan Liu, Morgan & Claypool,
CSE 589 Applied Algorithms Spring 1999 Image Compression Vector Quantization Nearest Neighbor Search.
© University of Minnesota Data Mining for the Discovery of Ocean Climate Indices 1 CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance.
Prénom Nom Document Analysis: Data Analysis and Clustering Prof. Rolf Ingold, University of Fribourg Master course, spring semester 2008.
Clustering Color/Intensity
© 2005, it - instituto de telecomunicações. Todos os direitos reservados. Gerhard Maierbacher Scalable Coding Solutions for Wireless Sensor Networks IT.
Cluster Analysis (1).
Parallel K-Means Clustering Based on MapReduce The Key Laboratory of Intelligent Information Processing, Chinese Academy of Sciences Weizhong Zhao, Huifang.
K-means Clustering. What is clustering? Why would we want to cluster? How would you determine clusters? How can you do this efficiently?
EE462 MLCV 1 Lecture 3-4 Clustering (1hr) Gaussian Mixture and EM (1hr) Tae-Kyun Kim.
Clustering with Bregman Divergences Arindam Banerjee, Srujana Merugu, Inderjit S. Dhillon, Joydeep Ghosh Presented by Rohit Gupta CSci 8980: Machine Learning.
Radial Basis Function Networks
CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Image Segmentation by Clustering using Moments by, Dhiraj Sakumalla.
PCA & LDA for Face Recognition
Radial Basis Function Networks
Clustering methods Course code: Pasi Fränti Speech & Image Processing Unit School of Computing University of Eastern Finland Joensuu,
COMMON EVALUATION FINAL PROJECT Vira Oleksyuk ECE 8110: Introduction to machine Learning and Pattern Recognition.
Apache Mahout. Mahout Introduction Machine Learning Clustering K-means Canopy Clustering Fuzzy K-Means Conclusion.
Image segmentation Prof. Noah Snavely CS1114
Chapter 9 DTW and VQ Algorithm  9.1 Basic idea of DTW  9.2 DTW algorithm  9.3 Basic idea of VQ  9.4 LBG algorithm  9.5 Improvement of VQ.
MACHINE LEARNING 8. Clustering. Motivation Based on E ALPAYDIN 2004 Introduction to Machine Learning © The MIT Press (V1.1) 2  Classification problem:
Unsupervised Learning. Supervised learning vs. unsupervised learning.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Project 11: Determining the Intrinsic Dimensionality of a Distribution Okke Formsma, Nicolas Roussis and Per Løwenborg.
Ensemble Color Segmentation Spring 2009 Ben-Gurion University of the Negev.
1  The Problem: Consider a two class task with ω 1, ω 2   LINEAR CLASSIFIERS.
CSSE463: Image Recognition Day 23 Midterm behind us… Midterm behind us… Foundations of Image Recognition completed! Foundations of Image Recognition completed!
Machine Learning Queens College Lecture 7: Clustering.
Compiled By: Raj Gaurang Tiwari Assistant Professor SRMGPC, Lucknow Unsupervised Learning.
Flat clustering approaches
Chapter 13 (Prototype Methods and Nearest-Neighbors )
Vector Quantization CAP5015 Fall 2005.
Lloyd Algorithm K-Means Clustering. Gene Expression Susumu Ohno: whole genome duplications The expression of genes can be measured over time. Identifying.
Iterative K-Means Algorithm Based on Fisher Discriminant UNIVERSITY OF JOENSUU DEPARTMENT OF COMPUTER SCIENCE JOENSUU, FINLAND Mantao Xu to be presented.
Given a set of data points as input Randomly assign each point to one of the k clusters Repeat until convergence – Calculate model of each of the k clusters.
Clustering Approaches Ka-Lok Ng Department of Bioinformatics Asia University.
Clustering Usman Roshan CS 675. Clustering Suppose we want to cluster n vectors in R d into two groups. Define C 1 and C 2 as the two groups. Our objective.
Color Image Segmentation Mentor : Dr. Rajeev Srivastava Students: Achit Kumar Ojha Aseem Kumar Akshay Tyagi.
Computacion Inteligente Least-Square Methods for System Identification.
May 2003 SUT Color image segmentation – an innovative approach Amin Fazel May 2003 Sharif University of Technology Course Presentation base on a paper.
Cluster Analysis What is Cluster Analysis? Types of Data in Cluster Analysis A Categorization of Major Clustering Methods Partitioning Methods.
COMP24111 Machine Learning K-means Clustering Ke Chen.
CSIE Dept., National Taiwan Univ., Taiwan
LINEAR CLASSIFIERS The Problem: Consider a two class task with ω1, ω2.
Clustering Usman Roshan.
CSSE463: Image Recognition Day 21
Ke Chen Reading: [7.3, EA], [9.1, CMB]
Clustering and Segmentation
Basic Algorithms Christina Gallner
REMOTE SENSING Multispectral Image Classification
CSSE463: Image Recognition Day 23
Ke Chen Reading: [7.3, EA], [9.1, CMB]
Problem Definition Input: Output: Requirement:
Foundation of Video Coding Part II: Scalar and Vector Quantization
CSSE463: Image Recognition Day 23
Image Segmentation.
CSSE463: Image Recognition Day 23
EM Algorithm and its Applications
Clustering Usman Roshan CS 675.
Presentation transcript:

CSIE Dept., National Taiwan Univ., Taiwan 2017/4/23 Machine Learning K-means Clustering K-means Clustering J.-S. Roger Jang (張智星) CSIE Dept., National Taiwan Univ., Taiwan http://mirlab.org/jang jang@mirlab.org ... In this talk, we are going to apply two neural network controller design techniques to fuzzy controllers, and construct the so-called on-line adaptive neuro-fuzzy controllers for nonlinear control systems. We are going to use MATLAB, SIMULINK and Handle Graphics to demonstrate the concept. So you can also get a preview of some of the features of the Fuzzy Logic Toolbox, or FLT, version 2.

Problem Definition Input: Output: Requirement: 2017/4/23 Problem Definition Input: : A data set in d-dim. space m: Number of clusters (we avoid using k here to avoid confusion with other summation indices…) Output: m cluster centers: Assignment of each xi to one of the m clusters: Requirement: The output should minimize the objective function… 2017/4/23

Objective Function Objective function (aka. distortion) 2017/4/23 Objective Function Objective function (aka. distortion) d*m (for matrix C) plus n*m (for matrix A) tunable parameters with certain constraints on matrix A Np-hard problem if exact solution is required 2017/4/23

Strategy for Minimization 2017/4/23 Strategy for Minimization Observation J(X; C, A) is parameterized by C and A Joint optimization is hard, but separate optimization with respect to C and A is easy Strategy Fix C and find the best A to minimize J(X; C, A) Fix A and find the best C to minimize J(X; C, A) Iterate the above two steps until convergence Properties The approach is also known as “coordinate optimization” 2017/4/23

Task 1: How to Find Assignment A? 2017/4/23 Task 1: How to Find Assignment A? Goal Find A to minimize J(X; C, A) with fixed C Facts Analytic (close-form) solution exists: 2017/4/23

Task 2: How to Find Centers in C? 2017/4/23 Task 2: How to Find Centers in C? Goal Find C to minimize J(X; C, A) with fixed A Facts Analytic (close-form) solution exists: 2017/4/23

Algorithm Initialize Select initial m cluster centers Find clusters 2017/4/23 Algorithm Initialize Select initial m cluster centers Find clusters For each xi, assign the cluster with nearest center  Find A to minimize J(X; C, A) with fixed C Find centers Recompute each cluster center as the mean of data in the cluster  Find C to minimize J(X; C, A) with fixed A Stopping criterion Stop if clusters stay the same. Otherwise go to step 2. 2017/4/23

Stopping Criteria Two stopping criteria Facts 2017/4/23 Stopping Criteria Two stopping criteria Repeating until no more change in cluster assignment Repeat until distortion improvement is less than a threshold Facts Convergence is assured since J is reduced repeatedly. 2017/4/23

Properties of K-means Clustering 2017/4/23 Properties of K-means Clustering K-means can find the approximate solution efficiently. The distortion (squared error) is a monotonically non-increasing function of iterations. The goal is to minimize the square error, but it could end up in a local minimum. To increase the probability of finding the global minimum, try to start k-means with different initial conditions. “Cluster validation” refers to a set of methods which try to determine the best value of k. Other distance measures can be used in place of the Euclidean distance, with corresponding change in center identification. 2017/4/23

2017/4/23 K-means Snapshots 2017/4/23

Demo of K-means Clustering 2017/4/23 Demo of K-means Clustering Toolbox download Utility Toolbox Machine Learning Toolbox Demos kMeansClustering.m vecQuantize.m 2017/4/23

Demos of K-means Clustering 2017/4/23 Demos of K-means Clustering kMeansClustering.m 2017/4/23

Application: Image Compression 2017/4/23 Application: Image Compression Goal Convert a image from true colors to indexed colors with minimum distortion. Steps Collect data from a true-color image Perform k-means clustering to obtain cluster centers as the indexed colors Compute the compression rate 2017/4/23

True-color vs. Index-color Images True-color image Each pixel is represented by a vector of 3 components [R, G, B] Index-color image Each pixel is represented by an index into a color map 2017/4/23

Example: Image Compression 2017/4/23 Example: Image Compression Original image Dimension: 480x640 Data size: 480*640*3*8 bits = 0.92 MB 2017/4/23

Example: Image Compression 2017/4/23 Example: Image Compression Some quantities of the k-means clustering n = 480x640 = 307200 (no of vectors to be clustered) d = 3 (R, G, B) m = 256 (no. of clusters) 2017/4/23

Example: Image Compression 2017/4/23 Example: Image Compression 2017/4/23

Example: Image Compression 2017/4/23 Example: Image Compression 2017/4/23

Indexing Techniques Indexing of pixels for an 2*3*3 image Related command: reshape X = imread('annie19980405.jpg'); image(X); [m, n, p]=size(X); index=reshape(1:m*n*p, m*n, 3)'; data=double(X(index)); 13 15 17 14 16 18 7 9 11 8 10 12 1 3 5 2 4 6 2017/4/23

Code X = imread('annie19980405.jpg'); image(X) [m, n, p]=size(X); 2017/4/23 Code X = imread('annie19980405.jpg'); image(X) [m, n, p]=size(X); index=reshape(1:m*n*p, m*n, 3)'; data=double(X(index)); maxI=6; for i=1:maxI centerNum=2^i; fprintf('i=%d/%d: no. of centers=%d\n', i, maxI, centerNum); center=kMeansClustering(data, centerNum); distMat=distPairwise(center, data); [minValue, minIndex]=min(distMat); X2=reshape(minIndex, m, n); map=center'/255; figure; image(X2); colormap(map); colorbar; axis image; end 2017/4/23

Extensions to Image Compression Extensions to image data compression via clustering Use blocks as the unit for VQ (see exercise) Smart indexing by creating the indices of the blocks of page 1 first. True-color image display (No way to display the compressed image as an index-color image) Use separate code books for RGB What are the corresponding compression ratios? 2017/4/23

Extension to Circle Finding How to find circles via a k-means like algorithm? 2017/4/23

2017/4/23