71 struct GenData *data,
double *ZV)
73 long i, j, jj, jj_start, jj_end, K,
79 long *Zia = data->
spZ->
ia;
80 long *Zja = data->
spZ->
ja;
83 for (i=0; i<n_row; i++) {
87 for (jj=jj_start; jj<jj_end; jj++) {
91 cblas_daxpy(K-1, z_ij, &model->
V[j*(K-1)], 1,
109 struct GenData *data,
double *ZV)
116 cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, n, K-1, m+1,
117 1.0, data->
Z, m+1, model->
V, K-1, 0, ZV, K-1);
long * ja
column indices, should be of length nnz
double * V
augmented weight matrix
A structure to represent the data.
double * values
actual nonzero values, should be of length nnz
A structure to represent a single GenSVM model.
Header file for gensvm_zv.c.
long K
number of classes in the dataset
void gensvm_calculate_ZV_dense(struct GenModel *model, struct GenData *data, double *ZV)
Compute the product Z*V for when Z is a dense matrix.
void gensvm_calculate_ZV(struct GenModel *model, struct GenData *data, double *ZV)
Wrapper around sparse/dense versions of this function.
long n
number of instances
void gensvm_calculate_ZV_sparse(struct GenModel *model, struct GenData *data, double *ZV)
Compute the product Z*V for when Z is a sparse matrix.
long m
number of predictor variables in the dataset
long * ia
cumulative row lengths, should be of length n_row+1
struct GenSparse * spZ
sparse representation of the augmented data matrix
long n_row
number of rows of the original matrix