MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / predict_prob

Function predict_prob

machine_learning/logistic_regression.py:143–146  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

141 print("theta: ", theta) # printing the theta i.e our weights vector
142
143 def predict_prob(x):
144 return sigmoid_function(
145 np.dot(x, theta)
146 ) # predicting the value of probability from the logistic regression algorithm
147
148 plt.figure(figsize=(10, 6))
149 plt.scatter(x[y == 0][:, 0], x[y == 0][:, 1], color="b", label="0")

Callers 1

Calls 1

sigmoid_functionFunction · 0.70

Tested by

no test coverage detected