Skip to content

Commit

Permalink
Update loss_functions.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
bfortuner committed Nov 29, 2017
1 parent ced172c commit 54250a4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions docs/loss_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ The graph above shows the range of possible loss values given a true observation

.. rubric:: Code

::

def cross_entropy(true_label, prediction):
if true_label == 1:
return -log(prediction)
else:
return -log(1 - prediction)
.. literalinclude:: ../code/loss_functions.py
:pyobject: CrossEntropy

.. rubric:: Math

Expand Down

0 comments on commit 54250a4

Please sign in to comment.