Random Projection (Johnson-Lindenstrauss)
Random projection multiplies the data by a random matrix with far fewer columns than variables. The Johnson-Lindenstrauss lemma guarantees that, with enough target dimensions, all pairwise distances are kept within a chosen relative error, so distance-based methods can run on the much smaller matrix.
무작위 투영은 자료에 변수 수보다 훨씬 적은 열을 가진 무작위 행렬을 곱합니다. 존슨-린덴스트라우스 보조정리에 따르면 목표 차원이 충분하면 모든 쌍별 거리가 정한 상대오차 안에서 유지되므로, 거리 기반 방법을 훨씬 작은 행렬에서 수행할 수 있습니다.
Can I shrink a very wide data set to a few hundred columns while keeping distances between observations almost unchanged?
변수가 매우 많은 자료를 관측치 사이 거리를 거의 바꾸지 않고 수백 개 열로 줄일 수 있는지 알고 싶습니다.
The number of target dimensions follows from the Johnson-Lindenstrauss bound for the number of rows and the allowed error eps, unless you set it. A Gaussian or sparse random matrix projects the standardized data, and the ratio of projected to original squared distance is computed for a sample of pairs to show the distortion actually achieved.
When to use Random Projection (Johnson-Lindenstrauss)
- You have thousands of variables and need a fast reduction before clustering, nearest-neighbour search or kernel methods.
- You want a reduction whose distance guarantee does not depend on the data.
- Computing principal components on the full matrix is too slow.
When to use something else
- You need interpretable axes or explained variance: use Principal Component Analysis (PCA)
- You have only a few dozen variables: use Principal Component Analysis (PCA)
- You want a nonlinear map for visualization: use UMAP Dimensionality Reduction
Assumptions and requirements
- Euclidean distances between (standardized) rows are what must be preserved
- The guarantee holds with high probability, not for every random draw
- Projected axes have no substantive meaning
What the analysis reports
- Number of target dimensions and the Johnson-Lindenstrauss bound
- Projected coordinates
- Distortion of squared distances: mean, spread, range and share within 1 plus or minus eps
- Share of total variance kept
How to report it
A Gaussian random projection reduced [value] variables to k = [value] dimensions; squared distances were kept within 1 +/- [value] for [value]% of sampled pairs (mean ratio [value]).
Related methods
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with scikit-learn and direct computations (formulas, enumeration or simulation) at a stated tolerance of 1e-12.
독립 계산. scikit-learn·직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과(허용오차 1e-12).
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Random Projection (Johnson-Lindenstrauss) on Quorant
- Data you need
- a table (CSV or Excel) with predictor (feature) columns
- Price
- 250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.