Skip to content

Commit

Permalink
modify rho calculation to match the literature wherein positive rho s…
Browse files Browse the repository at this point in the history
…ignifies co-occurrence and negative rho signifies mutual exclusivity
  • Loading branch information
ashuaibi7 committed Dec 17, 2024
1 parent 37507c8 commit 2748e8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dialect/models/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def compute_rho(self, taus):
.. math::
\\rho = \\frac{\\tau_{01} \\cdot \\tau_{10} - \\tau_{11} \\cdot \\tau_{00}}
\\rho = \\frac{\\tau_{11} \\cdot \\tau_{00} - \\tau_{01} \\cdot \\tau_{10}}
{\\sqrt{\\tau_{0*} \\cdot \\tau_{1*} \\cdot \\tau_{*0} \\cdot \\tau_{*1}}}
where:
Expand Down Expand Up @@ -423,7 +423,7 @@ def compute_rho(self, taus):
)
return None

rho = (self.tau_01 * self.tau_10 - self.tau_11 * self.tau_00) / (
rho = (self.tau_11 * self.tau_00 - self.tau_01 * self.tau_10) / (
np.sqrt(tau_0X * tau_1X * tau_X0 * tau_X1)
)
logging.info(f"Computed rho for interaction {self.name}: {rho}")
Expand Down

0 comments on commit 2748e8f

Please sign in to comment.