Search

(공개 예정) 여러 변수(차원)들을 한 화면에 시각화하는 방법들

데이터 시각화의 선구자인 “Edward Tufte”는 그의 저서 “Envisioning Information”에서 다음과 같이 말했습니다.
“평평한 2차원(종이, 화면)의 속박을 벗어나는 것은 데이터 속에 담긴 정보를 제대로 그려내기 위해 필수적인 일이다. 왜냐하면, 우리가 이해하고자 하는 모든 흥미로운 것들은 필연적으로 여러개의 변수들로 구성되어 있기 때문이다.”
"Escaping this flatland is the essential task of envisioning information —  for all the interesting worlds (physical, biological, imaginary, human) that we seek to understand are inevitably and happily multivariate in nature."
복잡다단한 현실의 반영인 데이터는 하나의 창 안에 두개의 차원(X, Y)을 사용하여 표현하기에는 너무 많은 변수를 포함하고 있기 쉽습니다. 이번 강의와 블로그에서는 여러 차원을 동시에 사용하여 데이터셋에 담긴 변수들 간의 복잡한 관계를 효과적으로 시각화하는 방법을 다루어 보겠습니다.
these methods work to increase (1) the number of dimensions that can be represented on plane surfaces and (2) the data density (amount of information per unit area).
Edward Tufte, Envisioning Information
Title: 다양한 차원을 시각화하는 방법: 데이터의 숨겨진 구조를 이해하자
목차:
1.
들어가며
2.
차원 축소 기술 소개 2.1 PCA (주성분 분석) 2.2 t-SNE (t-분산 확률적 이웃 포함) 2.3 UMAP (균일한 매니폴드 근사와 투영)
3.
다차원 시각화 도구와 라이브러리 3.1 Python 라이브러리: Matplotlib, Seaborn, Plotly 3.2 웹 기반 도구: TensorBoard, Kepler.gl
4.
다차원 시각화를 통한 인사이트 도출
5.
마무리
6.
들어가며 데이터 분석에서 가장 중요한 요소 중 하나는 데이터를 이해하는 것입니다. 고차원 데이터를 시각화하면 데이터의 구조와 패턴을 명확하게 이해할 수 있습니다. 이 블로그에서는 다양한 차원을 시각화하는 방법과 도구를 소개합니다.
7.
차원 축소 기술 소개 다차원 데이터를 시각화하기 위해 차원 축소 기술을 사용합니다. 차원 축소는 데이터의 중요한 정보를 유지하면서 차원을 줄이는 과정입니다.
2.1 PCA (주성분 분석) PCA는 데이터의 분산을 최대한 보존하면서 고차원 데이터를 저차원 데이터로 변환하는 선형 알고리즘입니다. 주로 데이터의 주성분을 추출하여 차원을 축소합니다.
2.2 t-SNE (t-분산 확률적 이웃 포함) t-SNE는 데이터의 유사성을 기반으로 고차원 데이터를 저차원 공간에 매핑하는 비선형 알고리즘입니다. 특히 데이터의 클러스터 구조를 잘 보존하기 때문에 데이터의 그룹화를 확인하는 데 적합합니다.
2.3 UMAP (균일한 매니폴드 근사와 투영) UMAP은 t-SNE와 유사한 비선형 차원 축소 방법이지만, 더 빠른 계산 속도와 데이터의 지역 및 글로벌 구조를 동시에 보존하는 특징이 있습니다.
1.
다차원 시각화 도구와 라이브러리 다양한 도구와 라이브러리를 사용하여 차원 축소 결과를 시각화할 수 있습니다.
3.1 Python 라이브러
Exploratory Data Analysis (EDA) is a crucial step in understanding and summarizing the main characteristics of a dataset, often using visual methods. For multi-dimensional data, EDA can be more challenging due to the higher number of variables involved. Here is a step-by-step guide to perform EDA on multi-dimensional data:
1.
Data collection and cleaning:
Gather the dataset that you want to analyze.
Clean and preprocess the data by handling missing values, correcting inconsistencies, and transforming variables if necessary.
1.
Univariate analysis:
Start by analyzing each variable individually, using descriptive statistics such as mean, median, mode, standard deviation, skewness, and kurtosis.
Visualize each variable using histograms, box plots, and density plots to understand their distributions.
1.
Bivariate analysis:
Investigate the relationships between pairs of variables.
Use scatter plots to visualize relationships between continuous variables.
For categorical vs. continuous variables, use box plots, violin plots, or swarm plots.
For categorical vs. categorical variables, use contingency tables, mosaic plots, or stacked bar plots.
Compute correlation coefficients (Pearson, Spearman, or Kendall) for continuous variables to measure the strength and direction of linear relationships.
1.
Dimensionality reduction techniques:
Apply techniques like Principal Component Analysis (PCA), t-Distributed Stochastic Neighbor Embedding (t-SNE), or Uniform Manifold Approximation and Projection (UMAP) to reduce the number of dimensions while preserving the structure and relationships in the data.
Visualize the reduced data using scatter plots or other relevant visualizations.
1.
Multivariate visualization:
Create visualizations that display multiple variables at once, such as parallel coordinates plots, scatterplot matrices, or heatmaps of correlations.
Utilize faceting techniques like small multiples or trellis plots to compare subsets of the data across multiple dimensions.
1.
Clustering and outlier detection:
Use clustering algorithms like K-means, DBSCAN, or hierarchical clustering to group similar data points together.
Detect and analyze outliers using methods like Tukey's fences, Z-scores, or the IQR method.
1.
Feature importance and selection:
Determine the importance of each feature using methods like recursive feature elimination, permutation importance, or regularization techniques (LASSO, Ridge, or Elastic Net).
Select the most important features to focus on during further analysis and modeling.
1.
Interpretation and reporting:
Summarize your findings from the EDA, highlighting any interesting patterns, relationships, or outliers.
Document your insights and make recommendations for further analysis or modeling.
Remember that EDA is an iterative process, and you may need to revisit earlier steps as you uncover new information about your dataset.
2개 차원
3개 차원
….
7개 차원