ISCT


NameISCT JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryInterpretable Sequence Clustering Tree
upload_time2025-01-12 15:05:14
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords isct sequence clustering tree
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Interpretable-Sequence-Clustering-Tree

Source Code for Interpretable sequence clustering https://www.sciencedirect.com/science/article/pii/S0020025524013677



## Running


We added the tree structure visualization, to use it on linux please first 

```
sudo apt-get install graphviz
export PATH=$PATH:/usr/local/bin
source ~/.bashrc
```
We recommend using Pypy, which may give exponential speedups on larger datasets

## Usage

### Random Projection on Python version

```
pip install ISCT
```


<!-- code -->
```python

from ISCT import ISCT
sequences = [
    ['a', 'g', 't', 't', 'c'], 
    ['a', 't', 'g', 'g', 't', 'u', 't'], 
    ['a', 'c', 't', 'u', 'u', 'a', 'a'], 
    ['a', 'c', 'a', 'u', 'a', 't', 'c', 't'], 
    ['a', 'g', 'g', 'c', 'a', 'a', 'c'], 
    ['a', 'c', 'g', 'g', 'c', 'c', 'a', 'a']]
isct = ISCT(num_clusters = 3, visulization_name = 'test', min_sample=2) # if visulization_name is provided, it generates the "test.pdf".
y_pred = isct.fit(sequences)
print(y_pred)
```


<!-- 
### Random Projection  CPP version

1. First, compile the cpp file on your Linux in order to generate the fast Random Projection Generator.
2. Run ISCT_cpp.py to get the clustering results -->





## Dependencies
- Python 3.9.16 (Pypy)
- NumPy 1.24.3
- Scikit-learn 1.2.2
- Pandas 2.0.1
- Prefixspan 0.5.2


## Visualization

ISCT could provide you with a highly concise and short clustering tree, taking poineer as example:
<img width="408" alt="image" src="https://github.com/jd445/Interpretable-Sequence-Clustering-Tree/assets/65555729/5a0a465f-0d7d-4d5c-a149-9ceb927abed9">

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ISCT",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ISCT, sequence, clustering, tree",
    "author": null,
    "author_email": "Junjie Dong <jd445@qq.com>",
    "download_url": "https://files.pythonhosted.org/packages/27/ee/1ec3a4c83ddc5720debd246d552b1495b67bc53db2a44d0d785b7a1f0bcc/isct-0.1.2.tar.gz",
    "platform": null,
    "description": "# Interpretable-Sequence-Clustering-Tree\n\nSource Code for Interpretable sequence clustering https://www.sciencedirect.com/science/article/pii/S0020025524013677\n\n\n\n## Running\n\n\nWe added the tree structure visualization, to use it on linux please first \n\n```\nsudo apt-get install graphviz\nexport PATH=$PATH:/usr/local/bin\nsource ~/.bashrc\n```\nWe recommend using Pypy, which may give exponential speedups on larger datasets\n\n## Usage\n\n### Random Projection on Python version\n\n```\npip install ISCT\n```\n\n\n<!-- code -->\n```python\n\nfrom ISCT import ISCT\nsequences = [\n    ['a', 'g', 't', 't', 'c'], \n    ['a', 't', 'g', 'g', 't', 'u', 't'], \n    ['a', 'c', 't', 'u', 'u', 'a', 'a'], \n    ['a', 'c', 'a', 'u', 'a', 't', 'c', 't'], \n    ['a', 'g', 'g', 'c', 'a', 'a', 'c'], \n    ['a', 'c', 'g', 'g', 'c', 'c', 'a', 'a']]\nisct = ISCT(num_clusters = 3, visulization_name = 'test', min_sample=2) # if visulization_name is provided, it generates the \"test.pdf\".\ny_pred = isct.fit(sequences)\nprint(y_pred)\n```\n\n\n<!-- \n### Random Projection  CPP version\n\n1. First, compile the cpp file on your Linux in order to generate the fast Random Projection Generator.\n2. Run ISCT_cpp.py to get the clustering results -->\n\n\n\n\n\n## Dependencies\n- Python 3.9.16 (Pypy)\n- NumPy 1.24.3\n- Scikit-learn 1.2.2\n- Pandas 2.0.1\n- Prefixspan 0.5.2\n\n\n## Visualization\n\nISCT could provide you with a highly concise and short clustering tree, taking poineer as example:\n<img width=\"408\" alt=\"image\" src=\"https://github.com/jd445/Interpretable-Sequence-Clustering-Tree/assets/65555729/5a0a465f-0d7d-4d5c-a149-9ceb927abed9\">\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Interpretable Sequence Clustering Tree",
    "version": "0.1.2",
    "project_urls": {
        "Issues": "https://github.com/jd445/Interpretable-Sequence-Clustering-Tree/issues",
        "Source": "https://github.com/jd445/Interpretable-Sequence-Clustering-Tree"
    },
    "split_keywords": [
        "isct",
        " sequence",
        " clustering",
        " tree"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f205662685af65c318a522a87558142b6ad65aaeeafd9db2641fe3857d4720e9",
                "md5": "4b54ee089ae6b8c87d21532c3523beba",
                "sha256": "8285e5052bc65ae308c6d6bfbb06f2d193f05c144173f00a0b8e82a70c80799f"
            },
            "downloads": -1,
            "filename": "ISCT-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b54ee089ae6b8c87d21532c3523beba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9971,
            "upload_time": "2025-01-12T15:05:11",
            "upload_time_iso_8601": "2025-01-12T15:05:11.817354Z",
            "url": "https://files.pythonhosted.org/packages/f2/05/662685af65c318a522a87558142b6ad65aaeeafd9db2641fe3857d4720e9/ISCT-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27ee1ec3a4c83ddc5720debd246d552b1495b67bc53db2a44d0d785b7a1f0bcc",
                "md5": "f80f104d3334c0f195c7272f9afdaa0c",
                "sha256": "d8851ab4dcb63575a53707ef11da3b20d4d3ae748938304d9cfaed7b90f4c6d4"
            },
            "downloads": -1,
            "filename": "isct-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f80f104d3334c0f195c7272f9afdaa0c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9142,
            "upload_time": "2025-01-12T15:05:14",
            "upload_time_iso_8601": "2025-01-12T15:05:14.256731Z",
            "url": "https://files.pythonhosted.org/packages/27/ee/1ec3a4c83ddc5720debd246d552b1495b67bc53db2a44d0d785b7a1f0bcc/isct-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-12 15:05:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jd445",
    "github_project": "Interpretable-Sequence-Clustering-Tree",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "isct"
}
        
Elapsed time: 0.85795s