INNER CODE UNIT · Python
predict_dec
amanchadha/coursera-deep-learning-specialization · C2 - Improving Deep Neural Networks Hyperparameter tuning, Regularization and Optimization/Week 2/opt_utils.py:235
def predict_dec(parameters, X):
"""
Used for plotting decision boundary.
Arguments:
parameters -- python dictionary containing your parameters
X -- input data of size (m, K)
Returns
predictions -- vector of predictions of our model (red: 0 / blue: 1)
"""
# Predict using forward propagation and a classification threshold of 0.5
a3, cache = forward_propagation(X, parameters)
predictions = (a3 > 0.5)
return predictions
def load_dataset():