📄 collection.h
字号:
#ifndef COLLECTION_H#define COLLECTION_H#include "box.h"#include "document.h"/** * Determines how to traverse classes when training. */enum csm { LINEAR, /**< One class at a time */ CROSS, /**< Different class every time, if possible */ RANDOM, /**< Random class */ TIME /**< Class with oldest message first (should be used with LINEAR_SEQ to have that meaning) */};/** * Determines how to traverse messages when training. */enum msm { LINEAR_SEQ, /**< From beginning to end */ RANDOM_SEQ /**< Random order */};/** * Determines how many messages should be used for training. */enum trm { ALL, /**< Train with all messages, then test all messages */ ALL_INTERLEAVED, /**< For all messages, test it then train with it */ CLASS_PERCENTAGE, /**< Same specific percentage for each class */ TOTAL_PERCENTAGE /**< Specific percentage for whole collection */};intcollection_init(enum csm c, enum msm m, enum trm t, enum document_type dt);intcollection_add_box(box *b);intcollection_get_nod(void);intcollection_get_notd(void);document *collection_get_document(void);voidcollection_drop_document(document *doc);intcollection_get_class(void);intcollection_get_msg(void);intcollection_get_class_nod(int class);intcollection_get_class_notd(int class);intcollection_next_document(void);intcollection_next_test_document(void);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -