Skip to content

Commit

Permalink
rename apply(idx) -> apply_one(idx)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed May 21, 2012
1 parent c54276b commit 1a6ae98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/shogun/multiclass/ConjugateIndex.cpp
Expand Up @@ -159,7 +159,7 @@ CLabels* CConjugateIndex::apply(CFeatures* data)
for (int32_t i=0; i<num_vectors;i++)
{
SG_PROGRESS(i,0,num_vectors-1);
predicted_labels->set_label(i,apply(i));
predicted_labels->set_label(i,apply_one(i));
}
SG_DONE();

Expand All @@ -183,7 +183,7 @@ float64_t CConjugateIndex::conjugate_index(SGVector<float64_t> feature_vector, i
return product/norm;
};

float64_t CConjugateIndex::apply(int32_t index)
float64_t CConjugateIndex::apply_one(int32_t index)
{
int32_t predicted_label = 0;
float64_t max_conjugate_index = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/multiclass/ConjugateIndex.h
Expand Up @@ -77,7 +77,7 @@ class CConjugateIndex : public CMachine
* @param idx example index
* @return label
*/
virtual float64_t apply(int32_t idx);
virtual float64_t apply_one(int32_t idx);

/** get name
* @return classifier name
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/multiclass/KNN.h
Expand Up @@ -82,7 +82,7 @@ class CKNN : public CDistanceMachine
virtual CLabels* apply(CFeatures* data=NULL);

/// get output for example "vec_idx"
virtual float64_t apply(int32_t vec_idx)
virtual float64_t apply_one(int32_t vec_idx)
{
SG_ERROR( "for performance reasons use apply() instead of apply(int32_t vec_idx)\n");
return 0;
Expand Down

0 comments on commit 1a6ae98

Please sign in to comment.