fix(core): update HITS classification to use 75th percentile#50
fix(core): update HITS classification to use 75th percentile#50saurabhsharma2u wants to merge 1 commit intomainfrom
Conversation
Updates the HITS `classifyLinkRoles` function to use the 75th percentile as the threshold for "High" Authority/Hub scores, aligning with the architectural intent and code comments. Refactors `classifyLinkRoles` to be exported for direct testing. Updates `hits.test.ts` with a robust reciprocal star topology test case to guarantee Power node classification. Adds `hits_classification.test.ts` for granular unit testing of the classification logic.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR updates the HITS algorithm in
@crawlith/coreto use the 75th percentile (instead of the median) when classifying nodes as "High" Authority or Hub. This aligns the implementation with the intended logic described in code comments.Changes:
plugins/core/src/scoring/hits.tsto calculatehighAuthandhighHubusing the 75th percentile.classifyLinkRolesfor easier testing.plugins/core/tests/hits.test.tsto use a robust Reciprocal Star Topology for verifying "Power" node classification, which is more stable than ad-hoc graphs.plugins/core/tests/hits_classification.test.tsto unit test the classification logic specifically.Tests:
pnpm --filter @crawlith/core test tests/hits.test.tsandtests/hits_classification.test.ts.tests/metrics.test.tsandtests/pagerank.test.ts.PR created automatically by Jules for task 9057382431427311962 started by @saurabhsharma2u