How can the center be determined by the Kmeans method?
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Ansam Nazar
 el 24 de Jun. de 2020
  
    
    
    
    
    Respondida: Aakash Mehta
      
 el 24 de Jun. de 2020
            Hello
I am trying to use the Kmeans algorithm of the classification process to separate the diseases in the rays from the normal, but every time the colors resulting from the Kmeans process change. I want to know how I can confirm the colors resulting from each implementation so that each color is specific to a particular class in the xray.
indexes = kmeans(grayImage(:), numberOfClasses);
0 comentarios
Respuesta aceptada
  KSSV
      
      
 el 24 de Jun. de 2020
        [idx,C,D] = kmeans(grayImge(:),numberOfclasses) ; 
C is your cneter. 
Read about kmeans. You can your center along with the function. The output is random..the classe indices change for every run. 
Más respuestas (1)
  Aakash Mehta
      
 el 24 de Jun. de 2020
        Due to the random starting value of the kmeans algorithm you are getting the different results with each implementation.
In order to get the results closer in each implementation,
- Use the 'Start' property of kmeans algorithm. here, you can speecify the start points for your algorithm.so, each time kmeans algorithm starts from those points.
- Also increase the no of iterations using the 'MaxIter' property.
0 comentarios
Ver también
Categorías
				Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


