instaPCA — 主成分分析

在瀏覽器中對 CSV 資料進行主成分分析(PCA),資料不會上傳。

應用程式

1. CSV Loading

Not selected

2. CSV Preview & Settings


* Preview shows maximum 10 rows × 10 columns

Variables: -
Samples: -
Principal Components: -

3. Analysis Settings

Analysis Method:

Details (click to expand)
  • Covariance (with standardization): Standardizes each variable to mean 0 and variance 1 before PCA. This is equivalent to correlation-matrix PCA, such as R's prcomp(..., scale.=TRUE) or Python PCA after StandardScaler. It is useful when variables use different units.
  • Covariance (centering only): Centers each variable at mean 0 and runs PCA on the covariance matrix. This matches the default behavior of R's prcomp and Python's sklearn.decomposition.PCA. Variables with larger variance will have more influence.
  • No centering/standardization: Uses the original values without transformation, corresponding to R's prcomp(center=FALSE, scale.=FALSE). This is generally not recommended, but can be appropriate for data that has already been centered.

Details (click to expand)
  • Re-standardize scores after PCA (optional): Runs PCA after centering, then rescales the principal component scores to variance 1.
  • Use population covariance (denominator n instead of n-1): Uses the sample count n as the covariance denominator instead of the usual sample-covariance denominator n-1. Leave this off for results comparable to the standard defaults in R and Python. Enable it only when the data represents the complete population.

4. Results Preview & Export

Preview displays up to 1000x1000. Export includes all data except plot data.

  • instaPCA 完全在您的瀏覽器中執行主成分分析(PCA)。CSV 資料由 JavaScript 在本機讀取與處理,因此絕不會上傳。
  • 預設的標準化分析結果可與 R 的 prcomp(scale.=TRUE) 對照。其他選項可讓您調整中心化、縮放及共變異數的計算方式。

使用方式

  1. 載入 CSV:選擇要分析的 CSV 檔案。
  2. CSV 預覽與設定:視需要轉置資料(交換列與欄),並指定變數名稱所在的列及樣本名稱所在的欄。預覽最多顯示 10 列 × 10 欄,並會顯示變數數、樣本數及主成分數。
  3. 分析設定:選擇分析方法及選用項目(說明如下),然後執行分析。
  4. 結果預覽與匯出:預覽最多顯示 1000 × 1000。可匯出為 CSV、Markdown 或 XLSX;匯出內容包含圖表資料以外的所有資料。

統計結果的解讀取決於變數選擇與前處理方式;比較不同分析結果前,請先確認這些設定。資料讀取與計算皆由本機 JavaScript 完成,不需要昂貴的統計軟體或命令列操作。

分析方法

  • 共變異數(含標準化):在執行 PCA 前,將每個變數標準化為平均數 0、變異數 1。這相當於以相關矩陣為基礎的 PCA,例如 R 的 prcomp(..., scale.=TRUE),或在 Python 中以 StandardScaler 標準化後再執行 PCA。當各變數使用不同單位時特別有用。
  • 共變異數(僅中心化):將每個變數中心化為平均數 0,再以共變異數矩陣執行 PCA。這與 R 的 prcomp 及 Python 的 sklearn.decomposition.PCA 的預設行為相同。變異數較大的變數影響力也較大。
  • 不中心化/不標準化:直接使用原始值,不做任何轉換,對應 R 的 prcomp(center=FALSE, scale.=FALSE)。一般不建議使用,但對已經中心化的資料可能適用。

選用項目

  • PCA 後重新標準化分數(選用):先在中心化後執行 PCA,再將主成分分數重新縮放為變異數 1。
  • 使用母體共變異數(分母為 n 而非 n-1):以樣本數 n 作為共變異數的分母,而非一般樣本共變異數所使用的分母 n-1。若要得到可與 R 和 Python 標準預設值對照的結果,請保持關閉。僅在資料代表完整母體時才啟用。

學術研究中的使用實例

2026-08 更新

Fujita-Yoshigaki, J., Kujiraoka, S., Yokoyama, M., & Katsumata-Kato, O. (2026). Changes in microRNA Expression by An Inhibitor for Src kinase Signaling in Rat Parotid Acinar Cells. International Journal of Oral-Medical Sciences, 24(3), 109–115.

重要注意事項與免責聲明

使用前須知

  • instaPCA 旨在用於探索性分析及學習。請勿將其作為醫療決策或其他重大商業決策的唯一依據。
  • 在採信結果之前,請確認輸入資料的內容與結構是否適當。

免責聲明

  • 對於因使用本工具而產生的任何損失或損害,網站經營者及工具製作者概不負責。
  • 請仔細確認輸出結果。依據結果所做的決策與行動,由您自行負責。
  • 本工具的內容及提供狀態可能隨時變更,恕不另行通知。

著作權

本網站所發布之內容及程式的著作權,歸 Musashino Software 所有。

完整原文說明(英文)