+ 3

is anyone help me to fix the bug in my code

sigmoid function last problem of machine learning course import math w1, w2, b, x1, x2 = [float(x) for x in input().split()] def sigmoid(x): return (1/(1+math.e**(-x)) ) sig=sigmoid(w1*x1+w2*x2+b) print(format(sig,".3f"))

27th Apr 2021, 7:26 AM
Chaitanya
Chaitanya - avatar
3 Antworten
+ 4
See this code 👇 👇 w1, w2, b, x1, x2 = [float(x) for x in input().split()] import math output = w1*x1 + w2*x2 + b output = round(1/(1 + math.exp(output*-1)), 4) print(output)
27th Apr 2021, 7:29 AM
Sâñtôsh
Sâñtôsh - avatar
+ 3
thank you so much sir for your help..
27th Apr 2021, 7:40 AM
Chaitanya
Chaitanya - avatar
+ 3
U r welcome 👍
27th Apr 2021, 7:41 AM
Sâñtôsh
Sâñtôsh - avatar