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
1cae85f6
Commit
1cae85f6
authored
7 years ago
by
Tim O'Donnell
Browse files
Options
Downloads
Patches
Plain Diff
cache peptide encoding in percentile rank calibration
parent
172907c9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mhcflurry/class1_affinity_predictor.py
+1
-1
1 addition, 1 deletion
mhcflurry/class1_affinity_predictor.py
mhcflurry/train_allele_specific_models_command.py
+2
-1
2 additions, 1 deletion
mhcflurry/train_allele_specific_models_command.py
with
3 additions
and
2 deletions
mhcflurry/class1_affinity_predictor.py
+
1
−
1
View file @
1cae85f6
...
@@ -933,7 +933,7 @@ class Class1AffinityPredictor(object):
...
@@ -933,7 +933,7 @@ class Class1AffinityPredictor(object):
encoded_peptides
=
EncodableSequences
.
create
(
peptides
)
encoded_peptides
=
EncodableSequences
.
create
(
peptides
)
for
(
i
,
allele
)
in
enumerate
(
alleles
):
for
(
i
,
allele
)
in
enumerate
(
alleles
):
predictions
=
self
.
predict
(
peptides
,
allele
=
allele
)
predictions
=
self
.
predict
(
encoded_
peptides
,
allele
=
allele
)
transform
=
PercentRankTransform
()
transform
=
PercentRankTransform
()
transform
.
fit
(
predictions
,
bins
=
bins
)
transform
.
fit
(
predictions
,
bins
=
bins
)
self
.
allele_to_percent_rank_transform
[
allele
]
=
transform
self
.
allele_to_percent_rank_transform
[
allele
]
=
transform
...
...
This diff is collapsed.
Click to expand it.
mhcflurry/train_allele_specific_models_command.py
+
2
−
1
View file @
1cae85f6
...
@@ -9,6 +9,7 @@ import time
...
@@ -9,6 +9,7 @@ import time
import
traceback
import
traceback
from
multiprocessing
import
Pool
from
multiprocessing
import
Pool
from
functools
import
partial
from
functools
import
partial
from
pprint
import
pprint
import
pandas
import
pandas
import
yaml
import
yaml
...
@@ -363,7 +364,7 @@ def train_model(
...
@@ -363,7 +364,7 @@ def train_model(
# For the first model for the first allele, print the architecture.
# For the first model for the first allele, print the architecture.
print
(
"
*** HYPERPARAMETER SET %d***
"
%
print
(
"
*** HYPERPARAMETER SET %d***
"
%
(
hyperparameter_set_num
+
1
))
(
hyperparameter_set_num
+
1
))
print
(
hyperparameters
)
p
print
(
hyperparameters
)
print
(
"
*** ARCHITECTURE FOR HYPERPARAMETER SET %d***
"
%
print
(
"
*** ARCHITECTURE FOR HYPERPARAMETER SET %d***
"
%
(
hyperparameter_set_num
+
1
))
(
hyperparameter_set_num
+
1
))
model
.
network
(
borrow
=
True
).
summary
()
model
.
network
(
borrow
=
True
).
summary
()
...
...
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