Skip to main content

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.

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

alignllm_case_alignment_package-0.1.2.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file alignllm_case_alignment_package-0.1.2.tar.gz.

File metadata

File hashes

Hashes for alignllm_case_alignment_package-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c8397105cd82fcb00b4dde6247fef7a2a95be3cd627d3a042b61905a74714323
MD5 a7c96b5b1795f26a43dc1109c3105e4b
BLAKE2b-256 c19ba4eaec54517efcd9bbf3fed960ccbd729cf5c1dbbd9f0b3d7e38db9b16d4

See more details on using hashes here.

File details

Details for the file alignllm_case_alignment_package-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for alignllm_case_alignment_package-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e693a90660f6ff00cb0fc572d30f497130c3dd35fce22f9cf764e295d37ae5ca
MD5 027a6463af86c6c449868bd03d986a01
BLAKE2b-256 de54775044755734b6152a3e321b3a52ffa3c58daaf3fcbd273ed900bd14fad4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page