Compute d/df a^T*K*b
| 81 | } |
| 82 | // Compute d/df a^T*K*b |
| 83 | MatrixXf kernelGradient( const MatrixXf & a, const MatrixXf & b ) const { |
| 84 | MatrixXf g = 0*f_; |
| 85 | lattice_.gradient( g.data(), a.data(), b.data(), a.rows() ); |
| 86 | return g; |
| 87 | } |
| 88 | MatrixXf featureGradient( const MatrixXf & a, const MatrixXf & b ) const { |
| 89 | if (ntype_ == NO_NORMALIZATION ) |
| 90 | return kernelGradient( a, b ); |