Skip to content

Commit

Permalink
BLASed KLLE a little
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Oct 9, 2011
1 parent 79758f3 commit 85a967c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/shogun/preprocessor/KernelLocallyLinearEmbedding.cpp
Expand Up @@ -243,12 +243,7 @@ SGMatrix<float64_t> CKernelLocallyLinearEmbedding::construct_weight_matrix(SGMat
SG_FREE(id_vector);
SG_FREE(local_gram_matrix);

// W=I-W
// W=I-W
for (i=0; i<N*N; i++)
{
W_matrix[i] *= -1.0;
}
// diag(W) = 1
for (i=0; i<N; i++)
{
W_matrix[i*N+i] = 1.0;
Expand Down Expand Up @@ -368,8 +363,7 @@ void* CKernelLocallyLinearEmbedding::run_linearreconstruction_thread(void* p)
for (j=0; j<m_k; j++)
norming += id_vector[j];

for (j=0; j<m_k; j++)
id_vector[j]/=norming;
cblas_dscal(m_k,-1.0/norming,id_vector,1);

// put weights into W matrix
for (j=0; j<m_k; j++)
Expand Down

0 comments on commit 85a967c

Please sign in to comment.