{ "info": { "author": "David B. Blumenthal", "author_email": "david.blumenthal@wzw.tum.de", "bugtrack_url": null, "classifiers": [], "description": "# biclustpy\n\nA Python library for bi-cluster editing.\n\n## The Bi-Cluster Editing Problem\n\n- Task: Given a matrix `weights` with positive and negative weights, transform the bipartite graph induced by `weights` into a disjoint collection of bi-cliques (bi-clusters) via edge insertions and deletions, such that the overall transformation cost is minimal.\n- The node sets of the bipartite graph induced by `weights` are the sets of rows and columns. There is an edge between row `i` and column `k` if and only if `weights[i,k] > 0`.\n- Deleting an existing edge `(i,k)` incurs cost `weights[i,k]`.\n- Inserting a non-existing edge `(i,k)` incurs cost `-weights[i,k]`. \n\n## Installation\n\n1. Download and install [Gurobi](https://www.gurobi.com/) and obtain a license by following the instructions in the installation guide for [Linux](https://www.gurobi.com/documentation/8.0/quickstart_linux/software_installation_guid.html#section:Installation), [Mac OS](https://www.gurobi.com/documentation/8.0/quickstart_mac/software_installation_guid.html#section:Installation), or [Windows](https://www.gurobi.com/documentation/8.0/quickstart_windows/software_installation_guid.html#section:Installation).\n2. Open a shell and execute `pip install biclustpy`.\n\n## Library Usage\n\nAfter installation, `import biclustpy as bp` into your Python application. Then use it as follows: \n\n- `bp.Algorithm`: Use this class to select the algorithm you want to employ.\n - `bp.Algorithm.algorithm_name`: String you can use to select the algorithm you want to employ. Default: `\"ILP\"`.\n - Set to `\"ILP\"` if you want to use Gurobi to solve the ILP formulation suggested in [G. F. de Sousa Filho et al (2017): New heuristics for the bicluster editing problem](https://doi.org/10.1007/s10479-016-2261-x).\n - Set to `\"CH\"` if you want to use the constructive heuristic suggested in [G. F. de Sousa Filho et al (2017): New heuristics for the bicluster editing problem](https://doi.org/10.1007/s10479-016-2261-x).\n - More algorithms are following soon.\n - `bp.Algorithm.ilp_time_limit`: Integer that specifies a time limit in seconds for the optimization and the tuning phase of the algorithm `\"ILP\"`. Default: `60`.\n - `bp.Algorithm.ilp_tune`: Boolean flag that indicates whether or not `\"ILP\"` should be tuned before being optimized. Default: `False`. \n- `bp.compute_bi_clusters(weights, algorithm)`: Use this function to solve a bi-cluster editing problem.\n - `weights`: The problem instance given as a `numpy.array`. \n - `algorithm`: The selected algorithm given as a `bp.Algorithm` object.\n- `bp.save_bi_clusters_as_xml(filename, bi_clusters, obj_val, is_optimal, instance = \"\")`: Use this function to save the obtained solution as an XML file.\n - `filename`: The name of the XML file.\n - `bi_clusters`: The bi-clusters returned by `bp.compute_bi_clusters`.\n - `obj_val`: The objective value of the bi-clusters returned by `bp.compute_bi_clusters`. \n - `is_optimal`: A flag returned by `bp.compute_bi_clusters` that indicates whether the computed bi-clusters are guaranteed to be optimal.\n - `instance`: A string that contains information about the problem instance.\n\n### Example\n\n```\nimport numpy as np\nimport biclustpy as bp\n\nalgorithm = bp.Algorithm\nalgorithm.algorith_name = \"ILP\"\nalgorithm.ilp_time_limit = 100\nalgorithm.ilp_tune = True\n\nn = 30\nm = 40\nt = .95\nweights = np.random.rand(n, m) - (t * np.ones((n, m)))\n\nbi_clusters, obj_val, is_optimal = bp.compute_bi_clusters(weights, algorithm)\n\nfilename = \"bi_clusters.xml\"\ninstance = \"random instance with 30 rows and 40 columns\"\nbp.save_bi_clusters_as_xml(filename, bi_clusters, obj_val, is_optimal, instance)\n```\n\n## Command Line Usage\n\nUpon installation, you can run `biclustpy` from the command line. Usage:\n\n```\nbiclustpy [-h]\n (--load input-file | --random num-rows num-cols threshold seed)\n [--save output-file] [--alg {ILP,CH}]\n [--ilp_options time-limit tune]\n```\n\nMore more information, execute `biclustpy -h`.\n\n## License\n\nYou may use and distribute __biclustpy__ under the terms of the [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.html).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/dbblumenthal/biclustpy", "keywords": "bi-cluster editing", "license": "LGPL", "maintainer": "", "maintainer_email": "", "name": "biclustpy", "package_url": "https://pypi.org/project/biclustpy/", "platform": "", "project_url": "https://pypi.org/project/biclustpy/", "project_urls": { "Homepage": "http://github.com/dbblumenthal/biclustpy" }, "release_url": "https://pypi.org/project/biclustpy/0.2/", "requires_dist": [ "numpy", "argparse", "networkx", "progress", "gurobipy" ], "requires_python": "", "summary": "bi-cluster editing library", "version": "0.2" }, "last_serial": 5486370, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "07bf5a9f32bb57219a2506c9ac008417", "sha256": "61214504267aa3d151c0f6b65a95c31a3a9d9db16c3e87e12cf8ef77ff26bf6c" }, "downloads": -1, "filename": "biclustpy-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "07bf5a9f32bb57219a2506c9ac008417", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12371, "upload_time": "2019-07-04T08:08:38", "url": "https://files.pythonhosted.org/packages/08/ba/a51db553f6d6185c1e87a7ecabf5db21a7b004e60443784ef192ec321b71/biclustpy-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b3a277ac119877906adf090e76c52da9", "sha256": "a77d94b4f357044b315072f78c0509d6780c8f7b69640116568102e0ae4897e6" }, "downloads": -1, "filename": "biclustpy-0.1.tar.gz", "has_sig": false, "md5_digest": "b3a277ac119877906adf090e76c52da9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7047, "upload_time": "2019-07-04T08:08:40", "url": "https://files.pythonhosted.org/packages/d7/3b/b51022f5bcd65a010a88cbd8603afb045bca21fd85055655ec7cefaab0a0/biclustpy-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "d1d71f7ad143ad24a84fbbe1f4b2595b", "sha256": "5134babd641443891263cb9bf536b2f6a2ab4a9b53a258f9974e4ee037461013" }, "downloads": -1, "filename": "biclustpy-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d1d71f7ad143ad24a84fbbe1f4b2595b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13910, "upload_time": "2019-07-04T11:58:04", "url": "https://files.pythonhosted.org/packages/80/e9/88ff8832a9642e53970005c680b73b1694153445e032cb21e872160ded58/biclustpy-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2863b54fe2e3cb1016ca05be7fd4f50", "sha256": "ce02bd7550fdd6b3c098c8c7be31cbcbeb3265e5514af154d62b05b0c2e7dfa6" }, "downloads": -1, "filename": "biclustpy-0.2.tar.gz", "has_sig": false, "md5_digest": "d2863b54fe2e3cb1016ca05be7fd4f50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9749, "upload_time": "2019-07-04T11:58:05", "url": "https://files.pythonhosted.org/packages/9f/31/8ea98164e5cbb1aca880333be81f91dda0760a38ad34b6183f38fbd9c3ab/biclustpy-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d1d71f7ad143ad24a84fbbe1f4b2595b", "sha256": "5134babd641443891263cb9bf536b2f6a2ab4a9b53a258f9974e4ee037461013" }, "downloads": -1, "filename": "biclustpy-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d1d71f7ad143ad24a84fbbe1f4b2595b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13910, "upload_time": "2019-07-04T11:58:04", "url": "https://files.pythonhosted.org/packages/80/e9/88ff8832a9642e53970005c680b73b1694153445e032cb21e872160ded58/biclustpy-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2863b54fe2e3cb1016ca05be7fd4f50", "sha256": "ce02bd7550fdd6b3c098c8c7be31cbcbeb3265e5514af154d62b05b0c2e7dfa6" }, "downloads": -1, "filename": "biclustpy-0.2.tar.gz", "has_sig": false, "md5_digest": "d2863b54fe2e3cb1016ca05be7fd4f50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9749, "upload_time": "2019-07-04T11:58:05", "url": "https://files.pythonhosted.org/packages/9f/31/8ea98164e5cbb1aca880333be81f91dda0760a38ad34b6183f38fbd9c3ab/biclustpy-0.2.tar.gz" } ] }