High-Dimensional Data and the Curse of Dimensionality
Deslize para mostrar o 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()
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 2
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Seção 1. Capítulo 2