Skip to content
Snippets Groups Projects
Commit 995b4097 authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

fix

parent f0c77d7b
No related branches found
No related tags found
No related merge requests found
......@@ -442,13 +442,13 @@ def model_select(allele):
unselected_score_function = (
unselected_accuracy_scorer.score_function(allele))
unselected_score = unselected_score_function(predictor)
scrambled_predictor = ScrambledPredictor(predictor)
additional_metadata = {}
unselected_score = unselected_score_function(
predictor, additional_metadata_out=additional_metadata)
scrambled_predictor = ScrambledPredictor(predictor)
scrambled_scores = numpy.array([
unselected_score_function(
scrambled_predictor,
additional_metadata_out=additional_metadata)
scrambled_predictor)
for _ in range(unselected_accuracy_scorer_samples)
])
unselected_score_scrambled_mean = scrambled_scores.mean()
......@@ -779,8 +779,7 @@ class MassSpecModelSelector(object):
# We additionally compute AUC score.
additional_metadata_out["score_mass_spec_AUC"] = roc_auc_score(
self.df[allele].values,
-1 * predictions)
self.df[allele].values, -1 * predictions)
return ppv * multiplier
summary = "mass-spec (%d hits / %d decoys)" % (total_hits, total_decoys)
......
......@@ -105,7 +105,7 @@ def run_and_check_with_model_selection(n_jobs=1):
deepcopy(HYPERPARAMETERS[0]),
deepcopy(HYPERPARAMETERS[0]),
]
hyperparameters[-1]["max_epochs"] = 0
hyperparameters[-1]["max_epochs"] = 10
with open(hyperparameters_filename, "w") as fd:
json.dump(hyperparameters, fd)
......@@ -153,9 +153,9 @@ def run_and_check_with_model_selection(n_jobs=1):
result.allele_to_allele_specific_models["HLA-A*03:01"][
0].hyperparameters["max_epochs"], 500)
#print("Deleting: %s" % models_dir1)
#print("Deleting: %s" % models_dir2)
#shutil.rmtree(models_dir1)
print("Deleting: %s" % models_dir1)
print("Deleting: %s" % models_dir2)
shutil.rmtree(models_dir1)
if os.environ.get("KERAS_BACKEND") != "theano":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment