Skip to content

Commit

Permalink
Fix kernel handling in kernel pca
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Nov 7, 2011
1 parent ac2ec88 commit 3a03eb0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/shogun/preprocessor/KernelPCA.cpp
Expand Up @@ -34,13 +34,11 @@ CKernelPCA::CKernelPCA() : CDimensionReductionPreprocessor()
CKernelPCA::CKernelPCA(CKernel* k) : CDimensionReductionPreprocessor()
{
init();
SG_REF(k);
m_kernel=k;
set_kernel(k);
}

void CKernelPCA::init()
{
m_kernel = NULL;
m_initialized = false;
m_init_features = NULL;
m_transformation_matrix = SGMatrix<float64_t>(NULL, 0, 0, false);
Expand All @@ -56,7 +54,6 @@ void CKernelPCA::cleanup()
{
m_transformation_matrix.destroy_matrix();
m_bias_vector.destroy_vector();
if (m_kernel) SG_UNREF(m_kernel);
if (m_init_features) SG_UNREF(m_init_features);
m_initialized = false;
}
Expand All @@ -65,7 +62,6 @@ CKernelPCA::~CKernelPCA()
{
m_transformation_matrix.destroy_matrix();
m_bias_vector.destroy_vector();
if (m_kernel) SG_UNREF(m_kernel);
if (m_init_features) SG_UNREF(m_init_features);
}

Expand Down

0 comments on commit 3a03eb0

Please sign in to comment.