Skip to content

Commit

Permalink
Added AUTO_TARGET_DIM option for dimensionality reduction preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Aug 22, 2011
1 parent 904b1a8 commit 876909b
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/shogun/preprocessor/DimensionReductionPreprocessor.h
Expand Up @@ -20,7 +20,7 @@ namespace shogun

class CFeatures;

/** @brief the abstract class DimensionReductionPreprocessor, a base
/** @brief the class DimensionReductionPreprocessor, a base
* class for preprocessors used to lower the dimensionality of given
* simple features (dense matrices).
*/
Expand All @@ -29,7 +29,12 @@ class CDimensionReductionPreprocessor: public CSimplePreprocessor<float64_t>
public:

/* constructor */
CDimensionReductionPreprocessor() : CSimplePreprocessor<float64_t>(), m_target_dim(1) {};
CDimensionReductionPreprocessor() : CSimplePreprocessor<float64_t>()
{
m_target_dim = 1;

init();
};

/* destructor */
virtual ~CDimensionReductionPreprocessor() {};
Expand Down Expand Up @@ -91,6 +96,19 @@ class CDimensionReductionPreprocessor: public CSimplePreprocessor<float64_t>
return m_target_dim;
}

public:

static int32_t const AUTO_TARGET_DIM = -1;

protected:

/** default init */
void init()
{
m_parameters->add(&m_target_dim, "target_dim",
"target dimensionality of preprocessor");
}

protected:

/** target dim of dimensionality reduction preprocessor */
Expand Down

0 comments on commit 876909b

Please sign in to comment.