Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Visualizing Outliers in 2D Space | Foundations of Outlier and Novelty Detection
Outlier and Novelty Detection in Practice

bookVisualizing Outliers in 2D Space

Visualization is a crucial tool for understanding how outliers are distributed in your data, especially when working with two-dimensional datasets. By plotting your data, you can directly observe clusters, trends, and unusual points that may not be apparent from summary statistics alone. Visual inspection often provides the first indication of whether your data contains isolated outliers, clustered anomalies, or more subtle deviations from expected patterns. This can guide your selection of detection methods and help you interpret the results of automated algorithms.

1234567891011121314151617181920212223
import numpy as np import matplotlib.pyplot as plt # Generate normal data rng = np.random.RandomState(42) X_normal = rng.normal(loc=0, scale=1, size=(100, 2)) # Inject outliers X_outliers = rng.uniform(low=-6, high=6, size=(8, 2)) # Combine data X_combined = np.vstack([X_normal, X_outliers]) # Plot plt.figure(figsize=(7, 7)) plt.scatter(X_normal[:, 0], X_normal[:, 1], c="blue", label="Normal data") plt.scatter(X_outliers[:, 0], X_outliers[:, 1], c="red", label="Outliers", edgecolor="black", s=80) plt.xlabel("Feature 1") plt.ylabel("Feature 2") plt.title("2D Scatter Plot with Injected Outliers") plt.legend() plt.grid(True) plt.show()
copy
Note
Note

Visual patterns in 2D plots can reveal different types of anomalies. Isolated points far from the main cluster may indicate global outliers, while small groups of points separated from the majority could signal local anomalies. Sometimes, outliers may align along a particular direction or pattern, suggesting systematic deviations. Recognizing these patterns visually helps you understand the nature of anomalies present and whether they are due to random noise, data entry errors, or underlying structure in the data.

question mark

Which of the following statements best describes how to interpret a 2D scatter plot with outliers?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Awesome!

Completion rate improved to 4.55

bookVisualizing Outliers in 2D Space

Swipe um das Menü anzuzeigen

Visualization is a crucial tool for understanding how outliers are distributed in your data, especially when working with two-dimensional datasets. By plotting your data, you can directly observe clusters, trends, and unusual points that may not be apparent from summary statistics alone. Visual inspection often provides the first indication of whether your data contains isolated outliers, clustered anomalies, or more subtle deviations from expected patterns. This can guide your selection of detection methods and help you interpret the results of automated algorithms.

1234567891011121314151617181920212223
import numpy as np import matplotlib.pyplot as plt # Generate normal data rng = np.random.RandomState(42) X_normal = rng.normal(loc=0, scale=1, size=(100, 2)) # Inject outliers X_outliers = rng.uniform(low=-6, high=6, size=(8, 2)) # Combine data X_combined = np.vstack([X_normal, X_outliers]) # Plot plt.figure(figsize=(7, 7)) plt.scatter(X_normal[:, 0], X_normal[:, 1], c="blue", label="Normal data") plt.scatter(X_outliers[:, 0], X_outliers[:, 1], c="red", label="Outliers", edgecolor="black", s=80) plt.xlabel("Feature 1") plt.ylabel("Feature 2") plt.title("2D Scatter Plot with Injected Outliers") plt.legend() plt.grid(True) plt.show()
copy
Note
Note

Visual patterns in 2D plots can reveal different types of anomalies. Isolated points far from the main cluster may indicate global outliers, while small groups of points separated from the majority could signal local anomalies. Sometimes, outliers may align along a particular direction or pattern, suggesting systematic deviations. Recognizing these patterns visually helps you understand the nature of anomalies present and whether they are due to random noise, data entry errors, or underlying structure in the data.

question mark

Which of the following statements best describes how to interpret a 2D scatter plot with outliers?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 4
some-alt