Question: sigmold.py 33 import math 34 def sigmoid (z): 35 36 Compute the sigmoid function yourself using math.exp 37 (rather than using scipy). 38 39 >>>
sigmold.py 33 import math 34 def sigmoid (z): 35 36 Compute the sigmoid function yourself using math.exp 37 (rather than using scipy). 38 39 >>> sigmoid (0) 40.5 41 42 >sigmoid (-10) 43 4.5397868702434395e-05 45 >sigmoid (18) 46 0.99995460213129761 47 48 Params: z (float) 49 Returns: sigmoid(z) 50 51 an a 52 pass # ADD YOUR CODE HERE, REPLACING pass 54 def timingWrapper (n): 56 """Time the signoidWrapper function using timeit. 57 58 Use the function call 'sigmoidwrapper (-10)' 59 Test data is not provided, since this will depend on your machine 50 and will vary subtly each time you run it. 2 Documentation: https://docs.python.org/3/library/timeit.html 64 5 6 Params: n (int): # of executions of the function Returns: (float) #seconds required to execute the function n times pass # ADD YOUR CODE HERE, REPLACING pass
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
