Batches
Each batch is its own independent project — its own blank library, training dataset, and models. Nothing pools across batches.
New batch
All batches
Blank library
Upload Solvent / Method / Carryover / Reagent blanks for the working batch — these form the pool used for blank subtraction.
Upload a blank
What entered the blank pool from this file — expand "Uploaded blanks" below for past uploads (compound counts only; re-download needs the original file since raw peaks aren't stored).
Pool composition
Combined counts per blank type for the working batch.
Uploaded blanks
Training data
Upload a raw sample — cleaned automatically against the working batch's blank pool, then tag its known Class.
Add a sample
RT Tolerance is how close (in minutes) a sample peak's retention time must be to a blank peak to count as a match. Ratio-based mode: if sample area ÷ blank area is below the threshold, the peak is purged as background — above it, it's flagged "retained (high area)" for your review. Strict mode: any name+RT match against the blank pool is removed outright, regardless of area — the Area Ratio Threshold is ignored.
Preview — every peak and what happened to it. Rows are colour-coded per the legend above; only non-purged rows get saved to the training dataset.
Training dataset — working batch
Predict sample
Uses the working batch's active model + diagnostic ratio. Cleaned the same way as training samples.
Upload a sample
Prediction history — working batch
Models
Manually triggered. Re-selects biomarkers, retrains all 5 algorithms, and re-derives the diagnostic ratio from the working batch's training dataset.
Data preprocessing
Applied in this order — normalize samples (rows) → transform values → scale variables (columns) — to every PCA/biplot/PLS-DA/statistical-report/univariate-plot computation below. Model training keeps its own separate scaling per cross-validation fold, unaffected by this. α = 0.05 is the common food-industry default; halal-specific work sometimes uses a stricter 0.01.
Preview preprocessing effect
Before vs after the pipeline above — overall density curve + grouped box-and-whisker, so you can see the effect immediately without retraining.
Before
After
Before
After
Full PCA statistical report
XLSTAT-style output — descriptive statistics, correlation structure, and the full eigen-decomposition behind the biplot below.
Summary statistics (quantitative data)
Correlation matrix — Pearson (n-1)
Eigenvalues
Eigenvectors
Factor loadings
Correlations between variables and factors
Identical to factor loadings above — both come from the same eigen-decomposition. With Standardize (n-1) selected, these are also literal Pearson correlations; with Pareto scaling, they are loadings in the pareto-scaled space.
KMO — measure of sampling adequacy per variable
Retrain
Biomarker candidates
Training dataset overview
PCA biplot — sample clustering with the compounds driving the separation overlaid as vectors.
Univariate plots — outlier detection
Box-and-whisker, all variables grouped in one plot (IQR rule: points beyond 1.5×IQR from Q1/Q3 flagged as outliers), with descriptive statistics below.
PLS-DA observation plot
Model versions
Nothing auto-activates — pick the best-performing version and activate it yourself. Click "View" on any row to see how that specific model works.
Model visualization
Diagnostic ratio versions
How this works
VIP score (Variable Importance in Projection)
For each compound, VIP measures how much it contributes to the PLS-DA model's ability to separate classes, combining how strongly the compound loads onto each PLS component with how much variance that component explains. VIP ≥ 1 is the standard rule-of-thumb cutoff — it's a candidate filter, not proof of biological relevance on its own.
ANOVA p-value & the "validated" flag
A compound is marked validated: true only if VIP ≥ 1 and a one-way ANOVA across your Class groups gives p < 0.05 — both the multivariate model and a simple univariate test agree it separates classes. With small sample counts, ANOVA has low power, so treat the validated list as a shortlist, not a final answer.
The 5 ML algorithms
SVM (RBF kernel) maximizes the margin between classes — good with clear separation, less interpretable.
Random Forest averages many decision trees — robust to noise, gives feature importances for free.
k-NN (k=5) votes among the 5 nearest neighbours — simple, sensitive to feature scaling and irrelevant features.
Naive Bayes assumes features are independent and normally distributed per class — fast, works with small n, assumption often imperfect for correlated lipids.
ANN (2-layer MLP) learns a non-linear boundary via backpropagation — most flexible, needs more data to avoid overfitting.
All 5 use the same cross-validation split, so their metrics are directly comparable.
Diagnostic lipid ratio (ROC + Youden index)
Every pair among the validated biomarkers is tried as a ratio, scored by ROC-AUC at separating "contains lard" from everything else. The best pair's cutoff is the Youden-optimal point (max of true-positive rate − false-positive rate) — the threshold that best balances catching real lard against false alarms.
Why are there so many versions, and what do they mean?
Every retrain trains all 5 algorithms — one retrain = 5 new version rows, sharing the same version_label (a timestamp). Compare rows with the same label to see which algorithm did best on that dataset; compare across labels to see whether more training data helped. Nothing auto-activates — you choose which version is "live."
Which metric should I look at to pick a version?
Accuracy — overall % correct; misleading if classes are imbalanced.
Sensitivity/Recall — of true non-halal samples, how many were caught. Matters most here: missing real lard is the costlier mistake.
Specificity — of true halal samples, how many were correctly cleared. High specificity = fewer false alarms.
Precision — of samples called non-halal, how many actually were.
F1 — balance point between precision and recall.
ROC-AUC — ranking quality independent of any cutoff; 1.0 perfect, 0.5 random.
What actually happens when I "promote" a prediction?
The predicted sample's cleaned compound data is copied into the training dataset with the Class you confirm (tagged source: promoted). It does not retrain automatically — click Retrain now again for it to take effect.
Bartlett's test of sphericity
Tests whether your correlation matrix is significantly different from an identity matrix (i.e. whether the variables are correlated at all). A significant result (p < 0.05) means PCA/factor analysis has something real to work with — variables share enough correlation to be worth reducing to fewer factors. A non-significant result means the variables are close to uncorrelated, and PCA on them won't find meaningful structure.
KMO — Kaiser-Meyer-Olkin measure of sampling adequacy
Ranges 0 to 1. Compares the correlations between variables to their partial correlations (correlation left over after removing the influence of every other variable) — high KMO means a variable's correlation with others is mostly "real" shared variance, not noise. Rule of thumb: >0.8 great, 0.6\u20130.8 acceptable, <0.5 poor (PCA results may not be reliable). Per-variable MSA below the summary works the same way but one variable at a time — low-MSA variables are candidates to drop before a factor analysis.
Eigenvalues, eigenvectors, and factor loadings
Eigenvalues are how much total variance each factor (principal component) captures — an eigenvalue of 1.0 means that factor explains as much variance as a single original variable would. Eigenvectors are the raw direction each factor points in variable-space (unit length, no particular scale). Factor loadings rescale each eigenvector by \u221a(eigenvalue) — because PCA here runs on the standardized (correlation) matrix, this rescaled value is exactly the Pearson correlation between that original variable and the factor, which is why "factor loadings" and "correlations between variables and factors" show identical numbers in this report.
Blacklist keywords
Keywords that mark a compound as an artifact — applied automatically during cleaning, on both blanks and samples, across every batch.
Add keyword
FTIR training data
Already-prepared spectra — no cleaning step, no batches. Every row in the CSV is a sample.
Add training samples (bulk)
CSV with SampleID, Class, and wavenumber columns.
Training dataset
FTIR predict sample
Uses the active FTIR model + diagnostic ratio.
Predict samples (bulk)
CSV with SampleID and wavenumber columns (Class optional/ignored). Every row is predicted.
Prediction history
FTIR models
Manually triggered — same pipeline as GC-MS, run on wavenumber features instead of compounds.
Data preprocessing
Applied in this order — normalize samples (rows) → transform values → scale variables (columns) — to every PCA/biplot/PLS-DA/statistical-report/univariate-plot computation below. Model training keeps its own separate scaling per cross-validation fold, unaffected by this. α = 0.05 is the common food-industry default; halal-specific work sometimes uses a stricter 0.01.
Preview preprocessing effect
Before vs after the pipeline above — overall density curve + grouped box-and-whisker.
Before
After
Before
After
Full PCA statistical report
XLSTAT-style output — descriptive statistics, correlation structure, and the full eigen-decomposition behind the biplot below.
Summary statistics (quantitative data)
Correlation matrix — Pearson (n-1)
Eigenvalues
Eigenvectors
Factor loadings
Correlations between variables and factors
Identical to factor loadings above.
KMO — measure of sampling adequacy per variable
Retrain
Biomarker candidates
Training dataset overview
Univariate plots — outlier detection
Box-and-whisker, all variables grouped in one plot (IQR rule), with descriptive statistics below.
PLS-DA observation plot
Model versions
Click "View" on any row to see how that specific model works.
Model visualization
Diagnostic ratio versions
General dataset — training data
Any CSV with a SampleID column and numeric variable columns. Class is optional — include it for classification, leave it out for pure exploratory PCA.
Add samples (bulk)
CSV: SampleID (or first column), optional Class, and 2+ numeric columns.
Training dataset
General dataset — predict sample
Uses the active model + diagnostic ratio for this dataset (only available once you've trained one with Class labels).
Predict samples (bulk)
CSV with SampleID and the same numeric columns used for training.
Prediction history
General dataset — models
Explore with PCA any time (no Class needed). Train a classifier only once your dataset has Class labels with 2+ groups.
Data preprocessing
Applied in this order — normalize samples (rows) → transform values → scale variables (columns) — to every PCA/biplot/PLS-DA/statistical-report/univariate-plot computation below. Model training keeps its own separate scaling per cross-validation fold, unaffected by this. α = 0.05 is the common food-industry default; halal-specific work sometimes uses a stricter 0.01.
Preview preprocessing effect
Before vs after the pipeline above — overall density curve + grouped box-and-whisker. Works with or without Class labels.
Before
After
Before
After
Full PCA statistical report
XLSTAT-style output. Works with or without Class labels.
Summary statistics (quantitative data)
Correlation matrix — Pearson (n-1)
Eigenvalues
Eigenvectors
Factor loadings
Correlations between variables and factors
Identical to factor loadings above.
KMO — measure of sampling adequacy per variable
Explore & retrain
Biomarker candidates
Training dataset overview
PLS-DA observation plot
Univariate plots — outlier detection
Box-and-whisker, all variables grouped in one plot (IQR rule), with descriptive statistics below. Works with or without Class labels.
Model versions
Nothing auto-activates — pick the best-performing version and activate it yourself. No diagnostic ratio here — that's a halal/lard-specific concept, not generic to arbitrary datasets. Click "View" on any row to see how that specific model works.
Model visualization
Sample dataset
Ready-made dummy data covering every feature in this platform — download, upload, and try things without needing your own data first.
GC-MS — Batch 1: "Hexane Extraction"
The full walkthrough. 2 blanks, 16 training samples (4 classes × 4 replicates: Olive Oil, Palm Oil, Beef Tallow, Lard — covering halal-plant, halal-animal, and non-halal), and 5 unknowns for Predict (one per class + one deliberately ambiguous blend to trigger "Suspicious").
Built with realistic mess on purpose: some peaks have quality <80 (get filtered), some match the blank pool at low area (get PURGED), one per class is deliberately high-area at a shared background peak (flagged RETAINED_HIGH_AREA) — so you'll actually see the cleaning stages do something, not just pass everything through.
How to use: create a batch (e.g. "Hexane Extraction") → Blank library: upload the 2 blanks → Training data: upload the 16 training files, tagging Class from the filename → Models: Retrain, then Activate the best version → Predict sample: upload the 5 "Unknown-*" files.
GC-MS — Batch 2: "Chloroform Extraction"
A second, independent batch — 2 blanks, 8 training samples (Beef Tallow vs Lard only), 2 unknowns. Different solvent-background compounds than Batch 1.
Purpose: prove batch isolation. Train and activate a model here, then switch back to Batch 1 — confirm Batch 1's active model is untouched, and vice versa. This is the scenario that exposed the "shared model" bug earlier in the build.
FTIR
One training CSV (24 samples, 4 classes × 6 replicates, ~150 wavenumber columns) and one external test CSV (5 samples incl. one Olive+Lard blend) — matches the format the original "3rd FTIR Halal Authentication" app used, now also usable in this platform's FTIR section.
PCA shows realistic partial overlap (FTIR spectra are inherently more correlated than discrete GC-MS compounds) but PLS-DA/LOOCV still classifies at ~83% accuracy — a good stress test for the "imperfect but working" case.
How to use: FTIR → Training data: upload the training CSV, Save all → Models: Retrain, Activate → Predict sample: upload the predict CSV.
General dataset
Two CSVs for the two General Dataset use-cases:
With Class — edible oil chemistry profile (Iodine Value, Saponification Value, Peroxide Value, Free Fatty Acid %, Refractive Index) across 4 oil types, 5 replicates each. Tests the full classification path on data that isn't spectra at all.
Without Class — a fast-food nutrition panel (10 items, 5 numeric columns, no Class). Tests "Explore (PCA only)" — pure exploratory analysis with no classifier involved.
How to use: General dataset → Training data: upload either CSV, Save all → for the "with Class" one, Models → Retrain works normally; for "without Class," use Models → Explore (PCA only) instead.
Learn
How the platform actually works, from raw data to a halal/suspicious/non-halal call — with a few playgrounds you can poke at.
1. The big picture
Click each stage to see what happens there.
2. ROC curve & Youden index — playground
This is exactly how the diagnostic ratio's cutoff gets chosen. Drag the slider and watch sensitivity/specificity trade off against each other on a toy dataset (24 samples, 8 "contains lard").
3. The 5 ML algorithms
Same cross-validation split, five different ways of drawing the decision boundary.
What matters most to you?
4. Halal decision simulator
The exact rule the platform uses on every "Predict sample" run. Move the sliders and watch the status change.