You can perform Principal Component Analysis (PCA) on a NumPy array without using libraries other than NumPy itself. Here is an example of how to do it from scratch in Python.

The essence of PCA is to project data with m-columns (features) into a subspace with m or fewer columns while retaining the essence of the original data. The principal components are the new axes that result from this projection. The fraction of the total variance explained by each component is given by the ratio of the eigenvalue of that component to the sum of all eigenvalues.

I hope this helps!
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence