Home | Develop | Download | Contact
FuncClusteringKmeans.hpp
1 /*
2  * FuncClusteringKmeans.hpp
3  *
4  * Copyright 2018 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  */
22 
30 #ifndef __PDS_FUNCCLUSTERINGKMEANS_HPP__
31 #define __PDS_FUNCCLUSTERINGKMEANS_HPP__
32 
33 #include <Pds/Ra>
34 #include <Pds/IterationConf>
35 #include <vector>
36 
46 namespace Pds{
47 
51 namespace Clustering{
52 
53 
71  double CostKmeans(const Pds::Matrix &X,const Pds::Matrix &C);
72 
73 
82  std::vector<double> KmeansSigma( const Pds::Matrix &X,
83  const Pds::Array<unsigned int> &ID);
84 
119  Pds::Matrix Kmeans( Pds::IterationConf &Conf,
120  const std::vector<Pds::Matrix> &IMG,
121  unsigned int K,
122  Pds::Array<unsigned int> &IDMAP);
123 
124 
149  Pds::Matrix Kmeans( Pds::IterationConf &Conf,
150  const Pds::Matrix &X,
151  const Pds::Matrix &C0,
152  Pds::Array<unsigned int> &ID);
153 
178  Pds::Matrix Kmeans( Pds::IterationConf &Conf,
179  const Pds::Matrix &X,
180  unsigned int K,
181  Pds::Array<unsigned int> &ID);
182 
203  Pds::Matrix Kmeans( Pds::IterationConf &Conf,
204  const Pds::Matrix &X,
205  unsigned int K);
206 
213 } // namespace Ml
214 
215 } // namespace Pds
216 
217 
222 #endif /* __PDS_FUNCCLUSTERINGKMEANS_HPP__ */
La clase tipo Pds::IterationConf . Esta clase genera una matriz de Nlin lineas y 1 columna....
Pds::Matrix Kmeans(Pds::IterationConf &Conf, const std::vector< Pds::Matrix > &IMG, unsigned int K, Pds::Array< unsigned int > &IDMAP)
Calculo de los centroides de las muestras (pixels) en std::vector<Pds::Matrix> IMG.
double CostKmeans(const Pds::Matrix &X, const Pds::Matrix &C)
Función de costo de Kmeans.
std::vector< double > KmeansSigma(const Pds::Matrix &X, const Pds::Array< unsigned int > &ID)
Nombre de espacio para Pds (Procesamiento Digital de Senales)

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed