Commit 5739966c authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Bug fix FeatureSpace.cpp

parent d38b08d0
......@@ -623,6 +623,7 @@ void FeatureSpace::sis(std::vector<double>& prop)
// std::fill_n(node_value_arrs::TEMP_STORAGE_REG.data(), node_value_arrs::TEMP_STORAGE_REG.size(), -1);
if(inds.size() == unique_scores)
{
cur_feat_local = 0;
inds = util_funcs::argsort(sent_scores);
for(int ii = 0; ii < _n_sis_select; ++ii)
{
......@@ -630,8 +631,8 @@ void FeatureSpace::sis(std::vector<double>& prop)
sum_file_stream << std::setw(14) <<std::left << cur_feat << std::setw(24) << std::setprecision(18) << std::left << -1 * sent_scores[inds[ii]] << sent_phi[inds[ii]]->expr() << std::endl;
_phi_selected.push_back(sent_phi[inds[ii]]);
_phi_selected.back()->set_selected(true);
_phi_selected.back()->set_d_mat_ind(cur_feat);
++cur_feat;
_phi_selected.back()->set_d_mat_ind(cur_feat + cur_feat_local);
++cur_feat_local;
}
}
else
......@@ -661,7 +662,6 @@ void FeatureSpace::sis(std::vector<double>& prop)
scores_sel[cur_feat_local] = sent_scores[inds[ii]];
++cur_feat_local;
// ++cur_feat;
}
++ii;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment