# Cross pair avarage versus the cross pair knot masked

**URL:** https://forum.eternagame.org/t/cross-pair-avarage-versus-the-cross-pair-knot-masked/5117
**Category:** Tools
**Created:** [October 8, 2024, 10:08pm UTC](https://forum.eternagame.org/t/cross-pair-avarage-versus-the-cross-pair-knot-masked/5117 "2024-10-08T22:08:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jandersonlee](https://forum.eternagame.org/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@jandersonlee](https://forum.eternagame.org/u/jandersonlee)
#### Post date: [October 8, 2024, 10:08pm UTC](https://forum.eternagame.org/t/cross-pair-avarage-versus-the-cross-pair-knot-masked/5117/1 "2024-10-08T22:08:06Z")

</div>

Is there some javascript code somewhere or even a brief pseudo algorithm that descibes how to compute the cross pair avarage versus the cross pair knot masked?

---

<div class="post-metadata">

### Author: ![LFP6](https://forum.eternagame.org/user_avatar/forum.eternagame.org/lfp6/32/7_2.png) [@LFP6](https://forum.eternagame.org/u/LFP6)
#### Post date: [October 8, 2024, 10:20pm UTC](https://forum.eternagame.org/t/cross-pair-avarage-versus-the-cross-pair-knot-masked/5117/2 "2024-10-08T22:20:39Z")

</div>

Are you referring to the new confidence metrics? If so, here’s where you can find the implementation:

> <https://github.com/eternagame/EternaJS/blob/1ecbdc433dbea8ad17f02bd25d4087da9e299839/src/eterna/folding/FoldUtil.ts#L399-L462>

> <https://github.com/eternagame/EternaJS/blob/1ecbdc433dbea8ad17f02bd25d4087da9e299839/src/eterna/folding/FoldUtil.ts#L464-L496>

---

<div class="post-metadata">

### Author: ![jandersonlee](https://forum.eternagame.org/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@jandersonlee](https://forum.eternagame.org/u/jandersonlee)
#### Post date: [October 8, 2024, 10:35pm UTC](https://forum.eternagame.org/t/cross-pair-avarage-versus-the-cross-pair-knot-masked/5117/3 "2024-10-08T22:35:06Z")

</div>

@LFP6 Thanks. (I think.) Looks Greek to me but I’ll try and figure it out.

---

<div class="post-metadata">

### Author: ![LFP6](https://forum.eternagame.org/user_avatar/forum.eternagame.org/lfp6/32/7_2.png) [@LFP6](https://forum.eternagame.org/u/LFP6)
#### Post date: [October 8, 2024, 10:48pm UTC](https://forum.eternagame.org/t/cross-pair-avarage-versus-the-cross-pair-knot-masked/5117/4 "2024-10-08T22:48:48Z")

</div>

Happy to answer questions if I can. It’s probably more intuitive to look at Arnie’s implementation of bppConfidence (which it calls expected accuracy - I’ve changed that terminology since “accuracy” is a specific statistical measurement which I want to avoid confusion with):

> <https://github.com/DasLab/arnie/blob/e2455d14cc7ea49bda8656b678dfec6f368e6eac/src/arnie/utils.py#L594-L635>

Note that Arnie deals with a symmetric matrix (unlike Eterna). Also keep in mind that in Eterna, there’s currently some frustrating inconsistencies/bugs between Vienna and other engines: [Inconsistent dot plot/pairing probabilities behavior between Vienna/Vienna2 and everything else · Issue #803 · eternagame/EternaJS · GitHub](https://github.com/eternagame/EternaJS/issues/803)

---

<div class="post-metadata">

### Author: ![jandersonlee](https://forum.eternagame.org/letter_avatar_proxy/v4/letter/j/a9a28c/32.png) [@jandersonlee](https://forum.eternagame.org/u/jandersonlee)
#### Post date: [October 9, 2024, 5:39am UTC](https://forum.eternagame.org/t/cross-pair-avarage-versus-the-cross-pair-knot-masked/5117/5 "2024-10-09T05:39:52Z")

</div>

@LFP6 Thanks for the pointers. I think I have working code now. At least it seems to be giving the same values as the widgets in the lab tool. Intgerating it into arcknot and getting that to work with RNNet. Can display RNNet knots now, but the mutation code is broken. Poco a poco.
