Skip to content

Commit

Permalink
Removed redundant positive and negative weighting in slep solver
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Aug 18, 2012
1 parent 13750d9 commit 37d4ed6
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/shogun/lib/slep/slep_solver.cpp
Expand Up @@ -316,17 +316,6 @@ double search_point_gradient_and_objective(CDotFeatures* features, double* ATx,
double* g, double* gc,
const slep_options& options)
{
int n_pos = 0;
int n_neg = 0;
for (int i=0; i<n_vecs; i++)
{
if (y[i]>0)
n_pos++;
else
n_neg++;
}
double pos_weight = double(n_pos)/n_vecs;
double neg_weight = double(n_neg)/n_vecs;
double fun_s = 0.0;
//SG_SDEBUG("As=%f\n", SGVector<float64_t>::dot(As,As,n_vecs));
//SG_SDEBUG("sc=%f\n", SGVector<float64_t>::dot(sc,sc,n_tasks));
Expand Down Expand Up @@ -530,19 +519,6 @@ slep_result_t slep_solver(
double* ccp = SG_CALLOC(double, n_tasks);

double* gc = SG_MALLOC(double, n_tasks);

int32_t n_pos = 0;
int32_t n_neg = 0;
for (i=0; i<n_vecs; i++)
{
if (y[i]>0)
n_pos++;
else
n_neg++;
}
double pos_weight = double(n_pos)/n_vecs;
double neg_weight = double(n_neg)/n_vecs;

double alphap = 0.0, alpha = 1.0;
double fun_x = 0.0;

Expand Down

0 comments on commit 37d4ed6

Please sign in to comment.