Skip to content

Commit

Permalink
Made parameters work for SLEP FBLR
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Jul 8, 2012
1 parent be76f99 commit f3871d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/shogun/classifier/FeatureBlockLogisticRegression.cpp
Expand Up @@ -65,7 +65,10 @@ bool CFeatureBlockLogisticRegression::train_machine(CFeatures* data)
ASSERT(features);
ASSERT(m_labels);

SGVector<float64_t> y = ((CBinaryLabels*)m_labels)->get_labels();
int32_t n_vecs = m_labels->get_num_labels();
SGVector<float64_t> y(n_vecs);
for (int32_t i=0; i<n_vecs; i++)
y[i] = ((CBinaryLabels*)m_labels)->get_label(i);

slep_options options = slep_options::default_options();
options.q = m_q;
Expand Down
2 changes: 2 additions & 0 deletions src/shogun/machine/SLEPMachine.cpp
Expand Up @@ -17,6 +17,7 @@ namespace shogun
CSLEPMachine::CSLEPMachine() :
CLinearMachine(), m_z(1.0)
{
register_parameters();
}

CSLEPMachine::CSLEPMachine(
Expand All @@ -32,6 +33,7 @@ CSLEPMachine::CSLEPMachine(
set_regularization(0);
set_tolerance(1e-3);
set_max_iter(1000);
register_parameters();
}

CSLEPMachine::~CSLEPMachine()
Expand Down

0 comments on commit f3871d0

Please sign in to comment.