Skip to Main Content
Графовые алгоритмы
book

Графовые алгоритмы

by Марк Нидхем, Эми Ходлер
January 2020
Beginner to intermediate content levelBeginner to intermediate
258 pages
9h 7m
Russian
DMK Press
Content preview from Графовые алгоритмы
Графы и машинное обучение на практике: прогнозирование связей 229
plt.xlim([0, 1])
plt.ylim([0, 1])
plt.ylabel('True Positive Rate')
plt.xlabel('False Positive Rate')
plt.rc('axes', prop_cycle=(cycler('color',
['r', 'g', 'b', 'c', 'm', 'y', 'k'])))
plt.plot([0, 1], [0, 1], linestyle='--', label='Random score
(AUC = 0.50)')
return plt, g
def add_curve(plt, title, fpr, tpr, roc):
plt.plot(fpr, tpr, label=f"{title} (AUC = {roc:0.2})")
Эти функции можно вызвать, например, так:
plt, g = create_roc_plot()
add_curve(plt, "Common Authors",
basic_results["fpr"], basic_results["tpr"], basic_results["roc_auc"])
plt.legend(loc='lower right')
plt.show() ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Проектирование систем машинного обучения

Проектирование систем машинного обучения

Chip Huyen

Publisher Resources

ISBN: 9785970607992