Login using Social Account
     Continue with GoogleLogin using your credentials
The parameter values for the best model are returned in the form of a dictionary
best_values
by calling model
function.
The train and validation accuracies seem reasonable enough, leaving the impression of just fit, but not overfit or underfit model.
Let us evaluate this implication by getting the predictions for our test set and calculating the test set accuracies.
Call the predict
function and pass the final weight and bias matrices stored in best_values
, along with the test set.
Y_prediction_test = << your code comes here >>(best_values['final w'], best_values['final b'], test_set_x)
Now, let us calculate the accuracy of the model on the test set. Call the get_accuracies
function.
test_acc = << your code comes here >>(test_set_y, Y_prediction_test)
print("Test accuracy is: ",test_acc)
Print the final best parameters as follows:
print("Final best model:")
print("For Learning rate:" ,best_values['final_lr'], ", Epoch - ",best_values['epoch'])
print("Train accuracy: ", best_values['Train accuracy'])
print("Validation accuracy: ",best_values['Validation accuracy'])
print("Test accuracy is: ",test_acc)
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...