SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
宏定义
LibSVMFile.cpp 文件参考

浏览源代码.

宏定义

#define GET_SPARSE_MATRIX(read_func, sg_type)
 
#define GET_LABELED_SPARSE_MATRIX(read_func, sg_type)
 
#define GET_MULTI_LABELED_SPARSE_MATRIX(read_func, sg_type)
 
#define SET_SPARSE_MATRIX(format, sg_type)
 
#define SET_LABELED_SPARSE_MATRIX(format, sg_type)
 
#define SET_MULTI_LABELED_SPARSE_MATRIX(format, sg_type)
 

宏定义说明

#define GET_LABELED_SPARSE_MATRIX (   read_func,
  sg_type 
)
值:
void CLibSVMFile::get_sparse_matrix(SGSparseVector<sg_type>*& mat_feat, int32_t& num_feat, int32_t& num_vec, \
float64_t*& labels, bool load_labels) \
{ \
SGVector<float64_t>* multilabel; \
int32_t num_classes; \
get_sparse_matrix(mat_feat, num_feat, num_vec, multilabel, num_classes, load_labels); \
\
for (int32_t i=0; i<num_vec; i++) \
{ \
REQUIRE(multilabel[i].size()==1, \
"%s a multilabel file. You are trying to read it with a single-label reader.", filename); \
} \
labels=SG_MALLOC(float64_t, num_vec); \
\
for (int32_t i=0; i<num_vec; i++) \
labels[i]=multilabel[i][0]; \
SG_FREE(multilabel); \
} \
#define REQUIRE(x,...)
Definition: SGIO.h:206
double float64_t
Definition: common.h:50
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...

在文件 LibSVMFile.cpp111 行定义.

#define GET_MULTI_LABELED_SPARSE_MATRIX (   read_func,
  sg_type 
)

在文件 LibSVMFile.cpp146 行定义.

#define GET_SPARSE_MATRIX (   read_func,
  sg_type 
)
值:
void CLibSVMFile::get_sparse_matrix(SGSparseVector<sg_type>*& mat_feat, int32_t& num_feat, int32_t& num_vec) \
{ \
SGVector<float64_t>* multilabel; \
int32_t num_classes; \
get_sparse_matrix(mat_feat, num_feat, num_vec, multilabel, num_classes, false); \
}
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...

在文件 LibSVMFile.cpp88 行定义.

#define SET_LABELED_SPARSE_MATRIX (   format,
  sg_type 
)
值:
void CLibSVMFile::set_sparse_matrix( \
const SGSparseVector<sg_type>* matrix, int32_t num_feat, int32_t num_vec, \
const float64_t* labels) \
{ \
SGVector<float64_t>* multilabel=SG_MALLOC(SGVector<float64_t>, num_vec); \
\
for (int32_t i=0; i<num_vec; i++) \
{ \
multilabel[i]=SGVector<float64_t>(1); \
multilabel[i][0]=labels[i]; \
} \
\
set_sparse_matrix(matrix, num_feat, num_vec, multilabel); \
SG_FREE(multilabel); \
}
double float64_t
Definition: common.h:50
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...

在文件 LibSVMFile.cpp292 行定义.

#define SET_MULTI_LABELED_SPARSE_MATRIX (   format,
  sg_type 
)

在文件 LibSVMFile.cpp324 行定义.

#define SET_SPARSE_MATRIX (   format,
  sg_type 
)
值:
void CLibSVMFile::set_sparse_matrix( \
const SGSparseVector<sg_type>* matrix, int32_t num_feat, int32_t num_vec) \
{ \
SGVector <float64_t>* labels = NULL; \
set_sparse_matrix(matrix, num_feat, num_vec, labels); \
}
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...

在文件 LibSVMFile.cpp269 行定义.


SHOGUN 机器学习工具包 - 项目文档