Skip to content

Commit

Permalink
Cleanup and rename api in DependenceMaximization
Browse files Browse the repository at this point in the history
  • Loading branch information
vinx13 authored and vigsterkr committed Jun 8, 2018
1 parent 1ea60e1 commit a048954
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/shogun/preprocessor/DependenceMaximization.cpp
Expand Up @@ -60,7 +60,7 @@ CDependenceMaximization::~CDependenceMaximization()
SG_UNREF(m_labels_feats);
}

bool CDependenceMaximization::init(CFeatures* features)
void CDependenceMaximization::fit(CFeatures* features)
{
REQUIRE(features, "Features are not initialized!\n");
REQUIRE(features->get_feature_class()==C_DENSE ||
Expand All @@ -71,8 +71,6 @@ bool CDependenceMaximization::init(CFeatures* features)
REQUIRE(features->get_feature_type()==F_DREAL, "Only allowed for "
"features of double type! Provided %d!\n",
features->get_feature_type());

return true;
}

CFeatures* CDependenceMaximization::create_transformed_copy(CFeatures* features,
Expand Down
5 changes: 2 additions & 3 deletions src/shogun/preprocessor/DependenceMaximization.h
Expand Up @@ -115,12 +115,11 @@ class CDependenceMaximization : public CFeatureSelection<float64_t>
virtual void set_algorithm(EFeatureSelectionAlgorithm algorithm)=0;

/**
* Initialize preprocessor from features
* Fit preprocessor into features
*
* @param features the features
* @return true if init was successful
*/
virtual bool init(CFeatures* features);
virtual void fit(CFeatures* features);

/**
* Setter for labels. This method is overridden to internally convert the
Expand Down

0 comments on commit a048954

Please sign in to comment.