liveBook · Manning

Deep learning

As explained in Outlier Detection in Python

Deep learning is machine learning based on neural networks with multiple computational layers that learn hierarchical representations.

Deep learning uses neural networks with more than a few layers. Each layer calculates numeric values from its inputs and passes them to the next; the final layer produces a prediction. For an image, inputs can be pixel values; for a table, they can be feature values. In outlier detection, deep networks provide several ways to judge whether an object is unusual. section 16.1 section 16.0

Figure 16.1 Example of a neural network. The square points at the left are the input. The circular points are neurons. During prediction, as input is given to the neural network and neurons calculate their values (floating point numbers each neuron will contain) one layer at a time (left to right) based on the input, with the final (rightmost) layer containing the prediction for the input.

Follow the input from left to right: neurons calculate values one layer at a time, and the rightmost layer holds the prediction. section 16.1

For images, deep-learning approaches include:

  • Reconstruct the image after compressing it, then use reconstruction error to estimate how unusual it is. section 16.3.1
  • Use a generative model to assess unusual data, including approaches that attempt to regenerate it. section 16.3.1
  • Inspect a classifier’s confidence: low probabilities across its known classes can suggest an out-of-distribution image. section 16.3.1
  • Create embeddings and apply detectors such as Isolation Forest or k-nearest neighbors; embeddings made for classification or regression may not work well for this purpose. section 16.3.1
  • Alter an image, perhaps by rotating it, and test whether a model identifies the alteration confidently; unusual images may yield more errors or lower confidence. section 16.3.1

Deep learning is particularly useful for image, video, and audio outlier detection, but it is typically less useful for tabular data than established alternatives. Deep networks can require substantial training data, run more slowly, and be harder to tune. Choose an approach according to the data and the signal it provides, rather than treating any one score as a universal test. section 16.0 section 16.3.1

How Outlier Detection in Python covers it

How deep it goes
Explains layer-by-layer prediction and surveys image-detection approaches, but does not specify training procedures or implementations in the supplied evidence.
Examples
Uses image classification, low-confidence bird classifications, and rotated images to illustrate predictions and potential outlier signals.
What it assumes
Assumes basic statistics and some Python familiarity while introducing neural-network inputs, layers, and predictions without requiring prior outlier-detection knowledge.
What you can do after
Evaluate/understand it by comparing image-outlier signals and weighing deep learning’s data, speed, tuning, and tabular-data trade-offs.
How it connects
Connects neural networks with reconstruction error, generative models, classifier confidence, embeddings, Isolation Forest, and k-nearest neighbors.

Also explained in

Compare how 11 books explain deep learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Outlier Detection in Python. The section links point to the parts of the book it draws on.