We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b25f54 commit d3fe18eCopy full SHA for d3fe18e
learning.py
@@ -21,6 +21,7 @@
21
def euclidean_distance(X, Y):
22
return math.sqrt(sum((x - y)**2 for x, y in zip(X, Y)))
23
24
+
25
def cross_entropy_loss(X,Y):
26
n=len(X)
27
return (-1.0/n)*sum(x*math.log(y)+(1-x)*math.log(1-y) for x,y in zip(X,Y) )
0 commit comments