Learning center

Branch correlation: constant inputs, metric meaning and CSV precision

Distinguish undefined correlation from zero, read fitted-residual units, and compare complete saved CSV values while keeping public, extracted-function and export evidence separate.

Read Branch Length Correlation with its variation and precision limits. This guide separates one retained public constant-input refusal, earlier checks of extracted functions and a later table-registration/CSV check. Together they explain the saved behavior; they do not establish a new complete native workflow.

1. Identify the matched lengths and input order

The route compares lengths for shared nontrivial taxon splits. Terminal edges are excluded from these matched vectors. An internal split present in only one tree is not added as a zero coordinate. These rules differ from the full coordinate union in the Branch Score guide.

The reviewed source locally combines the two incident lengths of a degree-two root when they represent one internal split. It requires at least two shared nontrivial splits and variation in both resulting vectors. The source’s initial branch-length check does not provide Branch Score’s complete finite, nonnegative non-root length contract. Do not transfer that other method’s input guarantees to this route.

The first tree supplies the predictor vector; the second supplies the response vector. Keep their names, order, units and length definitions. The NJ and UPGMA labels are retained implementation names for supplied trees, not proof that these trees were inferred by those algorithms.

2. Keep an undefined correlation separate from zero

The retained public case supplied these two five-taxon Newick strings, in order:

(A:1,B:1,(C:1,(D:1,E:1):1):1);
(A:1,B:1,(C:1,(D:1,E:1):2):1);

The saved parser and split maps produced the two matched vectors below. Position identifies their retained sorted shared-split order; it is not a genomic coordinate:

Matched positionFirst lengthSecond length
11.01.0
21.02.0

The first vector has no variation. The selected route returned false before correlation, fitting or figure work, and retained the complete refusal table:

Saved fieldSaved value
Statusno_data
Required uploadvariation in both matched branch-length vectors
RefKuhner & Felsenstein, Mol Biol Evol 1994

The general input state remained loaded, and the overall log ended with Complete. The named method still reported no_data. This does not mean Pearson or Spearman correlation equals zero. Preserve the reason and original trees; adding noise, discarding lengths or replacing an undefined result with zero would change the analysis.

Separate earlier checks of five extracted functions cover four constant situations: constant first vector, constant second vector, both constant and an all-zero first vector. The first overlaps the public case above. Those checks are not four additional public or native workflows, and the exact-equality guard does not establish numerical conditioning for nearly constant vectors.

3. Read the four metrics within their definitions

Pearson r describes linear association of the matched lengths. Spearman rho is Pearson correlation of their ranks; the source assigns average ranks to tied values. Both correlations are dimensionless. A high value is not proof of equal lengths, correct branch matching or biological accuracy.

R2 is the square of Pearson r in this route, so it loses the correlation’s sign. RMSE is the root mean square of residuals after fitting the second vector from the first with a slope and intercept. It follows the second vector’s length units. It is not the direct root mean square difference between the two original vectors. Preserve compatible scientific length definitions even when a statistic is dimensionless.

The earlier extracted-function checks include this tied, varying case:

Matched positionFirst lengthSecond length
111
212
323

Its earlier five-field summary stored four formatted metric strings. The later precision check used an existing independent reference for this same fixture to exercise table registration and the export backend. It did not repeat the fit, rank or correlation calculation, and it did not run the full Tree application.

4. Compare the complete saved CSV fields

The historical baseline CSV contains every field below. Formatting happened before table registration, so the lost digits were already absent when the exporter received the values:

Saved fieldBaseline CSV value
Pearson r0.8660
Spearman rho0.8660
R20.7500
RMSE0.408248
RefKuhner & Felsenstein, Mol Biol Evol 1994

The separately checked candidate passes four Python float values through registration. That exact candidate was later integrated as snapshot cf7c7d96…. Its complete saved CSV is:

Saved fieldIntegrated-candidate CSV value
Pearson r0.8660254037844386
Spearman rho0.8660254037844386
R20.7499999999999999
RMSE0.408248290463863
RefKuhner & Felsenstein, Mol Biol Evol 1994

For this reference, the baseline Pearson, Spearman and RMSE values differ by more than the retained 1e-12 tolerance; its R2 does not. The candidate’s four CSV numbers preserve their supplied binary64 values exactly. Its retained maximum absolute reference error is about 1.11e-16. These are earlier saved comparisons, not newly computed scientific results.

The candidate R2 text 0.7499999999999999 is the serialized floating-point result supplied to this check; the independent reference is 0.75. More printed digits preserve the represented value, not arbitrary precision or additional biological certainty. Rounded logs remain separate from CSV storage, and native viewer display precision was not accepted by this export check.

5. Keep the actual export scope and files

Each precision condition saved one Branch_Length_Correlation.csv and one artifact_manifest.json. The manifest lists that CSV’s name, bytes and SHA-256 hash. Keep the two conditions separately: there are four retained files across the comparison, not a four-file export bundle from one run.

The original export backend and table-registration stages were exercised with the supplied metric payload. The complete Tree module, native GUI, Save Table, figure drawing and full analysis route were not run by this check. The files contain no original Newick input, complete paired length vectors, fitted coefficients, residual vector or reloadable session. Save input provenance separately; another Tree method’s exports do not fill those gaps.

6. Keep the residual-panel correction in its own scope

A separate source correction changed the second panel to Residual Normal Probability Plot, with standard-normal quantiles on the horizontal axis and ordered residuals on the vertical axis. It removed that panel’s identity line. Nine quantile coordinates for sample sizes two, three and four, plus two residual responses, were checked in the retained coordinate review.

That targeted review did not establish a newly rendered native plot, full-method execution, normality, a p-value or fit quality. The first correlation panel and fitted residual calculations were unchanged by that correction. A small residual plot is not, by itself, a normality test.

Worked examples describe particular inputs, methods and recorded results. Check current availability and input requirements before planning an evaluation.

← Back to the learning center