C1_W3_Logistic_Regression Lab

UNQ_C4

GRADED FUNCTION: predict

I have completed the code for the predict function and when i run it there are no errors.
However, when i go onto to run the uneditable predict code In [2]: i get the following error -

NameError

Traceback (most recent call last)

in

5 tmp_X = np. random. randn (4, 2) - 0.5

6

→ 7 tmp_p = predict (tmp_X, tmp_w, tmp_b)

8 print (f’Output of predict: shape {tmp_p.shape}, value {tmp_p}')

g

in predict (X, w, b)

26

27

==-> 28

29

30

Calculate the prediction from the model

f_wb = sigmoid(z_wb)

Calculate the prediction for that training example

NameError: name ‘sigmoid’ is not defined

Herewith the lab reference number: fqubypinwvtm

You have posted your question in the NLP course forum area.
Are you attending the NLP course?

There is a Logistic Regression assignment in NLP C1, but it is in Week 1, not Week 3. And this code doesn’t look familiar to me from the NLP C1 W1 version of Logistic Regression.

Sorry this should have gone into the Machine Learning Specialisation course thread. I will find it and post it there