diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2014-05-19 17:39:04 -0700 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2014-05-19 17:39:04 -0700 |
| commit | ff13b0a8552d203b7baeadc8a345a1b6781bc8fe (patch) | |
| tree | 612580607c9ad6e52287d4bfd0affd0668501fdb /include | |
| parent | add functionality for counting SVs (diff) | |
| download | gensvm-ff13b0a8552d203b7baeadc8a345a1b6781bc8fe.tar.gz gensvm-ff13b0a8552d203b7baeadc8a345a1b6781bc8fe.zip | |
realloc existing model instead of using fold model, saving memory and time!
Diffstat (limited to 'include')
| -rw-r--r-- | include/msvmmaj.h | 5 | ||||
| -rw-r--r-- | include/msvmmaj_train_dataset.h | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/include/msvmmaj.h b/include/msvmmaj.h index d67ad8b..4e00654 100644 --- a/include/msvmmaj.h +++ b/include/msvmmaj.h @@ -42,7 +42,10 @@ * @param kerneltype kernel to be used in the model * @param kernelparam pointer to the vector of kernel parameters * @param use_cholesky whether the Cholesky decomposition should be - * used + * used + * + * @TODO + * change R to int, it's a binary matrix * */ struct MajModel { diff --git a/include/msvmmaj_train_dataset.h b/include/msvmmaj_train_dataset.h index 5248b4a..4ee39bf 100644 --- a/include/msvmmaj_train_dataset.h +++ b/include/msvmmaj_train_dataset.h @@ -129,9 +129,12 @@ void free_queue(struct Queue *q); void consistency_repeats(struct Queue *q, long repeats, TrainType traintype); -double cross_validation(struct MajModel *model, struct MajModel *seed_model, - struct MajData *data, long folds); +double cross_validation(struct MajModel *model, struct MajData *data, + long folds); void make_model_from_task(struct Task *task, struct MajModel *model); void copy_model(struct MajModel *from, struct MajModel *to); + +void msvmmaj_reallocate_model(struct MajModel *model, long n); + #endif |
