IsoScore is the first tool available in the literature that accurately measures isotropy in embedding space.
Project description
IsoScore
This contains the Python3 implementation of IsoScore, which was originally introduced in the 2022 paper by William Rudman, Nate Gillman, Taylor Rayne, and Carsten Eickhoff, published in the Findings of the ACL (https://aclanthology.org/2022.findings-acl.262/). IsoScore is the first tool available in the literature that accurately measures isotropy in embedding space. See the original paper for more information.
IsoScore 2.0.0 provides an updated version of IsoScore, called IsoScore*, that allows users to reliably measure isotropy of point clouds where the dimensionality of the point cloud is larger the number of samples. Additionally, IsoScore* is differentiable and can be used as a regularizer in embedding space. For details of IsoScore* and the impact that using IsoScore* as a regularizer in fine-tuning pre-trained language models see: https://arxiv.org/abs/2305.19358
How to use
import torch
from IsoScore.IsoScore import *
Our pip installation has the following functions:
IsoScore(points): The original IsoScore function that measures isotropy of a point cloud.IsoScore_star(points, C0, zeta): calculates IsoScore* of a point cloud where C0 is the shrinkage covariance matrix and zeta is the shrinkage parameter.IsoScore_cov(cov): If you want to measure the isotropy of a given distribution without the need to generate samples, you can calculate IsoScore directly from the covariance matrix.istar():torch.nn.Moduleused to implement I-STAR loss.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
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 IsoScore-2.0.1.tar.gz.
File metadata
- Download URL: IsoScore-2.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61997ebaaa47e32ad11b54362453b901d142f9611fd57df3c0bbc13fdc140b39
|
|
| MD5 |
bd07bc81b99cc862a559a95744c4bd12
|
|
| BLAKE2b-256 |
9f1eb798a831d671675a21065b417ecc33ed0898a10a57f089dcfaf98f870735
|
File details
Details for the file IsoScore-2.0.1-py3-none-any.whl.
File metadata
- Download URL: IsoScore-2.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1aff463cf13ab366df2831d3f4b37250c12b65da5523522df49f9cf8ebbec0a9
|
|
| MD5 |
6af06eb3020451586f05bf308e3d2887
|
|
| BLAKE2b-256 |
ad72df1889f255287a953f27e5216461750fd97a9bb996f75c7764ad6dedfb81
|