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
Packages
chemical_checker
Commits
1d83e7b9
Commit
1d83e7b9
authored
Feb 15, 2021
by
Martino Bertoni
🌋
Browse files
added check for reaching sufficient sampling before iterating all features
parent
bfc43ddd
Pipeline
#2410
failed with stages
in 1 minute and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
package/chemicalchecker/util/transform/base.py
View file @
1d83e7b9
...
...
@@ -144,9 +144,11 @@ class BaseTransform(object):
else
:
dkey
=
"V"
for
j
in
tqdm
(
range
(
0
,
self
.
sign_ref
.
shape
[
1
])):
if
len
(
idxs
)
>=
self
.
max_keys
:
break
v
=
hf
[
dkey
][:,
j
]
zero_feat
=
np
.
argwhere
(
v
!=
0
).
ravel
()
candidates
=
list
(
set
(
zero_feat
)
-
idxs
)
non_
zero_feat
=
np
.
argwhere
(
v
!=
0
).
ravel
()
candidates
=
list
(
set
(
non_
zero_feat
)
-
idxs
)
if
len
(
candidates
)
==
0
:
raise
Exception
(
'No feature specific candidates for subsampling. '
...
...
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