Skip to content
Snippets Groups Projects
Commit 09fa3087 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

remove dualFeasable readd primalFeasable

This is correct execpt for one compliation on my computer
parent edfd3bad
No related branches found
No related tags found
No related merge requests found
......@@ -331,7 +331,7 @@ int LPWrapper::get_n_overlap(const std::vector<int> inds)
_simplex.chgRowLower(&_row_lower[ii * _n_row]);
_simplex.chgRowUpper(&_row_upper[ii * _n_row]);
_simplex.dual();
_n_overlap += _simplex.dualFeasible();
_n_overlap += _simplex.primalFeasible();
}
}
return _n_overlap;
......@@ -378,8 +378,8 @@ void LPWrapper::set_n_overlap(const std::vector<double*> val_ptrs, const std::ve
_simplex.chgRowUpper(&_row_upper[ii * _n_row]);
_simplex.dual();
_n_overlap += _simplex.dualFeasible();
error[error_ind[ii]] += static_cast<double>(_simplex.dualFeasible());
_n_overlap += _simplex.primalFeasible();
error[error_ind[ii]] += static_cast<double>(_simplex.primalFeasible());
}
for(int ii = 0; ii < _n_pts_check_test; ++ii)
......@@ -388,8 +388,8 @@ void LPWrapper::set_n_overlap(const std::vector<double*> val_ptrs, const std::ve
_simplex.chgRowUpper(&_row_upper_test[ii * _n_row]);
_simplex.dual();
_n_overlap_test += _simplex.dualFeasible();
test_error[test_error_ind[ii]] += static_cast<double>(_simplex.dualFeasible());
_n_overlap_test += _simplex.primalFeasible();
test_error[test_error_ind[ii]] += static_cast<double>(_simplex.primalFeasible());
}
}
}
......@@ -169,9 +169,6 @@ void SISSOClassifier::l0_norm(std::vector<double>& prop, int n_dim)
util_funcs::iterate(inds, inds.size(), ii - ii_prev);
int n_convex_overlap = (*loss_copy)(inds);
// std::cout << "HI THERE: " << n_convex_overlap << std::endl;
// std::cout << _feat_space->phi_selected()[inds[0]]->expr() << std::endl;
// std::cout << _feat_space->phi_selected()[inds[0]]->value_ptr()[0] << std::endl;
if(n_convex_overlap <= min_n_convex_overlap_private[max_error_ind])
{
temp_svm_error = svm_error(svm_vec, inds);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment