Skip to content

Commit

Permalink
Fixed ConjugateIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed May 22, 2012
1 parent 9eb2a83 commit 28082be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/shogun/multiclass/ConjugateIndex.cpp
Expand Up @@ -65,10 +65,10 @@ void CConjugateIndex::clean_classes()
}
}

bool CConjugateIndex::train(CFeatures* train_features)
bool CConjugateIndex::train_machine(CFeatures* data)
{
if (train_features)
set_features(train_features);
if (data)
set_features(data);

ASSERT(m_labels);
ASSERT(m_labels->get_label_type()==LT_MULTICLASS);
Expand Down Expand Up @@ -141,7 +141,7 @@ bool CConjugateIndex::train(CFeatures* train_features)
return true;
};

CLabels* CConjugateIndex::apply(CFeatures* data)
CMulticlassLabels* CConjugateIndex::apply_multiclass(CFeatures* data)
{
if (data)
set_features(data);
Expand Down
14 changes: 7 additions & 7 deletions src/shogun/multiclass/ConjugateIndex.h
Expand Up @@ -63,17 +63,11 @@ class CConjugateIndex : public CMachine
*/
virtual CDenseFeatures<float64_t>* get_features();

/** train classifier
* @param data train examples
* @return true if successful
*/
virtual bool train(CFeatures* data=NULL);

/** classify specified examples
* @param data examples to be classified
* @return labels corresponding to data
*/
virtual CLabels* apply(CFeatures* data=NULL);
virtual CMulticlassLabels* apply_multiclass(CFeatures* data=NULL);

/** classifiy specified example
* @param idx example index
Expand All @@ -93,6 +87,12 @@ class CConjugateIndex : public CMachine

protected:

/** train classifier
* @param data train examples
* @return true if successful
*/
virtual bool train_machine(CFeatures* data=NULL);

/** clean-up class matrices */
void clean_classes();

Expand Down

0 comments on commit 28082be

Please sign in to comment.