graphpca


Namegraphpca JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/brandones/graphpca
SummaryProduces a low-dimensional representation of the input graph
upload_time2024-05-29 03:35:55
maintainerNone
docs_urlNone
authorBrandon Istenes
requires_pythonNone
licenseApache License 2.0
keywords graph draw pca data reduction dimension compression
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            GraphPCA
========

Produces a low-dimensional representation of the input graph.

Calculates the ECTD [1]_ of the graph and reduces its dimension using PCA. The
result is an embedding of the graph nodes as vectors in a low-dimensional
space.

Graph data in this repository is courtesy of
`University of Florida Sparse Matrix Collection <https://www.cise.ufl.edu/research/sparse/matrices/>`_.

Python 3.x and 2.6+.

See the API docs: https://brandones.github.io/graphpca/

Usage
-----

Draw a graph, including edges, from a mat file
::

    >>> import scipy.io
    >>> import networkx as nx
    >>> import graphpca
    >>> mat = scipy.io.loadmat('test/bcspwr01.mat')
    >>> A = mat['Problem'][0][0][1].todense()  # that's just how the file came
    >>> G = nx.from_numpy_array(A)
    >>> graphpca.draw_graph(G)

.. image:: output/bcspwr01-drawing.png

Get a 2D PCA of a high-dimensional graph and plot it.
::

    >>> import networkx as nx
    >>> import graphpca
    >>> g = nx.erdos_renyi_graph(1000, 0.2)
    >>> g_2 = graphpca.reduce_graph(g, 2)
    >>> graphca.plot_2d(g_2)

.. image:: output/erg-1000.png


Contributing
------------

Issues and Pull requests are very welcome! [On GitHub](https://github.com/brandones/graphpca).

.. [1] https://www.info.ucl.ac.be/~pdupont/pdupont/pdf/ecml04.pdf


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/brandones/graphpca",
    "name": "graphpca",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "graph, draw, pca, data, reduction, dimension, compression",
    "author": "Brandon Istenes",
    "author_email": "brandonesbox@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3d/8f/682e1594aff9f7138bead7f5c310e5690251c137b32b1c12c28ca1fd33c3/graphpca-1.1.1.tar.gz",
    "platform": null,
    "description": "GraphPCA\n========\n\nProduces a low-dimensional representation of the input graph.\n\nCalculates the ECTD [1]_ of the graph and reduces its dimension using PCA. The\nresult is an embedding of the graph nodes as vectors in a low-dimensional\nspace.\n\nGraph data in this repository is courtesy of\n`University of Florida Sparse Matrix Collection <https://www.cise.ufl.edu/research/sparse/matrices/>`_.\n\nPython 3.x and 2.6+.\n\nSee the API docs: https://brandones.github.io/graphpca/\n\nUsage\n-----\n\nDraw a graph, including edges, from a mat file\n::\n\n    >>> import scipy.io\n    >>> import networkx as nx\n    >>> import graphpca\n    >>> mat = scipy.io.loadmat('test/bcspwr01.mat')\n    >>> A = mat['Problem'][0][0][1].todense()  # that's just how the file came\n    >>> G = nx.from_numpy_array(A)\n    >>> graphpca.draw_graph(G)\n\n.. image:: output/bcspwr01-drawing.png\n\nGet a 2D PCA of a high-dimensional graph and plot it.\n::\n\n    >>> import networkx as nx\n    >>> import graphpca\n    >>> g = nx.erdos_renyi_graph(1000, 0.2)\n    >>> g_2 = graphpca.reduce_graph(g, 2)\n    >>> graphca.plot_2d(g_2)\n\n.. image:: output/erg-1000.png\n\n\nContributing\n------------\n\nIssues and Pull requests are very welcome! [On GitHub](https://github.com/brandones/graphpca).\n\n.. [1] https://www.info.ucl.ac.be/~pdupont/pdupont/pdf/ecml04.pdf\n\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Produces a low-dimensional representation of the input graph",
    "version": "1.1.1",
    "project_urls": {
        "Download": "https://github.com/brandones/graphpca/tarball/0.5",
        "Homepage": "https://github.com/brandones/graphpca"
    },
    "split_keywords": [
        "graph",
        " draw",
        " pca",
        " data",
        " reduction",
        " dimension",
        " compression"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d8f682e1594aff9f7138bead7f5c310e5690251c137b32b1c12c28ca1fd33c3",
                "md5": "96de145a3f839681b06a557fad97edcb",
                "sha256": "f52eea9590e8575050af3368bf62a4506de513280fa5d65e6db37eaab549237e"
            },
            "downloads": -1,
            "filename": "graphpca-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "96de145a3f839681b06a557fad97edcb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6997,
            "upload_time": "2024-05-29T03:35:55",
            "upload_time_iso_8601": "2024-05-29T03:35:55.074886Z",
            "url": "https://files.pythonhosted.org/packages/3d/8f/682e1594aff9f7138bead7f5c310e5690251c137b32b1c12c28ca1fd33c3/graphpca-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-29 03:35:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "brandones",
    "github_project": "graphpca",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "graphpca"
}
        
Elapsed time: 0.41076s