Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mhc_rank
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patrick Skillman-Lawrence
mhc_rank
Commits
9e5cf6bd
Commit
9e5cf6bd
authored
5 years ago
by
Tim O'Donnell
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
d1e6fbb5
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mhcflurry/class1_neural_network.py
+2
-1
2 additions, 1 deletion
mhcflurry/class1_neural_network.py
with
2 additions
and
1 deletion
mhcflurry/class1_neural_network.py
+
2
−
1
View file @
9e5cf6bd
...
@@ -613,7 +613,7 @@ class Class1NeuralNetwork(object):
...
@@ -613,7 +613,7 @@ class Class1NeuralNetwork(object):
str
(
aa_distribution
.
to_dict
())))
str
(
aa_distribution
.
to_dict
())))
y_values
=
from_ic50
(
affinities
)
y_values
=
from_ic50
(
affinities
)
assert
numpy
.
isnan
(
y_values
).
sum
()
==
0
,
numpy
.
isnan
(
y_values
).
sum
()
assert
numpy
.
isnan
(
y_values
).
sum
()
==
0
,
y_values
if
inequalities
is
not
None
:
if
inequalities
is
not
None
:
# Reverse inequalities because from_ic50() flips the direction
# Reverse inequalities because from_ic50() flips the direction
# (i.e. lower affinity results in higher y values).
# (i.e. lower affinity results in higher y values).
...
@@ -642,6 +642,7 @@ class Class1NeuralNetwork(object):
...
@@ -642,6 +642,7 @@ class Class1NeuralNetwork(object):
if
shuffle_permutation
is
None
:
if
shuffle_permutation
is
None
:
shuffle_permutation
=
numpy
.
random
.
permutation
(
len
(
y_values
))
shuffle_permutation
=
numpy
.
random
.
permutation
(
len
(
y_values
))
y_values
=
y_values
[
shuffle_permutation
]
y_values
=
y_values
[
shuffle_permutation
]
assert
numpy
.
isnan
(
y_values
).
sum
()
==
0
,
y_values
peptide_encoding
=
peptide_encoding
[
shuffle_permutation
]
peptide_encoding
=
peptide_encoding
[
shuffle_permutation
]
adjusted_inequalities
=
adjusted_inequalities
[
shuffle_permutation
]
adjusted_inequalities
=
adjusted_inequalities
[
shuffle_permutation
]
for
key
in
x_dict_without_random_negatives
:
for
key
in
x_dict_without_random_negatives
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment