diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2014-08-25 14:38:03 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2014-08-25 14:38:03 +0200 |
| commit | 1e340d509f229120eb3aaa98c91028dc3c0d3305 (patch) | |
| tree | dd6b65c428447f179133e967eb0e0d3ce15f68ec /include/gensvm.h | |
| parent | free some work arrays (diff) | |
| download | gensvm-1e340d509f229120eb3aaa98c91028dc3c0d3305.tar.gz gensvm-1e340d509f229120eb3aaa98c91028dc3c0d3305.zip | |
rename msvmmaj to gensvm
Diffstat (limited to 'include/gensvm.h')
| -rw-r--r-- | include/gensvm.h | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/include/gensvm.h b/include/gensvm.h new file mode 100644 index 0000000..1231c29 --- /dev/null +++ b/include/gensvm.h @@ -0,0 +1,99 @@ +/** + * @file gensvm.h + * @author Gertjan van den Burg + * @date August, 2013 + * @brief Definitions for common structures + * + * @details + * Contains documentation and declarations of GenModel and GenData. + * + */ + +#ifndef GENSVM_H +#define GENSVM_H + +#include "globals.h" +#include "types.h" + +/** + * @brief A structure to represent a single GenSVM model. + * + * @param weight_idx which weights to use (1 = unit, 2 = group) + * @param K number of classes in the dataset + * @param n number of instances in the dataset + * @param m number of predictors in the dataset + * @param epsilon stopping criterion + * @param p parameter for the L_p norm + * @param kappa parameter for the Huber hinge + * @param lambda regularization parameter + * @param *W pointer to the weight matrix + * @param *t pointer to the translation vector + * @param *V pointer to the augmented weight matrix + * @param *Vbar pointer to the augmented weight matrix from a + * previous iteration + * @param *U pointer to the simplex matrix + * @param *UU pointer to the 3D simplex difference matrix + * @param *Q pointer to the error matrix + * @param *H pointer to the Huber weighted error matrix + * @param *R pointer to the 0-1 auxiliary matrix + * @param *rho pointer to the instance weight vector + * @param training_error error after training has completed + * @param *data_file pointer to the filename of the data + * @param kerneltype kernel to be used in the model + * @param kernelparam pointer to the vector of kernel parameters + * + * @TODO + * change R to int, it's a binary matrix + */ +struct GenModel { + int weight_idx; + long K; + long n; + long m; + double epsilon; + double p; + double kappa; + double lambda; + double *W; + double *t; + double *V; + double *Vbar; + double *U; + double *UU; + double *Q; + double *H; + double *R; + double *rho; + double training_error; + char *data_file; + KernelType kerneltype; + double *kernelparam; +}; + +/** + * @brief A structure to represent the data. + * + * @param K number of classes + * @param n number of instances + * @param m number of predictors + * @param *y pointer to vector of class labels + * @param *Z pointer to augmented data matrix + * @param *RAW pointer to augmented raw data matrix + * @param *J pointer to regularization vector + * @param kerneltype kerneltype used in GenData::Z + * @param *kernelparam kernel parameters used in GenData::Z + * + */ +struct GenData { + long K; + long n; + long m; + long *y; + double *Z; + double *RAW; + double *J; + KernelType kerneltype; + double *kernelparam; +}; + +#endif |
