github-hosted

  • | |

    Ordinary Least Squares

    Fitting a linear regression means solving one matrix equation, not one equation per observation. Stacking the data into a design matrix and minimizing the residual sum of squares gives the normal equation, whose closed-form solution fixes the coefficients uniquely whenever the cross-product matrix can be inverted. NumPy reproduces the computation.

  • |

    Single Predicted Value From Two Models

    🇺🇸🇰🇷 Two models each emit a prediction and a probability. A weighted average of the probabilities gives the class, and the same weights average the predicted values into one. The weight itself comes from a grid search on a validation dataset, scored by F1, ROC-AUC or log loss.

  • |

    Polynomial Feature Expansion

    🇺🇸🇰🇷 Three defaults make polynomial expansion cheap and safe: degree two, centring the variables before expanding, and a ridge or lasso penalty on the new columns. Skipping the last two shows up as coefficients flipping sign, not as poor fit. Beyond a few dozen variables, or for repeated bends, splines and kernels replace it.

  • |

    Overfitting In Wide Data

    When columns outnumber rows a model can fit the training set exactly and still carry no signal. This document sets out the three sources of that failure, the families of defense against each — regularization, projection, subspace sampling, honest selection — and the nested protocol that has to confirm the choice before any number is reported.

  • |

    Overfitting In Long Data

    Overfitting in long data does not come from having too many parameters. It comes from model capacity, from rows that resemble each other inside a group, and from leakage in the procedure. A random split hides the second one: capacity must stop where held-out error turns, and the split must follow the groups.

  • |

    Stationarity in Engineering Data

    Nearly every classical tool for reading measured data assumes the system stayed the same system throughout the record. Stationarity names that assumption, and when it breaks the arithmetic still runs while the meaning disappears. This document covers the definition, the forms, judging it on a finite record, and what to do when it fails.

  • | |

    The xbar-s Control Chart

    Centre and spread are different questions, so the pair reads both from the same subgroups. The case that matters is spread growing while the mean holds: the product is still within specification and the mean chart stays quiet, yet the process is no longer yesterday’s. An excursion is declared from the chart, not the specification.

  • | |

    Multivariate Statistical Process Control

    🇺🇸🇰🇷 One chart per sensor fails twice over: false alarms pile up with the count, and a pair of readings that are each normal but wrong together passes unseen. Hotelling’s statistic watches the correlated whole, the PCA residual watches what the model cannot explain, and a fault shows in one or the other.

  • | |

    Process Capability Indices

    🇺🇸🇰🇷 A control chart says whether a process is stable, never whether it makes acceptable product, because it never looks at the specification. These indices supply the other half: Cp for the spread it could achieve if centred, k for how far off centre it sits, and Cpk for what the two leave together.

  • | |

    The s Control Chart

    Spread needs a chart of its own, and the subgroup standard deviation is the statistic that carries it. That statistic is biased low, so the centre line divides the mean of s by c4 rather than using it as it stands. Sets out the limits that follow, and when it is preferred to the R chart.

  • | |

    The Shewhart Control Chart

    Variation splits into common causes, which belong to the process, and special causes, which can be found and removed. Treating one as the other makes things worse: adjusting for a common cause adds variation, and letting a special cause pass leaves it in place. Covers the three-sigma limits and how fast a shift is caught.

  • | |

    The Wafer Uniformity Index

    🇺🇸🇰🇷 A wafer map is reduced to one number because that is what a specification can hold and a control chart can plot. Two definitions are in use, and a figure that does not name its formula is ambiguous by a factor of two. The index says something is wrong and how much, never what.