embedding-disruptiveness


Nameembedding-disruptiveness JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/yourusername/embedding-disruptiveness
SummaryA Python package to calculate the disruption index and embedding disruptiveness measure using a citation network.
upload_time2024-11-26 06:18:21
maintainerNone
docs_urlNone
authorMunjung Kim, Skojaku
requires_python>=3.8
licenseMIT
keywords science of science disruption index citation innovation edm embedding disruptiveness measure
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/skojaku/node2vec). `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:

```bash
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:

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yourusername/embedding-disruptiveness",
    "name": "embedding-disruptiveness",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "science of science, disruption index, citation, innovation, edm, embedding disruptiveness measure",
    "author": "Munjung Kim, Skojaku",
    "author_email": "Munjung Kim <munjkim@iu.edu>, Skojaku <skojaku@binghamton.edu>",
    "download_url": "https://files.pythonhosted.org/packages/da/4a/0407dcca141857da67b8a4f9589fe2a6771020b88423ab2b8d5167c276e3/embedding_disruptiveness-1.0.0.tar.gz",
    "platform": null,
    "description": "# embedding-disruptiveness\n\n`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.\n\nThe package builds upon the original `node2vec` code by @skojaku, which implements the directional skip-gram algorithm. You can find the original `node2vec` implementation [here](https://github.com/skojaku/node2vec). `embedding-disruptiveness` modifies and extends this code to specifically calculate the disruption index and an embedding-based disruptiveness measure.\n\n\n## Installation\n\nTo install the latest version of `embedding-disruptiveness`, run:\n\n```bash\npip install --upgrade embedding-disruptiveness\n```\n\n\n## Requirements\nThis code requires at least two gpus\n\n## Usage\nHere is a basic example of how to use embedding-disruptiveness:\n\n```python\nimport embedding_disruptiveness\n\n# Initialize the model with required parameters\ntrainer = embedding_disruptiveness.EmbeddingTrainer(net_input = NETWORK_FILE_LOCATION , #(npz file type)\n                                                   dim = 128, # dimension of embedding vectors\n                                                   window_size=5, # windowsize\n                                                   device_in = '6', # cuda device where in-vectors will be \n                                                   device_out = '7',# cuda device where out-vectors will be \n                                                   q_value = 1, # q value in the randomwalk\n                                                   epochs =1,  # epochsize\n                                                    batch_size = 1024,# batchsize\n                                                   save_dir = SAVE_LOCATION)\n\ntrainer.train()\n```\n\n## Model Parallelism\n\nThis 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.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package to calculate the disruption index and embedding disruptiveness measure using a citation network.",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://github.com/MunjungKim/embedding-disruptiveness#readme",
        "Homepage": "https://github.com/MunjungKim/embedding-disruptiveness",
        "Repository": "https://github.com/MunjungKim/embedding-disruptiveness"
    },
    "split_keywords": [
        "science of science",
        " disruption index",
        " citation",
        " innovation",
        " edm",
        " embedding disruptiveness measure"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53c700da4c76c38562f73fee2732233adc7e3696a9934d12f82da648b896c157",
                "md5": "27cd69480eccee06d95e4a9945e68aff",
                "sha256": "9eeaf5b10cec49b7e9918f79435c2177579270f211a9e2cbfb4eb961e7585516"
            },
            "downloads": -1,
            "filename": "embedding_disruptiveness-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "27cd69480eccee06d95e4a9945e68aff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19364,
            "upload_time": "2024-11-26T06:18:20",
            "upload_time_iso_8601": "2024-11-26T06:18:20.339843Z",
            "url": "https://files.pythonhosted.org/packages/53/c7/00da4c76c38562f73fee2732233adc7e3696a9934d12f82da648b896c157/embedding_disruptiveness-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da4a0407dcca141857da67b8a4f9589fe2a6771020b88423ab2b8d5167c276e3",
                "md5": "896d564fe0d322551ec4f2b81610d340",
                "sha256": "e85c2d60ecb1133442b888b1bb4bbf42f97a8fb0859617dc0854925aee557526"
            },
            "downloads": -1,
            "filename": "embedding_disruptiveness-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "896d564fe0d322551ec4f2b81610d340",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16328,
            "upload_time": "2024-11-26T06:18:21",
            "upload_time_iso_8601": "2024-11-26T06:18:21.821469Z",
            "url": "https://files.pythonhosted.org/packages/da/4a/0407dcca141857da67b8a4f9589fe2a6771020b88423ab2b8d5167c276e3/embedding_disruptiveness-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-26 06:18:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "embedding-disruptiveness",
    "github_not_found": true,
    "lcname": "embedding-disruptiveness"
}
        
Elapsed time: 1.90534s