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) 1999-2009 Soeren Sonnenburg 00008 * Written (W) 1999-2008 Gunnar Raetsch 00009 * Written (W) 2011-2012 Heiko Strathmann 00010 * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society 00011 */ 00012 00013 #ifndef _BINARY_LABELS__H__ 00014 #define _BINARY_LABELS__H__ 00015 00016 #include <shogun/lib/common.h> 00017 #include <shogun/io/File.h> 00018 #include <shogun/labels/LabelTypes.h> 00019 #include <shogun/labels/DenseLabels.h> 00020 00021 namespace shogun 00022 { 00023 class CFile; 00024 class CDenseLabels; 00025 00036 class CBinaryLabels : public CDenseLabels 00037 { 00038 public: 00040 CBinaryLabels(); 00041 00046 CBinaryLabels(int32_t num_labels); 00047 00048 #if !defined(SWIGJAVA) && !defined(SWIGCSHARP) 00049 00054 CBinaryLabels(SGVector<int32_t> src); 00055 00061 CBinaryLabels(SGVector<int64_t> src); 00062 #endif 00063 00071 CBinaryLabels(SGVector<float64_t> src, float64_t threshold=0.0); 00072 00077 CBinaryLabels(CFile* loader); 00078 00085 virtual void ensure_valid(const char* context=NULL); 00086 00091 virtual ELabelType get_label_type() const; 00092 00111 void scores_to_probabilities(float64_t a=0, float64_t b=0); 00112 00114 virtual const char* get_name() const { return "BinaryLabels"; } 00115 }; 00116 } 00117 #endif