Tópicos Especiais em Aprendizagem Reinaldo Bianchi Centro Universitário da FEI 2012.

Slides:



Advertisements
Apresentações semelhantes
Presenter’s Notes Some Background on the Barber Paradox
Advertisements

“Wh” Questions Perguntas com “Wh”
Chapter Six Pipelining
Chapter Five The Processor: Datapath and Control (Parte B: multiciclo)
“Conquista do Paraíso” “Conquest of Paradise”
Recommendations from 16 th SSC on MCT document on LBA-2.
Chapter 3Design & Analysis of Experiments 7E 2009 Montgomery 1.
Relative Pronouns Pronomes Relativos
MC Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
MC Prof. Paulo Cesar Centoducatte MC542 Organização de Computadores Teoria e Prática.
SIMPLE PRESENT TENSE.
DIRETORIA ACADÊMICA NÚCLEO DE CIÊNCIAS HUMANAS E ENGENHARIAS DISCIPLINA: INGLÊS FUNDAMENTAL - NOITE PROFESSOR: JOSÉ GERMANO DOS SANTOS PERÍODO LETIVO
DIRETORIA ACADÊMICA NÚCLEO DE CIÊNCIAS HUMANAS E ENGENHARIAS DISCIPLINA: INGLÊS FUNDAMENTAL - NOITE PROFESSOR: JOSÉ GERMANO DOS SANTOS PERÍODO LETIVO
Um pouco mais sobre modelos de objetos. Ray Path Categorization Ray Path Categorization. Nehab, D.; Gattass, M. Proceedings of SIBGRAPI 2000, Brazil,
A.4. Trabalhando com elementos de biblioteca STL – Standard Template Libraby Disponibiliza um conjunto de classes templates, provendo algoritmos eficientes.
Gilson Antonio Giraldi Laboratório Nacional de Computação Científica,
Segmentação II Paulo Sérgio Rodrigues PEL205. Processamento Global usando Grafos Para um seqüência de nós n 1,...., n k, sendo cada nó n i o sucessor.
Vetor da rede recíproca.
Aula 02.
Mais sobre classes Baseada no Livro: Deitel&Deitel - C++ How To program Cap. 7 Prentice Hall 1994 SCE 213 Programação Orientada a Objetos, ICMC - USP 2.
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Data Mining: Ferramenta JAVA
Uniform Resource Identifier (URI). Uniform Resource Identifiers Uniform Resource Identifiers (URI) ou Identificador de Recursos Uniforme provê um meio.
Because we were commissioned toGo…make disciples World Evangelism Fund Offering(date)
SECEX SECRETARIA DE COMÉRCIO EXTERIOR MINISTÉRIO DO DESENVOLVIMENTO, INDUSTRIA E COMÉRCIO EXTERIOR BRAZILIAN EXPORTS STATISTICAL DEPURATION SYSTEM Presentation.
Conquista do Paraíso Conquest of Paradise Cantado por:Dana Winner Cantado por: Dana Winner.
CARTOGRAPHIES OF SEGREGATION From Snapshots to Processes and Trajectories Flávia F. Feitosa (UFABC) Antônio Miguel V. Monteiro (INPE) XIV Brazilian Symposium.
Acção de Formação A Biblioteca Escolar: Leitura e Literacia no 2º e 3º ciclos do Ensino Básico e Secundário Centro de Formação Júlio Brandão
Indirect Object Pronouns - Pronomes Pessoais Complemento Indirecto
OER LIFE CYCLE Andrew Moore and Tessa Welch.
Sincronização com Locks. Locks É um mecanismo de sincronização de processos/threads em que estas devem ser programadas de modo que seus efeitos sobre.
INPE / CAP-315 Airam J. Preto, Celso L. Mendes Aula 30 (1) Empacotamento de Dados em MPI Tópicos: Buffer de Mensagem Empacotamento/Desempacotamento.
Thresholding, Otsu Trabalho 2 - CG.
Universidade de Brasília Laboratório de Processamento de Sinais em Arranjos 1 Adaptive & Array Signal Processing AASP Prof. Dr.-Ing. João Paulo C. Lustosa.
Avaliação Constituição dos grupos de trabalho:
Lecture 4 Pressure distribution in fluids. Pressure and pressure gradient. Hydrostatic pressure 1.
Lecture 2 Properties of Fluids Units and Dimensions 1.
Introdução à Criptografia Moderna – 2ª Lista de Exercícios
WELCOME TO MY WORLD (Bem-Vinda Ao Meu Mundo) WELCOME TO MY WORLD (Bem-Vinda Ao Meu Mundo)
Kiss and Say Goodbye Barry White This is got to be the saddest day of my life Esse vai ser o dia mais triste de minha vida I called you here today for.
Boy Meets Girl Waiting for a star to fall I hear your name whispered on the Wind Eu ouço o seu nome sussurrado no vento It’s a sound that makes me.
Instituto de Engenharia de Sistemas e Computadores Investigação e Desenvolvimento em Lisboa Understanding Epidemic Quorum Systems INESC-ID Lisbon/Technical.
Faculdade de Ciências Económicas e Empresariais Universidade Católica Portuguesa 15/09/2014Ricardo F Reis 6 th session: Financial Measures.
SOCORRO, AJUDA; ESTÃO A ASSASSINAR-NOS SOS, HELP; WE ARE BEING ASSASSINATED.
IEEE PES General Meeting, Tampa FL June 24-28, 2007 Conferência Brasileira de Qualidade de Energia Santos, São Paulo, Agosto 5-8, Chapter 5: Harmonic.
Aula Teórica 12 Equação de Bernoulli. Bernoulli’s Equation Let us consider a Stream - pipe such as indicated in the figure and an ideal fluid (without.
RIO DE JANEIRO STATE FELIPE P .– 7º D.
Curva de Remanso Direct Step Method.
Equação da Continuidade e Equação de Navier-Stokes
RELATÓRIO CEMEC 06 COMPARAÇÕES INTERNACIONAIS Novembro 2013.
Divisão Serviço da Hora Laboratório Primário de Tempo e Frequência 2010 SIM TFWG Workshop and Planning Meeting March 9 – 12 Lima, Peru. Time Scales Virtual.
Aula Teórica 18 & 19 Adimensionalização. Nº de Reynolds e Nº de Froude. Teorema dos PI’s , Diagrama de Moody, Equação de Bernoulli Generalizada e Coeficientes.
Unit l Verb to be.
VOCÊ JÁ FALA INGLÊS FLUENTEMENTE?
Transformações vetor x raster
O que mais sofremos ALBINO TEIXEIRA From what we suffer more.
Andressa Ribeiro do Amaral
IEEE PES General Meeting, Tampa FL June 24-28, 2007 Conferência Brasileira de Qualidade de Energia Santos, São Paulo, Agosto 5-8, Chapter 8: Procedure.
1 © 2005, 2007, 2012 André Luiz V. da Costa e Silva Equilibrio Metal-Escória em aço Si Mn André Luiz V da Costa e Silva 2012.
MAC Engenharia de Software Marco A. GerosaIME / USP Mais sobre análise e Outros Diagramas UML MAC0332 Engenharia de Software Marco Aurélio Gerosa.
Pesquisa Operacional aplicada à Gestão de Produção e Logística Prof. Eng. Junior Buzatto Case 3.
Visão geral do Aprendizado de máquina
SENOP Seminário Nacional de Operadores de Sistemas e de Instalações Elétricas Atualização Tecnológica como base para a Inovação nos Processos da Operação.
Sunday School Adolescents Theme: Evangelism.
Lei dos Grandes Números
Introduction to Machine learning
Introduction to density estimation Modelação EcoLÓGICA
Pesquisadores envolvidos Recomenda-se Arial 20 ou Times New Roman 21.
Tableau Assignment Living art.
Transcrição da apresentação:

Tópicos Especiais em Aprendizagem Reinaldo Bianchi Centro Universitário da FEI 2012

4a. Aula Parte B

O algoritmo K-means

K-Means n Algoritmo muito conhecido para agrupamento (clustering) de padrões. n Usado quando se pode definir o número de agrupamentos: –Escolha o número de agrupamentos desejado. –Escolha centros e membros dos agrupamentos de modo a minimizar o erro. –Não pode ser feito por busca: muitos parâmetros.

K-Means n Algoritmo: –Fixe os centros dos agrupamentos. –Aloque os pontos para o agrupamento mais próximo. –Recalcule os centros dos clusters, como sendo a média dos pontos que ele representa. –Repita até que os centros parem de se mover.

K-Means n Pode ser usado para qualquer atributo para o qual se pode calcular uma distância…

Clustering n Partitioning Clustering Approach: –a typical clustering analysis approach via partitioning data set iteratively –construct a partition of a data set to produce several non-empty clusters (usually, the number of clusters given in advance) –in principle, partitions achieved via minimising the sum of squared distance in each cluster

Clustering n Given a K, find a partition of K clusters to optimise the chosen partitioning criterion: –global optimal: exhaustively enumerate all partitions –Heuristic method: K-means algorithm (MacQueen67): each cluster is represented by the center of the cluster and the algorithm converges to stable centers of clusters.

Algorithm n Initialisation: set seed points n Assign each object to the cluster with the nearest seed point; n Compute seed points as the centroids of the clusters of the current partition (the centroid is the centre, i.e., mean point, of the cluster) n Go back to Step 1), n stop when no more new assignment Given the cluster number K, the K-means algorithm is carried out in three steps:

Example n Suppose we have 4 types of medicines and each has two attributes: –pH and –weight index. n Our goal is to group these objects into K=2 group of medicine.

Example AB C D MedicineWeightpH-Index A11 B21 C43 D54

Step 1: Use initial seed points for partitioning Assign each object to the cluster with the nearest seed point Euclidean distance

Step 2: Compute new centroids of the current partition Knowing the members of each cluster, now we compute the new centroid of each group based on these new memberships.

Step 2: Renew membership based on new centroids 14 Compute the distance of all objects to the new centroids Assign the membership to objects

Step 3: Repeat the first two steps until its convergence Knowing the members of each cluster, now we compute the new centroid of each group based on these new memberships.

Repeat the first two steps until its convergence Compute the distance of all objects to the new centroids Stop due to no new assignment

K-means Demo 17 1.User set up the number of clusters theyd like. (e.g. k=5)

K-means Demo 18 1.User set up the number of clusters theyd like. (e.g. K=5) 2.Randomly guess K cluster Center locations

K-means Demo 19 1.User set up the number of clusters theyd like. (e.g. K=5) 2.Randomly guess K cluster Center locations 3.Each data point finds out which Center its closest to. (Thus each Center owns a set of data points)

K-means Demo 20 1.User set up the number of clusters theyd like. (e.g. K=5) 2.Randomly guess K cluster centre locations 3.Each data point finds out which centre its closest to. (Thus each Center owns a set of data points) 4.Each centre finds the centroid of the points it owns

K-means Demo 21 1.User set up the number of clusters theyd like. (e.g. K=5) 2.Randomly guess K cluster centre locations 3.Each data point finds out which centre its closest to. (Thus each centre owns a set of data points) 4.Each centre finds the centroid of the points it owns 5.…and jumps there

K-means Demo 22 1.User set up the number of clusters theyd like. (e.g. K=5) 2.Randomly guess K cluster centre locations 3.Each data point finds out which centre its closest to. (Thus each centre owns a set of data points) 4.Each centre finds the centroid of the points it owns 5.…and jumps there 6.…Repeat until terminated!

Exemplo K-means no Matlab 23

Exemplo k-means no iPad 24

Relevant Issues n Efficient in computation –O(tKn), where n is number of objects, K is number of clusters, and t is number of iterations. Normally, K, t << n. n Local optimum –sensitive to initial seed points –converge to a local optimum that may be unwanted solution

Relevant Issues n Other problems –Need to specify K, the number of clusters, in advance –Unable to handle noisy data and outliers (K-Medoids algorithm) –Not suitable for discovering clusters with non-convex shapes –Applicable only when mean is defined, then what about categorical data? (K-mode algorithm)

Cluster Validity n With different initial conditions, the K- means algorithm may result in different partitions for a given data set. n Which partition is the best one for the given data set? n In theory, no answer to this question as there is no ground-truth available in unsupervised learning

Cluster Validity n Example: the ratio of the total between- cluster to the total within-cluster distances: –Between-cluster distance (BCD): the distance between means of two clusters –Within-cluster distance (WCD): sum of all distance between data points and the mean in a specific cluster –A large ratio of BCD:WCD suggests good compactness inside clusters and good separability among different clusters!

Conclusion n K-means algorithm is a simple yet popular method for clustering analysis n There are several variants of K-means to overcome its weaknesses –K-Medoids: resistance to noise and/or outliers –K-Modes: extension to categorical data clustering analysis –CLARA: dealing with large data sets –Mixture models (EM algorithm): handling uncertainty of clusters

E no Matlab? 30

E no Matlab? n Sintaxe: –IDX = kmeans(X,k) n Descrição: –Partitions the points in the n-by-p data matrix X into k clusters. –This iterative partitioning minimizes the sum, over all clusters, of the within-cluster sums of point-to-cluster-centroid distances. –returns an n-by-1 vector IDX containing the cluster indices of each point.

Ransac

RANSAC n RANdom SAmple Consensus. n Alternativa para procurar bons pontos para gerar o ajuste da reta. n Idéia: –Escolha um subconjunto uniforme de maneira aleatória (pontos de suporte). –Ajuste a reta para esses pontos. –Tudo que se encontra longe do ajuste é ruído. –Repita muitas vezes e escolha o melhor ajuste.

RANSAC n Problemas: –Quantas vezes executar? O mínimo possível… –Qual o tamanho do subconjunto? O menor possível… –O que é próximo? Basta estimar a ordem de magnitude… –O que é um bom ajuste? Um que o número de pontos próximos é tão grande que seja improvável que todos sejam ruído.

RANSAC – Example 11 supports 4 supports How many samples do we need to draw?

RANSAC – How many samples n How many samples we need to ensure with a probability p, that at least one of the random samples of S points is free from outliners. (w: inlier probability)

The Ransac Song 38

Conclusão

n Terminamos de ver os métodos de aprendizado de máquina puramente estatísticos. –K-NN, Mínimos Quadrados, PCA, LDA, k- Means n A partir da próxima aula veremos métodos não mais estatísticos, mas probabilísticos. 40

Links n Exemplos extraidos de: – 11/materials/slides/K-means.ppt 41