SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
labels
BinaryLabels.h
浏览该文件的文档.
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 3 of the License, or
5
* (at your option) any later version.
6
*
7
* Written (W) 1999-2009 Soeren Sonnenburg
8
* Written (W) 1999-2008 Gunnar Raetsch
9
* Written (W) 2011-2012 Heiko Strathmann
10
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
11
*/
12
13
#ifndef _BINARY_LABELS__H__
14
#define _BINARY_LABELS__H__
15
16
#include <
shogun/lib/common.h
>
17
#include <
shogun/io/File.h
>
18
#include <
shogun/labels/LabelTypes.h
>
19
#include <
shogun/labels/DenseLabels.h
>
20
21
namespace
shogun
22
{
23
class
CFile;
24
class
CDenseLabels;
25
36
class
CBinaryLabels
:
public
CDenseLabels
37
{
38
public
:
40
CBinaryLabels
();
41
46
CBinaryLabels
(int32_t num_labels);
47
48
#if !defined(SWIGJAVA) && !defined(SWIGCSHARP)
49
54
CBinaryLabels
(
SGVector<int32_t>
src);
55
61
CBinaryLabels
(
SGVector<int64_t>
src);
62
#endif
63
71
CBinaryLabels
(
SGVector<float64_t>
src,
float64_t
threshold=0.0);
72
77
CBinaryLabels
(
CFile
* loader);
78
85
virtual
void
ensure_valid
(
const
char
* context=NULL);
86
91
virtual
ELabelType
get_label_type
()
const
;
92
111
void
scores_to_probabilities
(
float64_t
a=0,
float64_t
b=0);
112
114
virtual
const
char
*
get_name
()
const
{
return
"BinaryLabels"
; }
115
};
116
}
117
#endif
SHOGUN
机器学习工具包 - 项目文档