Commit d02f8322 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Update FeatureSpace to fix bug

The bug shown was argsort on a vector of size 0
parent a8f3e7db
...@@ -579,6 +579,10 @@ void FeatureSpace::remove_duplicate_features(std::vector<node_ptr>& feat_set, in ...@@ -579,6 +579,10 @@ void FeatureSpace::remove_duplicate_features(std::vector<node_ptr>& feat_set, in
project_funcs::project_r(_prop_train.data(), scores.data(), feat_set, _task_sizes_train, 1); project_funcs::project_r(_prop_train.data(), scores.data(), feat_set, _task_sizes_train, 1);
scores.erase(scores.begin(), scores.begin() + start); scores.erase(scores.begin(), scores.begin() + start);
if(scores.size() == 0)
{
throw std::logic_error("No features created during this rung (" + std::to_string(feat_set.back()->rung() + 1) + ")");
}
std::vector<int> inds = util_funcs::argsort<double>(scores); std::vector<int> inds = util_funcs::argsort<double>(scores);
std::vector<int> del_inds; std::vector<int> del_inds;
......
Markdown is supported
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