pan-biclustering


Namepan-biclustering JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryPython implementation of the PAN biclustering algorithm
upload_time2024-09-09 07:21:07
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords pan biclustering pareto-set-analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PAN
Python implementation of the PAN biclustering algorithm [[1]](#1).

PAN is made to perform analysis on the Pareto set and front resulting from a multi-objective optimization method. In its turn, PAN is a bi-objective evolutionary algorithm, performing clustering in two spaces at the same time. Since this is another conflicting optimization problem, PAN returns multiple partitionings (collections of clusters), from which the user can choose their preferred partitioning.

PAN makes a few assumptions about the given data:
- The best partitioning in the objective space differs from the best partitioning in the decision space. If this is not the case, a single objective clustering algorithm can be used on one of the two spaces.
- Each cluster contains at least two solutions. If this is not the case, outliers need to be manually removed.

To speedup optimization, PAN uses k-medoids clustering as a local heuristic, implemented here using the fast [kmedoids](https://github.com/kno10/python-kmedoids) package.


## Installation
A pre-built package is available at [Pypi]() and can be installed with:
```sh
pip install pan_biclustering
```


## Usage
A quick example usage can be found below.

```python
from pan_biclustering.pan import PAN

# Decision space of points 1, 2, 3 and 4
pareto_set = [
    [1, 2], [2, 1], [14, 14], [13, 13],
]
# Objective space of points 1, 2, 3 and 4
pareto_front = [
    [14, 14], [13, 13], [1, 2], [2, 1],
]

def euclidean_distance(p1, p2):
    return sum([(a - b) ** 2 for a, b in zip(p1, p2)]) ** 0.5

pan = PAN(pareto_set, pareto_front, euclidean_distance)
population, population_indices = pan.find_clusters(5, 400)
partitioning = population[0]

# Two clusters, both containing two of the points 1, 2, 3 and 4
print(partitioning)
```

A second, more elaborate example can be found in the /examples folder.

To automatically pick a partitioning out of the found partitionings, a knee-point detection algorithm such as [kneed](https://pypi.org/project/kneed/) can be used on the returned population_indices.

## References
<a id="1">1</a>
Ulrich, T. (2013), Pareto-Set Analysis: Biobjective Clustering in Decision and Objective Spaces. J. Multi-Crit. Decis. Anal., 20: 217-234. https://doi.org/10.1002/mcda.1477

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pan-biclustering",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "PAN, BICLUSTERING, PARETO-SET-ANALYSIS",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/fd/c0/e4f2e609043db1f99ba6cecced292ca6260142007ec0a3d2188f92ade05d/pan_biclustering-1.0.0.tar.gz",
    "platform": null,
    "description": "# PAN\r\nPython implementation of the PAN biclustering algorithm [[1]](#1).\r\n\r\nPAN is made to perform analysis on the Pareto set and front resulting from a multi-objective optimization method. In its turn, PAN is a bi-objective evolutionary algorithm, performing clustering in two spaces at the same time. Since this is another conflicting optimization problem, PAN returns multiple partitionings (collections of clusters), from which the user can choose their preferred partitioning.\r\n\r\nPAN makes a few assumptions about the given data:\r\n- The best partitioning in the objective space differs from the best partitioning in the decision space. If this is not the case, a single objective clustering algorithm can be used on one of the two spaces.\r\n- Each cluster contains at least two solutions. If this is not the case, outliers need to be manually removed.\r\n\r\nTo speedup optimization, PAN uses k-medoids clustering as a local heuristic, implemented here using the fast [kmedoids](https://github.com/kno10/python-kmedoids) package.\r\n\r\n\r\n## Installation\r\nA pre-built package is available at [Pypi]() and can be installed with:\r\n```sh\r\npip install pan_biclustering\r\n```\r\n\r\n\r\n## Usage\r\nA quick example usage can be found below.\r\n\r\n```python\r\nfrom pan_biclustering.pan import PAN\r\n\r\n# Decision space of points 1, 2, 3 and 4\r\npareto_set = [\r\n    [1, 2], [2, 1], [14, 14], [13, 13],\r\n]\r\n# Objective space of points 1, 2, 3 and 4\r\npareto_front = [\r\n    [14, 14], [13, 13], [1, 2], [2, 1],\r\n]\r\n\r\ndef euclidean_distance(p1, p2):\r\n    return sum([(a - b) ** 2 for a, b in zip(p1, p2)]) ** 0.5\r\n\r\npan = PAN(pareto_set, pareto_front, euclidean_distance)\r\npopulation, population_indices = pan.find_clusters(5, 400)\r\npartitioning = population[0]\r\n\r\n# Two clusters, both containing two of the points 1, 2, 3 and 4\r\nprint(partitioning)\r\n```\r\n\r\nA second, more elaborate example can be found in the /examples folder.\r\n\r\nTo automatically pick a partitioning out of the found partitionings, a knee-point detection algorithm such as [kneed](https://pypi.org/project/kneed/) can be used on the returned population_indices.\r\n\r\n## References\r\n<a id=\"1\">1</a>\r\nUlrich, T. (2013), Pareto-Set Analysis: Biobjective Clustering in Decision and Objective Spaces. J. Multi-Crit. Decis. Anal., 20: 217-234. https://doi.org/10.1002/mcda.1477\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python implementation of the PAN biclustering algorithm",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/zwouter/PAN",
        "Issues": "https://github.com/zwouter/PAN/issues"
    },
    "split_keywords": [
        "pan",
        " biclustering",
        " pareto-set-analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d6de94a6ca9205e86ea29cbbd669b8bee357beff9af14e5ea11d0d76825c8af8",
                "md5": "c67c88a36224cf51317fb1233b66a3e4",
                "sha256": "865082eb1ae26b74507df116437699dbda3fc84e98f484607fe5d0a805bd8510"
            },
            "downloads": -1,
            "filename": "pan_biclustering-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c67c88a36224cf51317fb1233b66a3e4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12483,
            "upload_time": "2024-09-09T07:21:05",
            "upload_time_iso_8601": "2024-09-09T07:21:05.606513Z",
            "url": "https://files.pythonhosted.org/packages/d6/de/94a6ca9205e86ea29cbbd669b8bee357beff9af14e5ea11d0d76825c8af8/pan_biclustering-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fdc0e4f2e609043db1f99ba6cecced292ca6260142007ec0a3d2188f92ade05d",
                "md5": "4441981a933adaf4f599ebe963db205d",
                "sha256": "2d192cead578acec90eba6606c113e55d2fb976846289b0bc7aaa1d0f7981b4f"
            },
            "downloads": -1,
            "filename": "pan_biclustering-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4441981a933adaf4f599ebe963db205d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11964,
            "upload_time": "2024-09-09T07:21:07",
            "upload_time_iso_8601": "2024-09-09T07:21:07.185547Z",
            "url": "https://files.pythonhosted.org/packages/fd/c0/e4f2e609043db1f99ba6cecced292ca6260142007ec0a3d2188f92ade05d/pan_biclustering-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-09 07:21:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zwouter",
    "github_project": "PAN",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pan-biclustering"
}
        
Elapsed time: 0.63219s