Skip to main content

A Python package to calculate the disruption index and embedding disruptiveness measure using a citation network.

Project description

embedding-disruptiveness

embedding-disruptiveness is a Python package for calculating the Embedding Disruptiveness Index of papers or patents using a citation network. This measure helps to identify how disruptive or consolidating a publication or patent is within its respective field.

The package builds upon the original node2vec code by @skojaku, which implements the directional skip-gram algorithm. You can find the original node2vec implementation here. embedding-disruptiveness modifies and extends this code to specifically calculate the disruption index and an embedding-based disruptiveness measure.

Installation

To install the latest version of embedding-disruptiveness, run:

pip install --upgrade embedding-disruptiveness

Requirements

This code requires at least two gpus

Usage

Here is a basic example of how to use embedding-disruptiveness:

import embedding_disruptiveness

# Initialize the model with required parameters
trainer = embedding_disruptiveness.EmbeddingTrainer(net_input = NETWORK_FILE_LOCATION , #(npz file type)
                                                   dim = 128, # dimension of embedding vectors
                                                   window_size=5, # windowsize
                                                   device_in = '6', # cuda device where in-vectors will be 
                                                   device_out = '7',# cuda device where out-vectors will be 
                                                   q_value = 1, # q value in the randomwalk
                                                   epochs =1,  # epochsize
                                                    batch_size = 1024,# batchsize
                                                   save_dir = SAVE_LOCATION)

trainer.train()

Model Parallelism

This package uses model parallelism to speed up the calculations, especially when dealing with large citation networks. Note: You need at least two GPUs to run the code. Ensure your environment is set up for multi-GPU usage, and the necessary CUDA drivers are installed.

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

embedding_disruptiveness-0.1.2.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

embedding_disruptiveness-0.1.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: embedding_disruptiveness-0.1.2.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for embedding_disruptiveness-0.1.2.tar.gz
Algorithm Hash digest
SHA256 aedc82cc4d5897102d71cc6a0fc9beb7e0941021277ac5887e9d9a6f77e9ed1f
MD5 752a4c2ef20b35f5d8acacef05d472fe
BLAKE2b-256 257d8cd6e4db51630eee8d163f65f06f6d5b3e12f64636019d9928ed9562dc3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for embedding_disruptiveness-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bf93471ae455aad7b040ebc800a117d93453b85b64028d45b518e47f52bbb524
MD5 113b36b7ee6a9271d370bbd2c47cf5e1
BLAKE2b-256 f3a9e27749ed8504fcc146b4b5aa5f842d3142cc0a76eeaf9bb5f34385c6a25c

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