diff --git a/src/app/credExplorer/PagerankTable.js b/src/app/credExplorer/PagerankTable.js index 8a2bb8b..8d936f8 100644 --- a/src/app/credExplorer/PagerankTable.js +++ b/src/app/credExplorer/PagerankTable.js @@ -67,8 +67,7 @@ function edgeVerb( } function scoreDisplay(probability: number) { - const modifiedLogScore = Math.log(probability) + 10; - return modifiedLogScore.toFixed(2); + return (-1 * Math.log(probability)).toFixed(2); } type SharedProps = {| diff --git a/src/app/credExplorer/PagerankTable.test.js b/src/app/credExplorer/PagerankTable.test.js index 275f065..a936007 100644 --- a/src/app/credExplorer/PagerankTable.test.js +++ b/src/app/credExplorer/PagerankTable.test.js @@ -378,7 +378,7 @@ describe("app/credExplorer/PagerankTable", () => { it("renders a score column with the node's log-score", async () => { const {element, sharedProps, node} = await setup(); const {score: rawScore} = NullUtil.get(sharedProps.pnd.get(node)); - const expectedScore = (Math.log(rawScore) + 10).toFixed(2); + const expectedScore = (-Math.log(rawScore)).toFixed(2); const contributionColumn = COLUMNS().indexOf("Score"); expect(contributionColumn).not.toEqual(-1); expect( @@ -528,9 +528,7 @@ describe("app/credExplorer/PagerankTable", () => { }); it("renders a score column with the source's log-score", async () => { const {element, contribution} = await setup(); - const expectedScore = (Math.log(contribution.sourceScore) + 10).toFixed( - 2 - ); + const expectedScore = (-Math.log(contribution.sourceScore)).toFixed(2); const contributionColumn = COLUMNS().indexOf("Score"); expect(contributionColumn).not.toEqual(-1); expect(