PCA Explorer

Domain: Mutu dan Analisis Lanjutan · SQalytics · SVD decomposition · scree plot · biplot · $T^2$/Q-residual diagnostics

1 Introduksi

1.1 Latar Belakang

Principal Component Analysis (PCA) adalah teknik unsupervised dimensionality reduction klasik (Pearson, 1901; Hotelling, 1933): cari kombinasi linear orthogonal dari variabel asli yang memaksimalkan varians. Komponen pertama (PC1) capture varians terbesar, PC2 capture varians terbesar yang orthogonal ke PC1, dan seterusnya. Hasil: representasi data di subspace dimensi rendah ($k \ll p$) dengan minimum information loss.

Aplikasi sains pangan: visualisasi multivariate sensory profile (panelis × deskriptor), eksplorasi NIR/HPLC spectra, deteksi outlier batch produksi, basis untuk PLS regression, SIMCA classification, MDPREF preference mapping. PCA tidak butuh assumption distribusi, tetapi sensitif terhadap skala variabel (wajib standarisasi bila satuan berbeda).

1.2 Tujuan Modul

Modul PCA Explorer di SQalytics ditujukan untuk:

1.3 Posisi di Antara Alternatif

Pilih PCA Explorer untuk unsupervised dimensionality reduction + exploration. Untuk supervised regression, pakai PLSR Studio. Untuk clustering, pakai Cluster Analysis Explorer. Untuk classification, pakai Class Modelling (SIMCA). Untuk preference mapping internal, pakai Preference Mapping.

2 Metode

2.1 Dasar Teoretis

Data matrix $\mathbf{X}_{n \times p}$ (centered, optional standardized). PCA decomposition via Singular Value Decomposition (SVD):

$$\boxed{\, \mathbf{X} = \mathbf{U} \boldsymbol{\Sigma} \mathbf{V}^T \,}$$

dengan:

Scores $\mathbf{T} = \mathbf{U} \boldsymbol{\Sigma} = \mathbf{X} \mathbf{V}$ (proyeksi ke PC axes).

Variance explained PC $k$:

$$\text{VE}_k = \frac{\sigma_k^2}{\sum_{j=1}^{r} \sigma_j^2} \times 100\%$$

Cumulative variance $\text{CVE}_k = \sum_{j=1}^{k} \text{VE}_j$.

Kaiser criterion — retain PC dengan eigenvalue $\lambda_k = \sigma_k^2 / (n-1) > 1$ (standardized data).

Scree plot — eigenvalue vs PC number; pilih PC sebelum "elbow" (Cattell, 1966).

Biplot (Gabriel, 1971) — overlay scores + loadings pada single plot:

Hotelling's $T^2$ untuk multivariate outlier detection:

$$T_i^2 = \sum_{k=1}^{K} \frac{t_{ik}^2}{\lambda_k}$$

Threshold $T^2_{0.95} = K(n-1)/(n-K) \cdot F_{K, n-K, 0.95}$.

Q-residual — sum-of-squares unexplained:

$$Q_i = \| \mathbf{x}_i - \hat{\mathbf{x}}_i \|^2$$

Varimax rotation (Kaiser, 1958) — orthogonal rotation untuk maksimasi variance of squared loadings (sparse + interpretable):

$$\max \sum_k \left[ \frac{1}{p} \sum_j (v_{jk}^2)^2 - \left( \frac{1}{p} \sum_j v_{jk}^2 \right)^2 \right]$$

2.2 Persamaan Inti

2.3 Asumsi & Batas Validitas

AsumsiKonsekuensi jika dilanggarCara cek di SQalytics
Variabel di-standarisasi (skala beda)Variabel besar dominate PC1Default z-score on
Linear relations dominatePCA miss non-linearPakai kernel PCA atau t-SNE
Multivariate distribution kontinyuDiskrit data biasVariabel kontinyu preferred
$n > p$ atau $n > 5 \times$ PC retainedUnreliable loadingsModul flag $n$ kecil
Outlier dikontrolPC1 narik ke outlier$T^2$ + Q-residual check
Variabel tidak collinear ekstremLoading ambiguousCek correlation matrix

3 Cara Kerja

3.1 Step-by-Step di SQalytics

  1. Buka PCA Explorer dari domain Mutu dan Analisis Lanjutan.
  2. Muat matriks: rows = objek, columns = variabel numerik.
  3. Pilih preprocessing: center (default), center+scale (z-score, recommended).
  4. Pilih jumlah PC retained atau auto (cumulative ≥ 80% atau Kaiser eigenvalue > 1).
  5. (Opsional) aktifkan varimax rotation untuk loadings interpretasi mudah.
  6. Klik Run PCA.
  7. Tinjau:
    • Tab Scree Plot — eigenvalues + cumulative variance.
    • Tab Score Plot (PC1 vs PC2) — objek scatter.
    • Tab Loading Plot — variabel arrows.
    • Tab Biplot — score + loadings overlay.
    • Tab Diagnostics — $T^2$ + Q-residual outlier check.

3.2 Template Tabel Input + Contoh Data Sintetis

Sensory descriptor profile 15 wine samples (panel mean, 10 descriptors):

WineFloralFruityVegetalSpicyButteryOakyAcidicBitterAstringentSweet
A6.57.22.03.55.26.05.83.04.54.0
B7.07.51.83.25.56.25.52.84.24.5
C2.53.06.55.82.03.27.55.56.81.5
D2.83.26.86.02.23.07.85.87.01.2
… (15 wines × 10 descriptors)
SYNTHETIC Data sintetis sensory profile 15 wine samples × 10 deskriptor (Floral, Fruity, Vegetal, Spicy, Buttery, Oaky, Acidic, Bitter, Astringent, Sweet). CSV setara: docs/assets/example-data/id/quality-advanced/template_quality_pca.csv.

3.3 Contoh Luaran

Scree + variance:

PCEigenvalueVE (%)Cumulative (%)
15.252.052.0
22.828.080.0 ✓
30.99.089.0
40.55.094.0
50.33.097.0

PC1 + PC2 capture 80% — retain 2 PC (Kaiser: $\lambda_1, \lambda_2 > 1$).

Loadings PC1 + PC2:

DescriptorPC1PC2
Floral+0.42−0.12
Fruity+0.41−0.10
Vegetal−0.40+0.15
Spicy−0.35+0.25
Buttery+0.38+0.18
Oaky+0.32+0.30
Acidic−0.30+0.20
Bitter−0.28+0.45
Astringent−0.32+0.35
Sweet+0.20−0.40

Interpretasi PC1 (52%): floral-fruity-buttery (+) vs vegetal-spicy-acidic (−) → axis ripeness/sweetness vs greenness.

Interpretasi PC2 (28%): bitter-astringent-oaky (+) vs sweet (−) → axis tannin intensity.

Score plot: wines A, B di kuadran (+, −) — fruity sweet. Wines C, D di kuadran (−, +) — vegetal tannic.

Outlier diagnostics: Wine M $T^2 = 14.2$ (> threshold 8.5) — atypical multivariate; investigasi recipe outlier.

PCA Explorer — figure 01
Gambar 1. Panel (a) Scree plot — eigenvalue dan cumulative variance (PC1 52%, PC2 28%, retain 2 PC); panel (b) PCA biplotscore plot 15 wine samples dengan loading arrows 10 sensory descriptors.
Kesimpulan ringkas: "PCA wine sensory profile: PC1 (52%) + PC2 (28%) = 80% varians. PC1 axis ripeness (floral-fruity-buttery vs vegetal-spicy-acidic). PC2 axis tannin (bitter-astringent-oaky vs sweet). Wine grouping terlihat 2 cluster jelas: fruity-sweet (A, B) vs vegetal-tannic (C, D). Outlier Wine M dengan $T^2 >$ threshold — investigasi recipe deviation. Implikasi reformulasi: bila brand di kuadran (−, +) ingin reposition ke premium (+, −), kurangi vegetal+tannin, tambah floral+sweet via grape variety atau oak aging adjustment. Lanjut ke Preference Mapping overlay consumer preference vector pada PCA space ini, atau ke Cluster Analysis Explorer untuk formal grouping."

4 Kesimpulan

4.1 Relevansi Real-World

4.2 Where to Go from Here

Troubleshooting Cepat

PC1 dominate (> 80%) sendiri. Cek standardisasi; variabel skala besar mungkin dominate.
Loadings susah interpretasi. Aktifkan varimax rotation untuk sparser pattern.
Outlier menarik PC1. Remove outlier (dengan justifikasi) atau pakai robust PCA.

i Riwayat Revisi

TanggalRevisiPenulis
2026-05-12Draft v2 publikasi (KaTeX SVD + variance + biplot + $T^2$/Q + varimax + APA Pearson/Hotelling/Gabriel/Jolliffe)Claude
2026-05-12Konversi MD → HTML (W5 quality-advanced batch)Claude

4 Referensi