A package for computing case alignment using embeddings - AlignLLM
Project description
AlignLLM - Case Alignment Package
This package contains the mathematical implementation of ILRAlign and WILRAlign from AlignLLM.
Original paper: https://dl.acm.org/doi/10.1007/978-3-031-96559-3_2 Original SRC: https://github.com/RAbeyratne/aligned-ensemble-judge Exploration SRC: https://github.com/RAbeyratne/alignllm-exploration
Sample usage
!pip install alignllm-case-alignment-package import numpy as np from case_alignment_package import get_case_alignment, get_weighted_case_alignment
# Example case embedding
case_ = [np.array([1, 0, 1]), np.array([1, 2, 1])]
# Example casebase
case_base = [
[np.array([0, 3, 2]), np.array([3, 2, 2])],
[np.array([1, 0, 1]), np.array([1, 0, 2])]
]
# ILR Score (standard case alignment)
print("ILRScore:", get_case_alignment(case_, case_base))
# 0.7077719041151351
# WILR Score (weighted case alignment)
print("WILRScore:", get_weighted_case_alignment(case_, case_base))
# 0.7366226857266566
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alignllm_case_alignment_package-0.1.1.tar.gz.
File metadata
- Download URL: alignllm_case_alignment_package-0.1.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34ac0267358c444ebbc5d74370e5ea87765338cd8ed153b82760d7487f8a4fc0
|
|
| MD5 |
2b4d9e772d66f3819ffb4470a51726e0
|
|
| BLAKE2b-256 |
5230bd835e461c5ac3dfcf28793026d9d55a218a64de91ea46950cf0a927f16e
|
File details
Details for the file alignllm_case_alignment_package-0.1.1-py3-none-any.whl.
File metadata
- Download URL: alignllm_case_alignment_package-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53a1a2647ee9aaf7b28f68112bd92c4016867413f26fccf77f13cc21171a5702
|
|
| MD5 |
35d4e3d13f32a155569b86d523fce430
|
|
| BLAKE2b-256 |
4dcafbc4b89d440898919d5ebea278d164b9501a03cc0328b63efcca15e6ea6c
|