SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
features
streaming
StreamingDotFeatures.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) 2011 Shashwat Lal Das
8
* Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
9
*/
10
#ifndef _STREAMING_DOTFEATURES__H__
11
#define _STREAMING_DOTFEATURES__H__
12
13
#include <
shogun/lib/common.h
>
14
#include <
shogun/features/streaming/StreamingFeatures.h
>
15
#include <
shogun/features/DotFeatures.h
>
16
#include <
shogun/io/streaming/StreamingFile.h
>
17
18
namespace
shogun
19
{
42
class
CStreamingDotFeatures
:
public
CStreamingFeatures
43
{
44
45
public
:
47
CStreamingDotFeatures
();
48
56
CStreamingDotFeatures
(
CStreamingFile
* file,
bool
is_labelled, int32_t size);
57
70
CStreamingDotFeatures
(
CDotFeatures
* dot_features,
float64_t
* lab=NULL);
71
72
virtual
~CStreamingDotFeatures
();
73
80
virtual
float32_t
dot
(
CStreamingDotFeatures
* df)=0;
81
87
virtual
float32_t
dense_dot
(
const
float32_t
* vec2, int32_t vec2_len)=0;
88
106
virtual
void
dense_dot_range
(
float32_t
* output,
float32_t
* alphas,
107
float32_t
* vec, int32_t dim,
float32_t
b, int32_t num_vec=0);
108
116
virtual
void
add_to_dense_vec
(
float32_t
alpha,
float32_t
* vec2,
117
int32_t vec2_len,
bool
abs_val=
false
)=0;
118
127
virtual
void
expand_if_required
(
float32_t
*& vec, int32_t &len);
128
137
virtual
void
expand_if_required
(
float64_t
*& vec, int32_t &len);
138
146
virtual
int32_t
get_dim_feature_space
()
const
=0;
147
154
virtual
void
*
get_feature_iterator
();
155
162
virtual
int32_t
get_nnz_features_for_vector
();
163
174
virtual
bool
get_next_feature
(int32_t& index,
float32_t
& value,
void
* iterator);
175
181
virtual
void
free_feature_iterator
(
void
* iterator);
182
183
protected
:
184
186
float32_t
combined_weight
;
187
};
188
}
189
#endif // _STREAMING_DOTFEATURES__H__
SHOGUN
机器学习工具包 - 项目文档