Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SENSE-PPI
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Konstantin Volzhenin
SENSE-PPI
Commits
c5196603
Commit
c5196603
authored
Sep 22, 2023
by
Konstantin Volzhenin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deleted unnecessary print of metrics from predict_string
parent
57089d62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
16 deletions
+0
-16
predict_string.py
senseppi/commands/predict_string.py
+0
-16
No files found.
senseppi/commands/predict_string.py
View file @
c5196603
...
@@ -42,22 +42,6 @@ def main(params):
...
@@ -42,22 +42,6 @@ def main(params):
print
(
data
.
sort_values
(
by
=
[
'preds'
],
ascending
=
False
)
.
to_string
())
print
(
data
.
sort_values
(
by
=
[
'preds'
],
ascending
=
False
)
.
to_string
())
# Calculate torch metrics based on data['binary_label'] and data['preds']
torch_labels
=
torch
.
tensor
(
data
[
'binary_label'
])
torch_preds
=
torch
.
tensor
(
data
[
'preds'
])
print
(
'Accuracy: '
,
Accuracy
(
threshold
=
pred_threshold
,
task
=
'binary'
)(
torch_preds
,
torch_labels
))
print
(
'Precision: '
,
Precision
(
threshold
=
pred_threshold
,
task
=
'binary'
)(
torch_preds
,
torch_labels
))
print
(
'Recall: '
,
Recall
(
threshold
=
pred_threshold
,
task
=
'binary'
)(
torch_preds
,
torch_labels
))
print
(
'F1Score: '
,
F1Score
(
threshold
=
pred_threshold
,
task
=
'binary'
)(
torch_preds
,
torch_labels
))
print
(
'MatthewsCorrCoef: '
,
MatthewsCorrCoef
(
num_classes
=
2
,
threshold
=
pred_threshold
,
task
=
'binary'
)(
torch_preds
,
torch_labels
))
print
(
'ROCAUC: '
,
AUROC
(
task
=
'binary'
)(
torch_preds
,
torch_labels
))
string_ids
=
{}
string_ids
=
{}
string_tsv
=
pd
.
read_csv
(
'string_interactions.tsv'
,
delimiter
=
'
\t
'
)[
string_tsv
=
pd
.
read_csv
(
'string_interactions.tsv'
,
delimiter
=
'
\t
'
)[
[
'preferredName_A'
,
'preferredName_B'
,
'stringId_A'
,
'stringId_B'
]]
[
'preferredName_A'
,
'preferredName_B'
,
'stringId_A'
,
'stringId_B'
]]
...
...
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