Skip to content

Jensen shannon implementation#55

Merged
jordanmontt merged 3 commits intopharo-ai:masterfrom
Alokzh:Jensen-Shannon-Implementation
May 30, 2025
Merged

Jensen shannon implementation#55
jordanmontt merged 3 commits intopharo-ai:masterfrom
Alokzh:Jensen-Shannon-Implementation

Conversation

@Alokzh
Copy link
Contributor

@Alokzh Alokzh commented May 30, 2025

Fixes: #8

This PR adds the Jensen-Shannon Distance algorithm to the existing repository. It measures the similarity between probability distributions of character frequencies in strings.

Changes:

  1. Added AIJensenShannonDistance class inheriting from AIAbstractEditDistance
  2. Uses Jensen-Shannon divergence with square root transformation for distance calculation
  3. Returns values between 0 and 1 (0 = identical, 1 = completely different)
  4. Added extensive Tests in AIJensenShannonDistanceTest
  5. Comprehensive method documentation and examples

@jordanmontt jordanmontt merged commit bc0d8ec into pharo-ai:master May 30, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Jensen-Shannon distance

2 participants

Comments