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) 2012 Chiyuan Zhang 00008 * Copyright (C) 2012 Chiyuan Zhang 00009 */ 00010 00011 #ifndef __CLUSTERINGEVALUATION_H__ 00012 #define __CLUSTERINGEVALUATION_H__ 00013 00014 #include <vector> 00015 00016 #include <shogun/evaluation/Evaluation.h> 00017 #include <shogun/labels/Labels.h> 00018 00019 namespace shogun 00020 { 00021 00024 class CClusteringEvaluation: public CEvaluation 00025 { 00026 public: 00028 CClusteringEvaluation(): CEvaluation() {} 00029 00031 virtual ~CClusteringEvaluation() {} 00032 00040 void best_map(CLabels* predicted, CLabels* ground_truth); 00041 00047 virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth) = 0; 00048 protected: 00058 int32_t find_match_count(SGVector<int32_t> l1, int32_t m1, SGVector<int32_t> l2, int32_t m2); 00059 00063 int32_t find_mismatch_count(SGVector<int32_t> l1, int32_t m1, SGVector<int32_t> l2, int32_t m2); 00064 }; 00065 00066 } // namespace shogun 00067 00068 #endif /* end of include guard: __CLUSTERINGEVALUATION_H__ */