Closed alchemyst closed 8 years ago
heapq in the standard library has an nlargest method which allows you to replace all the sorting and selecting code in get_top_models with
heapq
nlargest
get_top_models
top_entries = heapq.nlargest(db.query(...), no_models, key=lambda e: e['kfold_scores'])
heapq
in the standard library has annlargest
method which allows you to replace all the sorting and selecting code inget_top_models
with