Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Neural Networks with Keras

You're reading from  Hands-On Neural Networks with Keras

Product type Book
Published in Mar 2019
Publisher Packt
ISBN-13 9781789536089
Pages 462 pages
Edition 1st Edition
Languages
Author (1):
Niloy Purkait Niloy Purkait
Profile icon Niloy Purkait

Table of Contents (16) Chapters

Preface Section 1: Fundamentals of Neural Networks
Overview of Neural Networks A Deeper Dive into Neural Networks Signal Processing - Data Analysis with Neural Networks Section 2: Advanced Neural Network Architectures
Convolutional Neural Networks Recurrent Neural Networks Long Short-Term Memory Networks Reinforcement Learning with Deep Q-Networks Section 3: Hybrid Model Architecture
Autoencoders Generative Networks Section 4: Road Ahead
Contemplating Present and Future Developments Other Books You May Enjoy

Probing the predictions

Let's examine another review. To probe our predictions, we will make a few functions that will help us visualize our results better. Such a gauging function can also be used if you want to restrict your model's predictions to instances where it is most certain:

def gauge_predictions(n):
if (predictions[n]<=0.4) and (y_test[n]==0):
print('Network correctly predicts that review %d is negative' %(n))
elif (predictions[n] <=0.7) and (y_test[n]==1);
elif (predictions[n]>-0.7) and (y_test[n]==0):
else:
print('Network is not so sure. Review mp. %d has a probability score of %(n),
predictions[n])
def verify_predictions(n):
return gauge_predictions(n), predictions[n], decode_review(n, split='test')

We will make two functions to help us better visualize our network's errors, while also limiting our...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}