Built for TAI / Z-info
Measurement validation for wastewater

Second
opinion

Spot unusual measurements, compare the evidence, and decide what to check first.

ProductInvestigation support
ForWastewater plant operators
ExploringSix measurement groups
StatusResearch prototype
DataNone included · all examples synthetic
01 // ProblemNo labels, many readings

Which unusual reading is worth checking?

No labelsThe data does not tell us which readings are real problems.
More than limitsA reading can be unusual for its own point even when it is within a fixed limit. Applicable historical limits are not available to verify missed alerts.
Review takes timeEvery unnecessary investigation costs an operator attention and time.

Each point is judged only against its own last 28 days.No comparison between plants

02 // End-to-end pipelineHistorical, day-level data

From measurements to review.

01 // INPUT

Prepare

Preserve original records and source information. Select six exploratory groups: influent volume, oxygen, ammonium, nitrate, suspended solids and temperature.

02 // DETECT

Score

Compare each point with its own history and apply simple data-quality rules.

03 // ORGANISE

Group

The history detector groups nearby flagged days into cases and ranks them within each plant.

04 // REVIEW

Investigate

A local dashboard shows stored AI flags, historical evidence and a review budget. The operator decides what to check.

Six group-specific forests offer a second ranking; the history detector also works on its own.In parallel · experimental AI

Walk through every stage interactively →

03 // History detectorEach point keeps its own history

Learn what is usual here.

01 // BASELINE

Look back

Use the previous 28 calendar days, excluding today, with at least 14 valid days. Calculate the median and robust spread.

02 // EVIDENCE

Check today

Measure deviation from the baseline. Flag stuck values and unexpected zeros; negative checks exclude temperature.

03 // OUTPUT

Form cases

Group nearby flagged days. Rank by rule hits, duration and peak score; preserve reasons and source references.

Missing, duplicate or insufficient history can leave a reading unscored; unscored is not normal.Safeguard

Scrub through a synthetic series to see the score →

Thresholds are calibrated per series. The approximately 1% target flag rate is a workload assumption, not a measured false-alarm rate.

04 // Experimental AI layerNo peer comparison

Spot an unusual combination.

01 // FEATURES

Six signals

Deviation, daily change, recent deviation, relative level, zero and repeated days.

02 // MODEL

Six forests

One Isolation Forest per measurement group looks for uncommon combinations of history-based features.

03 // ROLE

Second view

Compare its reading-level ranking with the independent history detector. Scores stay within each group.

A higher score means a rarer feature pattern, not a fault probability or diagnosis.Interpretation

Watch random splits isolate a point →

05 // EvaluationChronological and honest

Compare without guessing.

TRAIN

Through 2023

Fit each forest using earlier data, 100 trees and a fixed random seed.

VALIDATE

2024

Set the AI alert threshold on validation scores, then keep it fixed.

HOLDOUT

2025

Compare rankings on the same eligible readings and review budget.

LEARN

Review

Report coverage and workload; expert feedback is needed to judge usefulness.

No confirmed labels: no real-world accuracy or false-alarm savings claim.Limits

Move the threshold and the review budget →

06 // Operator decisionEvidence, not a diagnosis

Check what matters first.

01

See

Review stored AI flags for one plant and measurement in a local dashboard.

02

Understand

Inspect the reading, its 28-day history, historical median and source context.

03

Prioritise

Set a review budget and keep deferred cases visible for the selected metric.

04

Decide

The operator investigates. Review decisions are not yet saved between sessions.

The dashboard reads precomputed results; it does not run the models live. It supports English and Dutch and can optionally ask Claude to explain a stored reading; it works without it.

07 // Future explorationFrom prototype to practice

What comes next.

01 // WEATHER

Dry-weather insights

Compare rainfall, electricity and plant readings by week and month when suitable local data is available.

02 // COVERAGE

More parameters

Explore extending the models to further parameters, after checking data coverage, units and suitability.

03 // VALIDATION

Operator feedback

Review cases with plant experts; test usefulness and alert workload before operational deployment.

04 // PERFORMANCE

Faster runs

Investigate long runtimes on large datasets and improve processing efficiency without changing the evidence.

Future work requires additional data and expert validation. The current results are provisional and unvalidated.

08 // Get startedOpen source, runs locally

Run it on your own data.

Second Opinion reads a Z-info table export of daily measurements. No data ships with the repository: measurement data, scores and fitted models stay on your machine. Every example on this site is synthetic, and the pipeline can run on a fully simulated export. Use Python 3.11.

git clone https://github.com/Second-Opinion-Dev/Second_Opinion.git
cd Second_Opinion
python -m pip install -r requirements.txt
# place the export under data/tai/extracted/, then:
python src/pipeline.py --plan      # show what would run
python src/pipeline.py             # full run
Quick start ↗ How it works Documentation Source on GitHub ↗
Second OpinionDecision support, honest limits

Check what matters first.

A decision-support tool that helps operators investigate unusual measurements. A flag is a reason to investigate, not a confirmed fault. The operator stays in control.

Built by Joshua Varghese Thomji, Sunil Parameswaran, S Smriti and Oindrilla Banerjee.

Second Opinion · Built for TAI / Z-infoBack to top ↑