How is cost function computed in Logistic Regression?

Cost function for logistic regression can be computed using either of the following methods:

  1. Geometric Approach
  2. Probabilistic Approach