Answers.Body: <p>There are several loss functions that you can use for binary classification. For example, you could use the <a href="https://en.wikipedia.org/wiki/Cross_entropy" rel="nofollow noreferrer"><strong>binary cross-entropy</strong></a> or the <a href="https://en.wikipedia.org/wiki/Hinge_loss" rel="nofollow noreferrer"><strong>hinge</strong></a> loss functions.</p>
  <p>See, for example, the tutorials <a href="https://machinelearningmastery.com/binary-classification-tutorial-with-the-keras-deep-learning-library/" rel="nofollow noreferrer">Binary Classification Tutorial with the Keras Deep Learning Library</a> (2016) and <a href="https://machinelearningmastery.com/how-to-choose-loss-functions-when-training-deep-learning-neural-networks/" rel="nofollow noreferrer">How to Choose Loss Functions When Training Deep Learning Neural Networks</a> (2019) by Jason Brownlee. Have also a look at Keras <a href="https://keras.io/losses/" rel="nofollow noreferrer">documentation of its available loss functions</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-08T12:17:42.840Z
Answers.LastActivityDate: 2021-12-10T21:24:25.420Z
Answers.LastEditDate: 2021-12-10T21:24:25.420Z
Answers.UserDisplayName: nbro
Body: <p>I plan to create a neural network using Python, Keras, and TensorFlow. All the tutorials I have seen so far are concerned with image recognition. However, the goal of my program would be to take in 10+ inputs and calculate a binary output (true/false) instead.</p>
  <p>Which loss function should I use for my task?</p>
  
Tags: <neural-networks><machine-learning><classification><objective-functions><binary-classification>
Title: Which loss function should I use for binary classification?
UserDisplayName: IUBIU
ThreadText: # Which loss function should I use for binary classification?
  
  (Asked by: username_0 on 2019-07-08)
  
  I plan to create a neural network using Python, Keras, and TensorFlow. All the tutorials I have seen so far are concerned with image recognition. However, the goal of my program would be to take in 10+ inputs and calculate a binary output (true/false) instead.
  
  Which loss function should I use for my task?
  
  **Tags:** neural-networks, machine-learning, classification, objective-functions, binary-classification
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-07-08. Score: 1 | Accepted answer
  
  There are several loss functions that you can use for binary classification. For example, you could use the [**binary cross-entropy**](https://en.wikipedia.org/wiki/Cross_entropy) or the [**hinge**](https://en.wikipedia.org/wiki/Hinge_loss) loss functions.
  
  See, for example, the tutorials [Binary Classification Tutorial with the Keras Deep Learning Library](https://machinelearningmastery.com/binary-classification-tutorial-with-the-keras-deep-learning-library/) (2016) and [How to Choose Loss Functions When Training Deep Learning Neural Networks](https://machinelearningmastery.com/how-to-choose-loss-functions-when-training-deep-learning-neural-networks/) (2019) by Jason Brownlee. Have also a look at Keras [documentation of its available loss functions](https://keras.io/losses/).
  
  
  ---
  
  