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
5299c569
Commit
5299c569
authored
Aug 19, 2021
by
Martino Bertoni
🌋
Browse files
embeddings are coherent between reference and full in sign2
parent
f84f8120
Pipeline
#2491
failed with stages
in 65 minutes and 39 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
package/chemicalchecker/core/sign2.py
View file @
5299c569
...
...
@@ -189,15 +189,21 @@ class sign2(BaseSignature, DataSignature):
nearest_neighbor_pred
=
sign2
.
predict_nearest_neighbor
(
self
.
model_path
,
traintest_file
)
extra_preditors
[
'NearestNeighbor'
]
=
nearest_neighbor_pred
ada
.
save_performances
(
adanet_path
,
sign2_plot
,
extra_preditors
)
ada
.
save_performances
(
adanet_path
,
sign2_plot
,
extra_predictors
=
extra_preditors
)
self
.
__log
.
debug
(
'model saved to %s'
%
adanet_path
)
self
.
update_status
(
"Generating `full` molset"
)
cc_tmp
=
self
.
get_cc
()
sign1_full
=
cc_tmp
.
get_signature
(
'sign1'
,
'full'
,
self
.
dataset
)
sign2_full
=
cc_tmp
.
get_signature
(
'sign2'
,
'full'
,
self
.
dataset
)
# we want agreement between reference and full
# so we overwrite the original embeddings using the predictor
sign1_ref
=
cc_tmp
.
get_signature
(
'sign1'
,
'reference'
,
self
.
dataset
)
sign2_ref
=
cc_tmp
.
get_signature
(
'sign2'
,
'reference'
,
self
.
dataset
)
if
oos_predictor
:
self
.
predict
(
sign1_full
,
sign2_full
.
data_path
)
self
.
predict
(
sign1_ref
,
sign2_ref
.
data_path
)
else
:
self
.
map
(
sign2_full
.
data_path
)
# finalize signature
...
...
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