X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=kmeans.h;fp=kmeans.h;h=97dfb681f49d865708a044a06a5a46e91bae8f5c;hb=a2cde58c1e72199498a2142983ef040dce36da10;hp=0000000000000000000000000000000000000000;hpb=3e8b80da722e11c72bce957e2f42a6e884dd02b6;p=mothur.git diff --git a/kmeans.h b/kmeans.h new file mode 100644 index 0000000..97dfb68 --- /dev/null +++ b/kmeans.h @@ -0,0 +1,32 @@ +// +// kmeans.h +// Mothur +// +// Created by SarahsWork on 12/4/13. +// Copyright (c) 2013 Schloss Lab. All rights reserved. +// + +#ifndef Mothur_kmeans_h +#define Mothur_kmeans_h + +#include "communitytype.h" + +/**************************************************************************************************/ + +class KMeans : public CommunityTypeFinder { + +public: + KMeans(vector >, int); + vector calcSilhouettes(vector< vector< double> >); + double calcCHIndex(vector< vector< double> >); + +private: + + int findSecondClosest(vector&, vector >&, map); + double calcScore(int sample, int partition, vector >&, map); + +}; + +/**************************************************************************************************/ + +#endif