R Deep Learning Projects: Master the techniques to design and develop neural network models in R by Yuxi (Hayden) Liu & Pablo Maldonado
Author:Yuxi (Hayden) Liu & Pablo Maldonado [Liu, Yuxi (Hayden)]
Language: eng
Format: epub
Tags: COM037000 - COMPUTERS / Machine Theory, COM018000 - COMPUTERS / Data Processing, COM062000 - COMPUTERS / Data Modeling and Design
Publisher: Packt Publishing
Published: 2018-02-21T23:00:00+00:00
Distribution of reconstruction error in the test set
From the plot, we see that we can set up the threshold value at 15, that is, observations with a reconstruction error above 15 would be marked as outliers:
threshold <- 15
y_preds <- sapply(error, function(x) ifelse(x>threshold,"outlier","normal")})
Once this is done, we can calculate the confusion matrix. This is a useful way of visualizing what the model is doing:
# Confusion matrix
table(y_preds,y_test)
This gives us the following:
y_test
y_preds normal outlier
normal 5707 496
outlier 3265 532
So clearly we could do better. Perhaps the vertical stroke shared by digits 1 and 7 contributes to the huge error rate. We caught, however, a bit over 50% of the outlier cases with this simple architecture. One way to improve this would be to add more hidden layers. We will use this trick later in this chapter.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8309)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6794)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6770)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6657)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6441)
Driving Data Quality with Data Contracts by Andrew Jones(6383)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6142)
Learning SQL by Alan Beaulieu(6004)
Weapons of Math Destruction by Cathy O'Neil(5795)
Big Data Analysis with Python by Ivan Marin(5390)
Data Engineering with dbt by Roberto Zagni(4396)
Solidity Programming Essentials by Ritesh Modi(4045)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3901)
Pandas Cookbook by Theodore Petrou(3604)
Blockchain Basics by Daniel Drescher(3305)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2914)
Feature Store for Machine Learning by Jayanth Kumar M J(2819)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2803)
Mastering Python for Finance by Unknown(2748)
