Hadley Wickham’s tidy-data rules decide what one observation is before any model is fitted. A tidymodels recipe then removes zero- and near-zero-variance predictors, filters correlated ones, imputes, transforms and scales, and is re-estimated inside every resampling fold.
An incoming-material identity problem introduces the 1970s roots of chemometrics, its overlap with machine learning, and the evidence needed before a model can be trusted with a pharmaceutical decision.
Kuhn and Johnson’s practice of fitting a panel of models built on different mathematics (PLS, penalized regression, MARS, SVM, KNN, random forest, boosting and a neural network) on the same resamples, comparing them honestly, stacking them into an ensemble and choosing what a regulated setting can defend.
A stepwise pharmaceutical adaptation of Kuhn and Johnson’s predictive-modeling framework, using NIR prediction of granule water content: define the decision, match X and Y, split by batch, preprocess inside resampling, tune, freeze and test.
A deep dive into ICH Q2(R2): validation as the demonstration that a measurement is fit for its intended purpose — the analytical procedure as a measurement system, the four procedure types, the analytical figures of merit and their formal definitions (accuracy, precision, specificity, detection and quantitation limits, linearity, range, robustness), which characteristics are required for which test type, the R2 reframing around reportable range and multivariate procedures, stability-indicating methods, platform methods, and validation’s place in the Q14 analytical procedure lifecycle.
Use ISA-88 process recipes, FMEA, screening and response-surface optimization to transform predictive associations into pharmaceutical process understanding, design space, lifecycle control and organizational learning.
Explore pharmaceutical NIR spectra with PCA, tell scores from loadings, and see how class modeling and PLS turn the same spectra into an identity decision or a water-content prediction, each needing different evidence.
Clean and align analytical signals, investigate overlapping components with MCR-ALS and PARAFAC, and connect spectral flow cytometry to the same mathematical framework.
Follow a CHO fed-batch from Raman soft sensors and three-way batch data through maturity alignment, multivariate monitoring, investigation and lifecycle learning.
A spectral flow panel gives every cell in a CAR-T product a 25-dimensional measurement. Manual gating, FlowSOM clustering and UMAP each see the data differently, batch effects masquerade as biology, and one patient per lot makes small-n honesty essential. The week’s chemometric discipline, applied to cells.
An NIR supplier-change case connects prediction errors, Hotelling’s T² and Q diagnostics, instrument transfer and controlled model maintenance: validation establishes evidence for an intended use, and monitoring asks whether it still applies.
Connect chemometrics to language models through a fictional investigation-summary exercise: tokens, training, retrieval, claims checked against records, task-specific evaluation and lifecycle controls.
A fictional capstone investigation on a continuous tablet line connects model applicability, event timing, material diversion, release evidence and review of an AI-written investigation summary, and ends on an interim conclusion rather than a verdict.
Q13: continuous manufacturing of drug substances and products — what ‘continuous’ changes (residence time distribution, state of control, material traceability), the cost–benefit rationale for adopting it, the control-strategy elements Q13 adds, real-time release testing and the model lifecycle, batch definition and diversion of non-conforming material, the approved products that pioneered it, and the analytical shift from batch pulls to in-line measurement.
A deep dive into ICH Q14: analytical quality by design — the analytical target profile as the method’s QTPP, minimal versus enhanced development, selecting the technique from sample and analyte properties, risk assessment of analytical procedure parameters (fishbone, FMEA), robustness by design of experiments, the method operable design region as the analytical design space, the analytical control strategy and system suitability, platform and multivariate procedures, and the analytical procedure lifecycle — established conditions, reportable range, and the regulatory flexibility that Q12 and Q2(R2) hang off it.
How a control strategy is built and held once a product is made for real, read through the models behind it: chemometrics from its 1970s roots to PCA, PLS and class modeling; where a measurement lives and how late it arrives; prediction, feedback and residence-time diversion on a continuous line (ICH Q13); real-time release testing; the model lifecycle; language models held to the same evidence standard; and a capstone investigation. Post-market signals, product complaints and pharmacovigilance, close the loop by reopening a control strategy that looked adequate at the time.
Week 11 used one instrument on one product; this week maps the rest of the field. Tidy data and tidymodels preprocessing, Kuhn and Johnson’s model panels and ensembles, designed experiments as the route from correlation to cause, chromatogram alignment and curve resolution, multivariate monitoring of a biologic batch, and high-dimensional flow cytometry for CAR-T, plus ICH M7 as the clearest case of a prediction accepted in place of an experiment. Final paper presentations run alongside.