Principal Component Analysis (PCA) is a popular technique for reducing the dimensionality of large datasets. Here's how you can perform PCA using only NumPy:

    1. Center the data by subtracting the mean from each column of the array.
    2. Compute the covariance matrix of the centered data.
    3. Compute the eigenvectors and eigenvalues of the covariance matrix. The eigenvectors represent the principal components, and the corresponding eigenvalues quantify the amount of variance explained by each component.
    4. Sort the eigenvectors in descending order based on their corresponding eigenvalues.
    5. Use the sorted eigenvectors to form the transformation matrix.
    6. Project the data onto the principal components by multiplying the centered data by the transformation matrix.

Here's an example implementation:
```python
import numpy as np

def pca(data):
    # Step 1: center the data
    centered = data - np.mean(data, axis=0)

    # Step 2: compute the covariance matrix
    cov = np.cov(centered, rowvar=False)

    # Step 3: compute the eigenvectors and eigenvalues
    eigenvals, eigenvecs = np.linalg.eigh(cov)

    # Step 4: sort the eigenvectors in descending order
    idx = np.argsort(eigenvals)[::-1]
    eigenvecs = eigenvecs[:, idx]
    eigenvals = eigenvals[idx]

    # Step 5: form the transformation matrix
    transform = eigenvecs.T

    # Step 6: project the data onto the principal components
    projected = np.dot(centered, transform)

    # Compute the fraction of the total variance explained by each component
    explained_var = eigenvals / np.sum(eigenvals)

    return projected, transform, explained_var
```
The `pca` function takes a NumPy array `data` as input and returns the projected data onto the principal components, the transformation matrix, and the fraction of the total variance explained by each component.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence