Skip to content

Instantly share code, notes, and snippets.

View dylan-plummer's full-sized avatar

Dylan Plummer dylan-plummer

View GitHub Profile
@dylan-plummer
dylan-plummer / pathological_autoencoder_example.py
Created November 19, 2025 02:29
Visualization of a shallow vs deep autoencoder compared to PCA on a pathological example of a dataset similar to the XOR dataset in 2D which cannot be linearly separated.
import numpy as np
import matplotlib.pyplot as plt
from sklearn.neural_network import MLPRegressor
from sklearn.decomposition import PCA
from sklearn.preprocessing import StandardScaler
import itertools
# Generate 4D Hypercube Data
np.random.seed(42)
n_samples = 2000