All articles →

100 Exercises / numerical computation / Numerical Computation: 100 Exercises

Introduction to eigenvalue problems in manufacturing | Analyzing equipment vibration, PCA, and process networks with Python

Explore eigenvalue algorithms, SVD, PCA, PageRank, and graph partitioning in Python using fictional vibration sensors and process networks.

This article connects eigenvalue problems, iterative methods, matrix decomposition, and graph analysis to Equipment maintenance, sensor monitoring, and process improvement in a fictional precision parts factory. The goal is not to calculate formulas themselves, but to determine which variation to prioritize, what to approximate with large-scale data, and which steps are most prone to downtime risks.

Note This material was adapted from notebooks used in corporate training by Surikobo or its representative, Hiroshi Wayama, with permission from the participating companies.
All examples use fictional data, not records from real companies or factories.

Introduction: Practical Challenges in Manufacturing Covered in This Article

The fictional factory has correlated vibration signals and a process network with material transfers and rework loops. Individual averages or alarm thresholds may miss shared variation. We use matrix decompositions to identify patterns worth investigating, without treating them as proof of a fault cause.

Common situations on site

  • The number of sensors is increasing, but only the number of alarms is rising.
  • Correlated vibrations are monitored at individual thresholds for each facility
  • All eigenvalues are calculated precisely, but only the top few are used for decision-making
  • Although there is a process chart, it has not been able to evaluate the overall impact, including reprocessing loops and information dependence.

Why is this issue so difficult to judge?

Each element of a matrix is a local relationship, but eigenvalues and eigenvectors represent the repeated propagation of the relationship. On the other hand, the larger the matrix, the more trade-offs arise between accuracy, computation time, and memory. Furthermore, mathematically large components do not directly imply causality or investment returns. It is necessary to interpret site knowledge, data quality, and downtime losses together.

Overview of the Exercises

No.ThemeJudgment in the manufacturing industry
041What is the eigenvalue problem?Identifying Dominant Facility Changes
042Power iterationHigh-speed estimation of maximum variation modes
043Inverse iterationExtracting eigenvalues near a selected shift
044QR algorithmBulk calculation of eigenvalues of small and medium-sized matrices
045Lanczos methodLowering the Dimensionality of Large-Scale Symmetry Problems
046Arnoldi MethodApproximate asymmetric process propagation
047singular value decompositionCompressing and reconfiguring sensor information
048Relationship with PCADesigning monitoring metrics and contribution rates
049Relationship with PageRankRecursive evaluation of process impact
050Applications in graph analysisIdentifying potential dividers and bottlenecks

Preparing the Python environment

Run the cells in order in Jupyter Notebook. [IN: n] identifies a code cell; [OUT: n] contains its tables, values, and figures. Low-order digits and runtimes may vary with library versions, BLAS, and hardware.

NumPy handles dense matrices, SciPy uses sparse matrices and iterative methods, pandas uses tables, and matplotlib handles graphs. Fixed random number seeds to ensure reproducibility.

Show setup code: libraries and display settings
[IN: 1]
%matplotlib inline

import platform
from IPython.display import display
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
from scipy import linalg, sparse
from scipy.sparse import linalg as spla

SEED = 42
rng = np.random.default_rng(SEED)
pd.set_option("display.precision", 4)
print("Python     :", platform.python_version())
print("NumPy      :", np.__version__)
print("pandas     :", pd.__version__)
print("SciPy      :", __import__("scipy").__version__)
print("matplotlib :", matplotlib.__version__)
[OUT: 1]
Python     : 3.14.4
NumPy      : 2.5.1
pandas     : 3.0.3
SciPy      : 1.18.0
matplotlib : 3.11.0

Creating the Fictional Data

We generate 120 hours of readings from six vibration sensors. Shared latent signals represent rotational imbalance and looseness; the drive-side amplitude increases during the last 20 hours. An eight-process directed network represents normal transfers and rework loops. All values are fictional.

Show setup code: generate the fictional data
[IN: 2]
n_time = 120
sensor_names = ["Drive-X", "Drive-Y", "Bearing-A", "Bearing-B", "Frame", "Outlet"]
t = np.arange(n_time)
mode_1 = np.sin(2 * np.pi * t / 18) + 0.18 * rng.normal(size=n_time)
mode_2 = 0.65 * np.sin(2 * np.pi * t / 7 + 0.8) + 0.18 * rng.normal(size=n_time)
loadings = np.array(
    [[1.00, 0.15], [0.88, 0.10], [0.58, 0.72], [0.52, 0.78], [0.30, 0.45], [0.20, 0.28]]
)
X = np.column_stack([mode_1, mode_2]) @ loadings.T + 0.16 * rng.normal(size=(n_time, 6))
X[-20:, :2] *= 1.35
sensor_df = pd.DataFrame(X, columns=sensor_names)

processes = [
    "Material",
    "Machining",
    "HeatTreat",
    "Grinding",
    "Wash",
    "Inspection",
    "Rework",
    "Shipping",
]
edges = [
    (0, 1, 1.00),
    (1, 2, 0.82),
    (1, 6, 0.18),
    (2, 3, 0.92),
    (2, 6, 0.08),
    (3, 4, 0.88),
    (3, 6, 0.12),
    (4, 5, 1.00),
    (5, 7, 0.86),
    (5, 6, 0.14),
    (6, 1, 0.55),
    (6, 3, 0.45),
]
A = np.zeros((8, 8))
for i, j, w in edges:
    A[i, j] = w

display(sensor_df.head().round(3))
print(f"sensor data shape: {sensor_df.shape}, process matrix shape: {A.shape}")
[OUT: 2]
Drive-X Drive-Y Bearing-A Bearing-B Frame Outlet
0 -0.043 0.061 -0.046 0.014 0.484 -0.116
1 0.081 0.498 1.042 0.421 0.292 0.275
2 1.111 0.564 0.684 0.823 0.473 0.201
3 1.017 0.693 0.578 0.512 0.357 0.124
4 0.639 0.673 0.057 0.022 -0.011 -0.004
sensor data shape: (120, 6), process matrix shape: (8, 8)

No.041: What is the eigenvalue problem?

Practical Use

The eigenvector of the covariance matrix is a representative pattern where multiple sensors move simultaneously. Eigenvalues represent the magnitude of variation along that pattern. It can organize which combinations of equipment are dominant and use it to prioritize inspections.

Model and Method

For a square matrix CC, a nonzero vector vv and a scalar λ\lambda

Cv=λvCv=\lambda v

When this equation holds, λ\lambda is an eigenvalue and vv is an eigenvector. Here, we use a correlation matrix so differences in sensor scales do not dominate the analysis. Both vv and −v-v represent the same eigendirection.

Check with Python

[IN: 3]
Z = (sensor_df - sensor_df.mean()) / sensor_df.std(ddof=1)
C = Z.corr().to_numpy()
eigvals, eigvecs = np.linalg.eigh(C)
order = np.argsort(eigvals)[::-1]
eigvals, eigvecs = eigvals[order], eigvecs[:, order]
eig_table = pd.DataFrame(
    {"eigenvalue": eigvals, "variance_ratio": eigvals / eigvals.sum()}
)
display(eig_table.round(4))

plt.figure(figsize=(7, 3.5))
plt.bar(np.arange(1, 7), eigvals, color="#3568a8")
plt.title("Eigenvalues of sensor correlation matrix")
plt.xlabel("Component")
plt.ylabel("Eigenvalue")
plt.grid(True, axis="y", alpha=0.3)
plt.tight_layout()
plt.show()
[OUT: 3]
eigenvalue variance_ratio
0 4.6865 0.7811
1 0.6686 0.1114
2 0.3543 0.0590
3 0.1664 0.0277
4 0.0638 0.0106
5 0.0604 0.0101

png

Interpreting the Results

If the first and second eigenvalues are larger than the others, it may be possible to explain the six sensor signals with a small number of common fluctuations. Before increasing individual alarms, it is effective to simultaneously inspect the sensor groups with high load on higher-level eigenvectors. Since the cause of failure cannot be determined based solely on eigenvalues, cross-reconciling with rotational speed, load, and maintenance history is necessary.

No.042: Power Iteration

Practical Use

If you only want the maximum eigenvalues and corresponding vectors, the total eigenvalue calculation is excessive. The power method estimates the dominant direction of sensor variation using only the repetition of the matrix and vector multiplication.

Model and Method

When iterating on xk+1=Cxk/∥Cxk∥2x_{k+1}=Cx_k/\|Cx_k\|_2, if the initial value is not orthogonal to the maximum eigenvector and the absolute value of the maximum eigenvalue is unique, it converges in that direction. Eigenvalues are estimated using Rayleigh quotient λk=xkTCxk/(xkTxk)\lambda_k=x_k^TCx_k/(x_k^Tx_k). The convergence velocity depends on ∣λ2/λ1∣|\lambda_2/\lambda_1|.

Check with Python

[IN: 4]
x = np.ones(C.shape[0]) / np.sqrt(C.shape[0])
history = []
for k in range(30):
    x_new = C @ x
    x_new /= np.linalg.norm(x_new)
    lam = float(x_new @ C @ x_new)
    history.append(lam)
    if np.linalg.norm(x_new - x) < 1e-10 or np.linalg.norm(x_new + x) < 1e-10:
        x = x_new
        break
    x = x_new

display(pd.DataFrame({"sensor": sensor_names, "power_loading": x}).round(4))
print(f"iterations={len(history)}, estimate={lam:.6f}, exact={eigvals[0]:.6f}")
plt.figure(figsize=(7, 3.5))
plt.plot(range(1, len(history) + 1), history, marker="o", ms=3)
plt.axhline(eigvals[0], color="crimson", linestyle="--", label="exact")
plt.title("Convergence of power iteration")
plt.xlabel("Iteration")
plt.ylabel("Estimated dominant eigenvalue")
plt.grid(True, alpha=0.3)
plt.legend()
plt.tight_layout()
plt.show()
[OUT: 4]
sensor power_loading
0 Drive-X 0.4026
1 Drive-Y 0.3938
2 Bearing-A 0.4377
3 Bearing-B 0.4253
4 Frame 0.4090
5 Outlet 0.3782
iterations=11, estimate=4.686548, exact=4.686548

png

Interpreting the Results

If the estimated value quickly approaches the exact calculation value, it is suitable for daily monitoring to update only the maximum mode. Since convergence is slower on equipment with close upper two eigenvalues, the upper limit of iterations and residual ∥Cx−λx∥\|Cx-\lambda x\| are monitored, and the Lanczos method is switched to if necessary.

No.043: Inverse Iteration

Practical Use

Inverse iteration extracts an eigenvalue near a chosen shift. It can be used in vibration analysis, but the eigenvalues calculated here belong to a sensor correlation matrix and are not resonance frequencies. Natural frequencies require a separate eigenvalue problem built from stiffness and mass matrices.

Model and Method

Solve (C−μI)yk=xk(C-\mu I)y_k=x_k for shift μ\mu and let xk+1=yk/∥yk∥x_{k+1}=y_k/\|y_k\|. In (C−μI)−1(C-\mu I)^{-1}, the component with the eigenvalue closest to μ\mu dominates. If the shift is an eigenvalue itself, the matrix becomes singular, so check the numerical conditions.

Check with Python

[IN: 5]
shift = 0.50
x_inv = np.ones(C.shape[0]) / np.sqrt(C.shape[0])
inv_history = []
for k in range(20):
    y = np.linalg.solve(C - shift * np.eye(C.shape[0]), x_inv)
    x_inv = y / np.linalg.norm(y)
    lam_inv = float(x_inv @ C @ x_inv)
    residual = np.linalg.norm(C @ x_inv - lam_inv * x_inv)
    inv_history.append((k + 1, lam_inv, residual))
    if residual < 1e-10:
        break
display(
    pd.DataFrame(inv_history, columns=["iteration", "eigenvalue", "residual"])
    .tail()
    .round(8)
)
print("nearest exact eigenvalue:", eigvals[np.argmin(np.abs(eigvals - shift))].round(6))
[OUT: 5]
iteration eigenvalue residual
15 16 0.3547 0.0110
16 17 0.3546 0.0095
17 18 0.3545 0.0082
18 19 0.3545 0.0071
19 20 0.3544 0.0062
nearest exact eigenvalue: 0.354291

Interpreting the Results

The estimate approaches approximately 0.354291, the eigenvalue nearest the shift 0.50. However, the residual after 20 iterations is about 0.0062, well above the requested 10−1010^{-10}. This run ends at the iteration limit. Check the residual and stopping reason rather than inferring convergence from the displayed eigenvalue alone.

No.044: QR Method

Practical Use

When you want to capture all eigenvalues with small to medium-scale models, the QR method is a fundamental technique. All modes of equipment models are displayed side by side to check proximity to hazardous bands.

Model and Method

Factor Ak=QkRkA_k=Q_kR_k and update Ak+1=RkQk=QkTAkQkA_{k+1}=R_kQ_k=Q_k^TA_kQ_k. This similarity transformation preserves eigenvalues. For the symmetric positive definite matrix in this example, whose eigenvalues have distinct magnitudes, the diagonal entries converge to the eigenvalues. Practical QR algorithms also use shifts and reductions to Hessenberg or tridiagonal form.

Check with Python

[IN: 6]
A_qr = C.copy()
offdiag_history = []
for k in range(80):
    Q, R = np.linalg.qr(A_qr)
    A_qr = R @ Q
    offdiag_history.append(np.linalg.norm(A_qr - np.diag(np.diag(A_qr))))
qr_vals = np.sort(np.diag(A_qr))[::-1]
display(
    pd.DataFrame(
        {
            "QR_iteration": qr_vals,
            "numpy_eigh": eigvals,
            "abs_error": np.abs(qr_vals - eigvals),
        }
    ).round(8)
)
plt.figure(figsize=(7, 3.5))
plt.semilogy(range(1, 81), offdiag_history)
plt.title("QR iteration: off-diagonal norm")
plt.xlabel("Iteration")
plt.ylabel("Off-diagonal Frobenius norm")
plt.grid(True, which="both", alpha=0.3)
plt.tight_layout()
plt.show()
[OUT: 6]
QR_iteration numpy_eigh abs_error
0 4.6865 4.6865 0.0000e+00
1 0.6686 0.6686 0.0000e+00
2 0.3543 0.3543 0.0000e+00
3 0.1664 0.1664 0.0000e+00
4 0.0638 0.0638 3.0000e-08
5 0.0604 0.0604 3.0000e-08

png

Interpreting the Results

The off-diagonal norm decreases, and the diagonal entries approach the eigenvalues returned by the library routine. This simple QR implementation illustrates the mechanism. For production calculations on a symmetric matrix, use a tested routine such as numpy.linalg.eigh.

No.045: Lanczos Method

Practical Use

Large finite element models or sensor covariance matrices may require only a few eigenpairs. Lanczos projects a symmetric matrix onto a smaller tridiagonal matrix, from which selected eigenvalues can be approximated.

Model and Method

Create a basis on the Krylov subspace Km(A,q)=span(q,Aq,…,Am−1q)\mathcal{K}_m(A,q)=\mathrm{span}(q,Aq,\ldots,A^{m-1}q) and approximate the original eigenvalues with the eigenvalues (Ritz values) of Tm=QmTAQmT_m=Q_m^TAQ_m. Since finite-precision loses orthogonality, reorthogonalization is important in implementation.

Check with Python

[IN: 7]
n = 240
main = 2.2 + 0.15 * rng.random(n)
off = -1.0 * np.ones(n - 1)
K = sparse.diags([off, main, off], [-1, 0, 1], format="csr")

def lanczos(A, m, seed=42):
    local_rng = np.random.default_rng(seed)
    q = local_rng.normal(size=A.shape[0])
    q /= np.linalg.norm(q)
    Q, alphas, betas = [], [], []
    q_prev = np.zeros_like(q)
    beta = 0.0
    for j in range(m):
        Q.append(q.copy())
        z = A @ q - beta * q_prev
        alpha = float(q @ z)
        z -= alpha * q
        # To maintain numerical orthogonality in teaching materials, reorthogonality is performed on existing basis
        for qi in Q:
            z -= (qi @ z) * qi
        alphas.append(alpha)
        beta_new = np.linalg.norm(z)
        if beta_new < 1e-12:
            break
        if j < m - 1:
            betas.append(beta_new)
        q_prev, q, beta = q, z / beta_new, beta_new
    return np.array(alphas), np.array(betas)

rows = []
exact_large = spla.eigsh(K, k=1, which="LA", return_eigenvectors=False)[0]
for m in [5, 10, 20, 30]:
    alpha, beta = lanczos(K, m)
    T = np.diag(alpha) + np.diag(beta, 1) + np.diag(beta, -1)
    ritz = np.linalg.eigvalsh(T)[-1]
    rows.append((m, ritz, abs(ritz - exact_large)))
display(
    pd.DataFrame(rows, columns=["Krylov_dim", "largest_Ritz", "abs_error"]).round(8)
)
[OUT: 7]
Krylov_dim largest_Ritz abs_error
0 5 4.1556 0.1362
1 10 4.2555 0.0363
2 20 4.2772 0.0145
3 30 4.2846 0.0071

Interpreting the Results

Even with a 240-dimensional matrix, the maximum eigenvalues can be approximated from the much smaller Krylov subspace. In the equipment model, the acceptance criteria are the number of required modes, residuals, and calculation time. For models where symmetry is disrupted, the Arnoldi method is chosen instead of applying it as is.

No.046: Arnoldi Method

Practical Use

The flow between processes is upstream and downstream, and the matrices are generally nonsymmetric. The Arnoldi method can approximate the main eigenvalues of models where reprocessing or delay propagates in a directional way.

Model and Method

Arnoldi’s method constructs an orthonormal basis QmQ_m of a Krylov subspace and projects onto the upper Hessenberg matrix HmH_m that is AQm≈QmHmAQ_m\approx Q_mH_m. It is positioned as an extension of the Lanczos method to asymmetric matrices. When complex eigenvalues appear, both absolute values and arguments are interpreted.

Check with Python

[IN: 8]
def arnoldi(A, m):
    n = A.shape[0]
    Q = np.zeros((n, m + 1))
    H = np.zeros((m + 1, m))
    Q[:, 0] = np.ones(n) / np.sqrt(n)
    for k in range(m):
        v = A @ Q[:, k]
        for j in range(k + 1):
            H[j, k] = Q[:, j] @ v
            v -= H[j, k] * Q[:, j]
        H[k + 1, k] = np.linalg.norm(v)
        if H[k + 1, k] < 1e-12:
            return H[: k + 1, : k + 1]
        Q[:, k + 1] = v / H[k + 1, k]
    return H[:m, :m]

H = arnoldi(A.T, 6)
ritz = np.linalg.eigvals(H)
exact = np.linalg.eigvals(A.T)
arnoldi_table = pd.DataFrame(
    {
        "method": ["Arnoldi Ritz", "Exact"],
        "largest_abs_eigenvalue": [np.max(np.abs(ritz)), np.max(np.abs(exact))],
    }
)
display(arnoldi_table.round(6))

plt.figure(figsize=(6, 4))
plt.scatter(exact.real, exact.imag, label="Exact", s=55)
plt.scatter(ritz.real, ritz.imag, marker="x", s=70, label="Arnoldi Ritz")
plt.title("Eigenvalues of directed process matrix")
plt.xlabel("Real part")
plt.ylabel("Imaginary part")
plt.grid(True, alpha=0.3)
plt.legend()
plt.tight_layout()
plt.show()
[OUT: 8]
method largest_abs_eigenvalue
0 Arnoldi Ritz 0.8004
1 Exact 0.7457

png

Interpreting the Results

The six-dimensional projection gives a largest eigenvalue magnitude of about 0.8004, compared with 0.7457 for the original matrix. This is an approximation with a visible discrepancy. Increase the subspace dimension and check Ritz-vector residuals before accepting it. Interpret the result according to whether the matrix weights represent probabilities or quantities.

No.047: Singular Value Decomposition

Practical Use

Sensor data is a rectangular matrix. Singular Value Decomposition (SVD) divides into representative patterns in the temporal and sensor directions, and can be used to reduce storage capacity, remove noise, and extract representative waveforms.

Model and Method

Factor Z=UΣVTZ=U\Sigma V^T, with nonnegative singular values σi\sigma_i. The eigenvalues of ZTZZ^TZ are σi2\sigma_i^2, and those of the correlation matrix C=ZTZ/(n−1)C=Z^TZ/(n-1) are σi2/(n−1)\sigma_i^2/(n-1). The truncated SVD Zk=UkΣkVkTZ_k=U_k\Sigma_kV_k^T is a best rank-kk approximation in the Frobenius norm.

Check with Python

[IN: 9]
U, s, Vt = np.linalg.svd(Z.to_numpy(), full_matrices=False)
svd_rows = []
for k in range(1, 7):
    Zk = U[:, :k] @ np.diag(s[:k]) @ Vt[:k, :]
    rel_error = np.linalg.norm(Z.to_numpy() - Zk, "fro") / np.linalg.norm(
        Z.to_numpy(), "fro"
    )
    svd_rows.append((k, 1 - rel_error, rel_error))
display(
    pd.DataFrame(
        svd_rows, columns=["rank", "reconstruction_score", "relative_error"]
    ).round(4)
)

plt.figure(figsize=(7, 3.5))
plt.plot(range(1, 7), s, marker="o")
plt.title("Singular values of standardized sensor data")
plt.xlabel("Component")
plt.ylabel("Singular value")
plt.grid(True, alpha=0.3)
plt.tight_layout()
plt.show()
[OUT: 9]
rank reconstruction_score relative_error
0 1 0.5321 0.4679
1 2 0.6722 0.3278
2 3 0.7799 0.2201
3 4 0.8562 0.1438
4 5 0.8997 0.1003
5 6 1.0000 0.0000

png

Interpreting the Results

With two components, the relative reconstruction error is about 0.3278. The table defines reconstruction_score as one minus this error; it is not PCA’s cumulative explained-variance ratio. That ratio equals one minus the squared relative error, about 0.8925 here. Check separately on normal and abnormal periods that compression preserves small fault signals.

No.048: Relationship with PCA

Practical Use

Principal Component Analysis (PCA) consolidates a large number of correlated monitoring values into a small number of uncorrelated KPIs. It can be used to reduce indicators on surveillance screens and to display equipment status in 2D.

Model and Method

Eigendecomposition of C=ZTZ/(n−1)C=Z^TZ/(n-1) and the SVD of the standardized data matrix ZZ give the same principal directions. The explained-variance ratio is λj/∑iλi\lambda_j/\sum_i\lambda_i. PCA summarizes variance; it does not necessarily select the best predictors of defects.

Check with Python

[IN: 10]
scores = Z.to_numpy() @ eigvecs[:, :2]
loadings_df = pd.DataFrame(eigvecs[:, :2], index=sensor_names, columns=["PC1", "PC2"])
display(loadings_df.round(3))
print(
    "Cumulative variance ratio (PC1+PC2):",
    round((eigvals[:2].sum() / eigvals.sum()), 4),
)

plt.figure(figsize=(7, 4))
plt.scatter(scores[:-20, 0], scores[:-20, 1], alpha=0.65, label="Earlier")
plt.scatter(scores[-20:, 0], scores[-20:, 1], color="crimson", label="Latest 20h")
plt.title("PCA score map for equipment monitoring")
plt.xlabel("PC1 score")
plt.ylabel("PC2 score")
plt.grid(True, alpha=0.3)
plt.legend()
plt.tight_layout()
plt.show()
[OUT: 10]
PC1 PC2
Drive-X -0.403 0.558
Drive-Y -0.394 0.600
Bearing-A -0.438 -0.185
Bearing-B -0.425 -0.302
Frame -0.409 -0.336
Outlet -0.378 -0.301
Cumulative variance ratio (PC1+PC2): 0.8925

png

Interpreting the Results

The loading table indicates which sensor comprises each main component. If the point cloud from the last 20 hours is off from the past, it may be that the overall equipment condition has changed, not just a single sensor value. Management limits are not retrofitted to the same data; instead, the normal and verification periods are set separately.

No.049: Relationship with PageRank

Practical Use

Measuring the importance of a process solely by the number of connections underestimates the processes affected by the critical process. PageRank performs a recursive evaluation, stating that the processes referenced and flowing into from the most important stages are also important.

Model and Method

Using the row-stochastic matrix PP, and the steady vector rr

r=αPTr+(1−α)vr=\alpha P^Tr+(1-\alpha)v

It is defined as follows. α\alpha is the probability of continuing network propagation, and vv is a uniform restart distribution. This is an eigenvector problem corresponding to the eigenvalue 1 of the Google matrix. Here, ranking is not process value, but structural importance on the defined link.

Check with Python

[IN: 11]
P = A.copy()
row_sum = P.sum(axis=1)
for i in range(len(P)):
    P[i] = P[i] / row_sum[i] if row_sum[i] > 0 else np.ones(len(P)) / len(P)
alpha = 0.85
G = alpha * P + (1 - alpha) * np.ones_like(P) / len(P)
r = np.ones(len(P)) / len(P)
pr_history = []
for k in range(100):
    r_new = G.T @ r
    pr_history.append(np.linalg.norm(r_new - r, 1))
    if pr_history[-1] < 1e-12:
        break
    r = r_new
pagerank_df = pd.DataFrame({"process": processes, "PageRank": r_new}).sort_values(
    "PageRank", ascending=False
)
display(pagerank_df.round(4))

plt.figure(figsize=(8, 3.8))
plt.bar(pagerank_df["process"], pagerank_df["PageRank"], color="#4f8f5b")
plt.title("Process influence based on PageRank")
plt.xlabel("Process")
plt.ylabel("PageRank score")
plt.xticks(rotation=35, ha="right")
plt.grid(True, axis="y", alpha=0.3)
plt.tight_layout()
plt.show()
[OUT: 11]
process PageRank
5 Inspection 0.1682
3 Grinding 0.1609
7 Shipping 0.1585
4 Wash 0.1560
2 HeatTreat 0.1130
1 Machining 0.1111
6 Rework 0.0967
0 Material 0.0356

png

Interpreting the Results

Processes linked to rework loops may warrant closer investigation because stoppages can propagate through those loops. Rankings depend on link definitions, weights, and the damping factor. Assess them alongside throughput, downtime, alternatives, and quality costs before allocating investment.

No.050: Applications to Graph Analysis

Practical Use

By treating equipment and processes as nodes and relationships as edges, the entire factory can be treated as a graph. Spectral analysis identifies tightly linked processes, easily fragmented boundaries, and candidate monitoring units.

Model and Method

From the weight matrix WW that ignores direction, we create the degree matrix DD and Laplacian L=D−WL=D-W. Normalized Laplacian

Lsym=I−D−1/2WD−1/2L_{\mathrm{sym}}=I-D^{-1/2}WD^{-1/2}

The second-smallest eigenvalue of the normalized Laplacian indicates weak connections in the normalized graph. The term algebraic connectivity usually refers to the second-smallest eigenvalue of the unnormalized L=D−WL=D-W. Here, the signs of the normalized Laplacian’s corresponding eigenvector give a candidate partition into two groups.

Check with Python

[IN: 12]
W = (A + A.T) / 2
d = W.sum(axis=1)
D_inv_sqrt = np.diag(1 / np.sqrt(d))
Lsym = np.eye(len(W)) - D_inv_sqrt @ W @ D_inv_sqrt
lap_vals, lap_vecs = np.linalg.eigh(Lsym)
fiedler = lap_vecs[:, 1]
cluster = np.where(fiedler >= 0, "Group A", "Group B")
graph_df = pd.DataFrame(
    {"process": processes, "Fiedler_value": fiedler, "candidate_group": cluster}
)
display(graph_df.sort_values("Fiedler_value").round(4))
print("normalized algebraic connectivity:", round(lap_vals[1], 6))

plt.figure(figsize=(8, 3.8))
colors = np.where(fiedler >= 0, "#3568a8", "#d1792f")
plt.bar(processes, fiedler, color=colors)
plt.axhline(0, color="black", linewidth=0.8)
plt.title("Spectral partition candidate by Fiedler vector")
plt.xlabel("Process")
plt.ylabel("Fiedler vector value")
plt.xticks(rotation=35, ha="right")
plt.grid(True, axis="y", alpha=0.3)
plt.tight_layout()
plt.show()
[OUT: 12]
process Fiedler_value candidate_group
5 Inspection -0.5414 Group B
7 Shipping -0.4346 Group B
4 Wash -0.3317 Group B
3 Grinding 0.0197 Group A
6 Rework 0.1728 Group A
2 HeatTreat 0.2314 Group A
0 Material 0.3464 Group A
1 Machining 0.4519 Group A
normalized algebraic connectivity: 0.183177

png

Interpreting the Results

The two groups are defined by the signs of the eigenvector entries. They suggest possible maintenance groups, data-collection units, or buffer locations. Check the physical layout and operating rules before adopting this partition.

Lessons from the Examples

  1. You don’t have to calculate everything.: For maximum modes, you can narrow down the calculation to the proper eigenpairs needed for decision-making: power iteration for a dominant mode, Lanczos for large symmetric matrices, and Arnoldi for nonsymmetric matrices.
  2. The same decompositions support several analyses.: Eigendecomposition and SVD serve as a common foundation for vibration modes, PCA, compression, and anomaly monitoring.
  3. The definition of the network determines the conclusion: The ranking and division of PageRank and Laplacian vary depending on what is edged and what weight is applied.
  4. Numerical results are not causes but candidates: Large eigenvalues or centrality indicate the priorities of the investigation but do not independently prove the cause of failures or quality defects.

Putting the Methods into Practice

  • Data quality standards including sensor calibration, missing measurements, time synchronization, and equipment shutdown sections
  • Verification data separating normal periods, abnormal periods, and load conditions
  • Definition, standardization, shift, convergence tolerance, and recording random number seeds
  • Acceptance criteria including residuals, reconstruction errors, calculation time, and false positive rates
  • Review procedures for process managers, maintenance, and quality assurance to confirm results
  • Workflow from alarm to inspection, cause confirmation, and model update

Conclusion

From No.041 to No.050, we examined the basics of eigenvalue problems, including power iteration, inverse iteration, and QR methods, Krylov subspace methods, SVD/PCA, and PageRank/graph Laplacians through consistent hypothetical examples in manufacturing. What matters is not the advanced methodology name but the stable calculation of only the necessary information and translation into on-site inspection, investment, and monitoring design.

Business Inquiries

At Surikobo, we support everything from problem definition to implementation and operational design, covering equipment data analysis, anomaly detection, process network analysis, accelerated numerical computations, and training for on-site personnel. We can work together with you on the verifying design to determine what can be made from on-hand data.

📩 Contact Us: www.surikobo.co.jp/contact
Contact us to discuss your project.