Column chromatography
This page fits two algorithms, DISCOVER and PySR, to the same dataset and compares the
expressions they return. Both are called through kd.Model, so the two runs differ in
the algorithm name and in the search parameters specific to each algorithm.
The dataset
kd.load_tlc_cc() returns 74 rows from an automated column chromatography platform.
Each row is one experimental condition: the two feature columns are the thin-layer
retardation factor R_F and the petroleum-ether fraction r of the eluent, and the
target is the retention volume V_S in millilitres, averaged over the compounds run at
that condition. Xu et al. (2025) published
a formula relating the three:
Run both algorithms
table = kd.load_tlc_cc()
discover = kd.Model(
algorithm="discover", generations=200, seed=0,
batch_size=1000, max_length=15, reward_alpha=0.005,
).fit(table)
pysr = kd.Model(
algorithm="pysr", generations=100, seed=0,
maxsize=10, binary_operators=("+", "*", "/"), unary_operators=(),
).fit(table)
Neither call specifies candidate terms. DISCOVER searches over the table's own column
names together with the operators add, sub, mul and div. PySR receives the same
two columns and the operators +, * and /. Both return a REGRESSION equation on
result_.equation and the nondominated set of the search on result_.pareto_front().
The published formula on both fronts
Each algorithm returns an expression together with an outer coefficient fitted for it. Dividing through puts both in the form of the published formula:
a |
b |
R² | |
|---|---|---|---|
| Published | 0.147 | 0.0114 | 0.876 |
| DISCOVER, 5 tokens | 0.1507 | 0.01110 | 0.876 |
| PySR, 7 nodes | 0.1496 | 0.01121 | 0.876 |
The two coefficient pairs are within 2.6% of the published values and within 1% of each other, from one run of each algorithm at a fixed seed.
The selected answers
Neither run selects the published formula. Three of the 74 rows were measured at
r = 0, where that formula predicts zero against measured volumes of 4.41, 5.17 and
5.86 mL, so an expression carrying an intercept fits the table more closely, and a
shorter expression that omits r is cheaper under both complexity measures. DISCOVER
selected a nine-token expression with an R² of 0.898, and PySR selected the five-node
expression 5.892 / (R_F + 0.0669) with an R² of 0.864. The published formula appears
between these on both fronts.