Logistic Regression predict function
In the previous tutorial, we wrote an optimization function that will output the learned w and b parameters. Now we can use w and b to predict the labels for our dataset X. So, in this tutorial, we will implement the predict() function. So we will implement a prediction function, but first, let's see what are the inputs and outputs to it: If we'll run our new function on previous values "predict(w, b, X)" we should receive the following results: From our results, we could say that we predicted two cats and one dog. But because input was not real images but just simple random test numbers, our predictions also don't mean anything.
Jul-19-2021, 07:40:45 GMT