High-Dimensional Data and the Curse of Dimensionality
Scorri per mostrare il menu
High-dimensional data has many features, or columns. As you add more dimensions, data points spread farther apart, and the space becomes increasingly empty. This makes it hard to find patterns, because the distances between points lose meaning. This is called the curse of dimensionality — the challenge of analyzing data when there are too many features.
1234567891011121314151617181920212223242526272829import numpy as np import matplotlib.pyplot as plt # Generate random points in 2D np.random.seed(0) points_2d = np.random.rand(100, 2) # Generate random points in 3D points_3d = np.random.rand(100, 3) fig = plt.figure(figsize=(12, 5)) # Plot 2D points ax1 = fig.add_subplot(1, 2, 1) ax1.scatter(points_2d[:, 0], points_2d[:, 1], color='blue', alpha=0.6) ax1.set_title('100 Random Points in 2D') ax1.set_xlabel('X') ax1.set_ylabel('Y') # Plot 3D points ax2 = fig.add_subplot(1, 2, 2, projection='3d') ax2.scatter(points_3d[:, 0], points_3d[:, 1], points_3d[:, 2], color='red', alpha=0.6) ax2.set_title('100 Random Points in 3D') ax2.set_xlabel('X') ax2.set_ylabel('Y') ax2.set_zlabel('Z') plt.tight_layout() plt.show()
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 2
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Sezione 1. Capitolo 2