Skip to content

Commit

Permalink
svm_struct_api.c: improves a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vedaldi committed Sep 3, 2009
1 parent 59f106b commit 105f805
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions svm_struct_api.c
Expand Up @@ -392,8 +392,14 @@ psi (PATTERN x, LABEL y, STRUCTMODEL *sm,
{
SVECTOR *sv = NULL;

/* With linear kernels we call the explicit feature map PSI */
/* The algorith can use either a linear kernel (explicit feature map)
* or a custom kernel (implicit feature map). For the explicit feature
* map, this function returns a sizePhi-dimensional vector. For
* the implicit feature map this function returns a placeholder
* which simply remembers the pair (x,y). */

if (sm -> svm_model -> kernel_parm .kernel_type == LINEAR) {
/* For the linear kernel computes the vector Phi(x,y) */
mxArray* out ;
mxArray* fn_array ;
mxArray* args [4] ;
Expand Down Expand Up @@ -451,7 +457,7 @@ psi (PATTERN x, LABEL y, STRUCTMODEL *sm,
mxDestroyArray (out) ;
}
else {
/* CUSTOM kernel */
/* For the ustom kernel returns a placeholder for (x,y). */
MexPhiCustom phi = newMexPhiCustomFromPatternLabel(x.mex, y.mex) ;
WORD * words = mxMalloc(sizeof(WORD)) ;
words[0].wnum = 0 ;
Expand Down

0 comments on commit 105f805

Please sign in to comment.