SHOGUN
v3.2.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2014 Parijat Mazumdar 00008 */ 00009 00010 #ifndef _MBKMEANS_H__ 00011 #define _MBKMEANS_H__ 00012 00013 00014 #include <stdio.h> 00015 #include <shogun/lib/common.h> 00016 #include <shogun/io/SGIO.h> 00017 #include <shogun/distance/Distance.h> 00018 #include <shogun/machine/DistanceMachine.h> 00019 00020 namespace shogun 00021 { 00022 class CKMeansMiniBatchImpl 00023 { 00024 public: 00033 static void minibatch_KMeans(int32_t k, CDistance* distance, int32_t batch_size, int32_t minib_iter, SGMatrix<float64_t> mus); 00034 00035 private: 00036 /* choose b integers between 0 and num-1 00037 * 00038 */ 00039 static SGVector<int32_t> mbchoose_rand(int32_t b, int32_t num); 00040 }; 00041 } 00042 #endif