# How is the optimal probability cut-off in a ROC defined by the R package Epi?

The plot below was created by R package Epi::ROC for a binary classification problem. There is an optimal cut off or threshold for the classification probability at which sensitivity and 1-specifitiy are balanced in some optimal way (called ps3 in the plot). My question is how this point is defined mathematically in this case and if there are other ways to define it.

Epi::ROC defines optimal cut-off as a point for which sum of Sensitivity and Specificity is maximized.