Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
cpp_sisso
Commits
d02f8322
Commit
d02f8322
authored
Sep 18, 2021
by
Thomas Purcell
Browse files
Update FeatureSpace to fix bug
The bug shown was argsort on a vector of size 0
parent
a8f3e7db
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/feature_creation/feature_space/FeatureSpace.cpp
View file @
d02f8322
...
...
@@ -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
);
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
>
del_inds
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment