Skip to content

Commit

Permalink
Merge pull request #440 from iglesias/knn-covertree
Browse files Browse the repository at this point in the history
Minor bugfixes in KNN
  • Loading branch information
Soeren Sonnenburg committed Apr 11, 2012
2 parents a27e1ae + 873ff2c commit 2d37d40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shogun/classifier/KNN.cpp
Expand Up @@ -154,14 +154,14 @@ CLabels* CKNN::apply()
"it for classification\n");

int32_t num_lab=distance->get_num_vec_rhs();
ASSERT(m_k<=num_lab);
ASSERT(m_k<=distance->get_num_vec_lhs());

CLabels* output=new CLabels(num_lab);

float64_t* dists;
int32_t* train_lab;
float64_t* dists = NULL;
int32_t* train_lab = NULL;
//vector of neighbors used for the cover tree support
int32_t* nearest_neighbors;
int32_t* nearest_neighbors = NULL;
//distances to train data and working buffer of train_labels
if ( ! m_use_covertree )
{
Expand Down

0 comments on commit 2d37d40

Please sign in to comment.