Trade-offs
Which candidates in a table no other candidate beats on every objective at once. Brightness against maturation time, yield against cost, specificity against sensitivity: when no single number decides, the ranking says which choices are defensible and which are beaten outright.
| Reached by | Tools → Trade-offs |
What it does
You have a table of candidates (proteins, constructs, conditions, reagents) and several measured columns, some where higher is better and some where lower is better. A candidate is beaten when another one is at least as good on every objective and strictly better on one. The candidates that nothing beats form the first front: each is a defensible choice, and choosing between them means deciding how much one objective is worth against another, which the ranking does not assume for you.
Every other candidate sits on a deeper front, and the table names a candidate one front up that beats it on every objective, so "why not this one?" has an answer you can check. Within each front, the crowding distance says how isolated each candidate is from its neighbours, so a short list can be spread along the front rather than bunched at one end.
Rows can be filtered first by any column, and rows with an empty or non-numeric objective are left out and counted with examples. A missing measurement is not a bad one, so it is never ranked last.
When you’d use this
- Choosing a fluorescent protein for a fusion: bright, fast to mature, and acid-tolerant at once.
- Shortlisting constructs, guides, primers or conditions scored on several criteria by other tools.
- Explaining a choice to a reviewer: every rejected candidate has a named one that beats it.
What this computes
- Pareto rank (front number) for every candidate: 1 for the non-dominated, 2 for those beaten only by front 1, and so on (non-dominated sorting).
- Non-dominated flag, with identical candidates on the first front either all kept or counted once and marked as copies.
- Dominating candidate: for each candidate off the first front, one candidate a front up that is at least as good on every objective and better on one.
- Crowding distance within each front: NSGA-II's normalised form (each neighbour gap divided by that objective's range, averaged over objectives) or the raw sum of gaps in each objective's own units. The two ends of a front are infinite.
- Front sizes, and the counts of rows filtered out and left out for a missing objective.
Where it lives
Tools → Trade-offs opens it in the right rail. It reads a table in the project; the panel stays open beside whatever you are working on, so the assistant can read its settings and answer about the same ranking.
Inputs and outputs
Input: a table in the project (comma- or tab-separated, a header row, one row per candidate, quoted cells allowed), the columns to maximise, the columns to minimise, optionally the column that names each candidate and a filter.
Output: the reading of the run, the number of candidates on the first front, the scatter of the first two objectives coloured by front (the first joined when there are only two), and every ranked candidate with its front, its values, its crowding distance and what beats it.
What it refuses, and says so. A column the table does not have is named with the columns it does have; a column named twice, a filter clause it cannot read, or a filter that leaves nothing to rank is refused before the run.
Demo
There is no recording of this panel yet. The worked example below opens from the lobby starter in one click.
Worked example
The lobby starter Choose a red fluorescent protein opens on every fluorescent state in FPbase,
1,065 rows. The filter em_max>=580, em_max<=650, agg=m, switch_type=b keeps monomeric,
non-switching proteins emitting between 580 and 650 nm; brightness is maximised, maturation time
(minutes) and pKa minimised.
Of the 94 rows that pass the filter, 56 have no measured brightness, maturation or pKa and are left out and counted. The other 38 fall on six fronts of 6, 16, 9, 4, 2 and 1. The first front is LSSmScarlet3, mCRISPRed, mScarlet3, mScarlet-I3, mScarlet3-H and mCherry2: mScarlet3 is the brightest (78), mScarlet-I3 matures fastest (2 minutes), and the large-Stokes-shift LSSmScarlet3 has the lowest pKa (2.18). mRuby3 sits on the second front, beaten by mScarlet3, which is brighter (78 against 57.6), matures faster (37 against 136.5 minutes) and has a lower pKa (4.5 against 4.8).
Controls
| Control | What it does |
|---|---|
| Table | the project table holding the candidates |
| Maximise | columns where higher is better, separated by commas |
| Minimise | columns where lower is better, separated by commas |
| Label | the column naming each candidate; the first column when empty |
| Filter | clauses separated by commas, each a column, one of = != >= <= > <, and a value; numbers compare as numbers, and a blank cell passes no ordering clause |
| Crowding | NSGA-II (normalised) or raw gaps |
| Keep duplicates | keep every identical candidate on the first front, or the first and mark the rest as copies |
Algorithms you can choose
- Crowding distance, NSGA-II: each gap between a candidate's two neighbours along an objective is divided by that objective's range on the front, and the gaps are averaged over the objectives, so objectives in different units count equally. An objective that is constant on a front adds nothing to any candidate, ends included.
- Crowding distance, raw: the gaps are summed in each objective's own units, so an objective with a wide numeric range weighs more. Ties are broken in the order of the reference implementation, which decides which tied candidate gets the infinite end.
The science
A candidate dominates another when it is no worse on any objective and better on at least one. The first front is the set nothing dominates; removing it and repeating gives the second front, and so on (Deb et al. 2002). With two objectives the fronts are found in one sorted sweep (Jensen 2003). Crowding distance is NSGA-II's measure of how much room a candidate has along its front.
Limitations
- The front does not choose for you. Every first-front candidate is optimal for some weighting of the objectives; which weighting is right is a scientific judgement the ranking leaves to you.
- Measured values are taken as exact. Two candidates whose values differ by less than the measurement error are still ordered by them; the ranking carries no uncertainty.
- Many objectives flatten the ranking. With four or more objectives most candidates tend to be non-dominated; fewer, sharper objectives separate them more.
- Hypervolume contribution as a within-front order is not offered; crowding distance is.
Compared with other tools
The ranks are those of R's moocore package and of pymoo's fast non-dominated sort; the crowding
distances are those of R's emoa and of pymoo, reproduced exactly.
Export
The result table copies like any panel table.
API
import { paretoRank, crowdingDistance, rankTradeoffs } from '@ports/power';
paretoRank([[1, 3], [2, 2], [3, 1], [3, 3]]); // [1, 1, 1, 2]
crowdingDistance([[1, 3], [2, 2], [3, 1]], false, 'normalised'); // [Infinity, 1, Infinity]
rankTradeoffs({ table, objectives: [{ column: 'brightness', goal: 'max' }] });Automation
- Workflow builder: the node is
rank_tradeoffs, with the same parameters as the panel and typed outputs for the first front, every ranked candidate, the front sizes and the counts. - The assistant can call the same tool by the same name and reads the panel's settings.
- HTTP API and MCP expose the same tool, and the MCP result carries the same generated conclusion and caveats the panel shows.
Provenance
Pareto ranks and the non-dominated set are moocore's (López-Ibáñez et al., CRAN moocore version
0.3.2), checked against it on 230 cases and 49,957 points with every rank and flag identical, and
against pymoo's independent fast non-dominated sort (version 0.6.2). Crowding distances match
emoa (Mersmann, CRAN version 0.5-3) and pymoo exactly on 1,651 fronts. The whole ranking,
filter to crowding distance, is checked against R over 1,239 fluorescent-protein states from FPbase
(Lambert, Nature Methods 16, 277–278, 2019). Cite Deb, Pratap, Agarwal and Meyarivan, A fast and
elitist multi-objective genetic algorithm: NSGA-II, IEEE Transactions on Evolutionary Computation
6(2), 182–197 (2002), and Jensen, Reducing the run-time complexity of multiobjective EAs, IEEE
Transactions on Evolutionary Computation 7(5), 503–515 (2003).
Screenshots
No still of this panel is published yet; the worked example above opens from the lobby starter.
Related
- In this group: Power and Sample Size, for sizing the experiment once a candidate is chosen.