SMAdiffz


NameSMAdiffz JSON
Version 1.1.1 PyPI version JSON
download
home_page
SummaryPowerful data structures for data analysis, time series for information diffusion analysis
upload_time2023-11-12 04:53:56
maintainer
docs_urlNone
authorH.M.M.Caldera
requires_python
license
keywords python social media
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            The proposed package is designed to facilitate comprehensive work on information diffusion analysis. 
It provides a versatile set of tools and functionalities that empower users to explore, model, and analyze the intricate dynamics 
of information spread within a given system.

Following is a sample scenario.

def measure_information_diffusion(posts, threshold):
    # Sort the set of posts . This should using  timestamps
    posts = sorted(posts, key=lambda x: x.timestamp)

    # Initialize empty set of trees
    trees = set()

    # Iterate over each post in the sorted set
    for i, p_i in enumerate(posts):
        # Initialize a new tree with a single node representing (p_i)
        T_i = {p_i}

        # For each post with a timestamp later than p_i
        for j in range(i + 1, len(posts)):
            p_j = posts[j]

            # Compute the similarity between the tags of p_i and p_j
            similarity = compute_similarity(p_i, p_j)

            # If similarity is above the threshold, add a directed edge from p_i to p_j in T_i
            if similarity > threshold:
                T_i.add(p_j)

            # If p_j has already been added to a diffusion tree in trees, merge T_i with that tree
            for T_j in trees:
                if p_j in T_j:
                    T_j.update(T_i)
                    break
            else:
                # If p_j hasn't been added to any diffusion tree, add T_i to trees
                trees.add(T_i)

    # Return the set of diffusion trees
    return trees





            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "SMAdiffz",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,social media",
    "author": "H.M.M.Caldera",
    "author_email": "<maneeshac2020@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/91/4f/52c6ed51d2c8ea4803950c371b0232c43fe22b53c5b7aabb514d52987f46/SMAdiffz-1.1.1.tar.gz",
    "platform": null,
    "description": "The proposed package is designed to facilitate comprehensive work on information diffusion analysis. \nIt provides a versatile set of tools and functionalities that empower users to explore, model, and analyze the intricate dynamics \nof information spread within a given system.\n\nFollowing is a sample scenario.\n\ndef measure_information_diffusion(posts, threshold):\n    # Sort the set of posts . This should using  timestamps\n    posts = sorted(posts, key=lambda x: x.timestamp)\n\n    # Initialize empty set of trees\n    trees = set()\n\n    # Iterate over each post in the sorted set\n    for i, p_i in enumerate(posts):\n        # Initialize a new tree with a single node representing (p_i)\n        T_i = {p_i}\n\n        # For each post with a timestamp later than p_i\n        for j in range(i + 1, len(posts)):\n            p_j = posts[j]\n\n            # Compute the similarity between the tags of p_i and p_j\n            similarity = compute_similarity(p_i, p_j)\n\n            # If similarity is above the threshold, add a directed edge from p_i to p_j in T_i\n            if similarity > threshold:\n                T_i.add(p_j)\n\n            # If p_j has already been added to a diffusion tree in trees, merge T_i with that tree\n            for T_j in trees:\n                if p_j in T_j:\n                    T_j.update(T_i)\n                    break\n            else:\n                # If p_j hasn't been added to any diffusion tree, add T_i to trees\n                trees.add(T_i)\n\n    # Return the set of diffusion trees\n    return trees\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Powerful data structures for data analysis, time series for information diffusion analysis",
    "version": "1.1.1",
    "project_urls": null,
    "split_keywords": [
        "python",
        "social media"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "020412672053f7b6347bc70d133173eb484f1698cbdcac5f7ca9146f2388ef3b",
                "md5": "41ffc9a126cf35247687945862bf66a2",
                "sha256": "ac54d07510eb0d671ddb91d0c7f35d58f4cddb9ae28e1c19d9083402926f4be6"
            },
            "downloads": -1,
            "filename": "SMAdiffz-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "41ffc9a126cf35247687945862bf66a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3088,
            "upload_time": "2023-11-12T04:53:54",
            "upload_time_iso_8601": "2023-11-12T04:53:54.422546Z",
            "url": "https://files.pythonhosted.org/packages/02/04/12672053f7b6347bc70d133173eb484f1698cbdcac5f7ca9146f2388ef3b/SMAdiffz-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "914f52c6ed51d2c8ea4803950c371b0232c43fe22b53c5b7aabb514d52987f46",
                "md5": "4ed7e5e54b1d542bd58ad3d407feeb8d",
                "sha256": "39309bb930c9424991059001ef60a89ab0e6a364dcbbbd6f711a4177cecb3c64"
            },
            "downloads": -1,
            "filename": "SMAdiffz-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4ed7e5e54b1d542bd58ad3d407feeb8d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2890,
            "upload_time": "2023-11-12T04:53:56",
            "upload_time_iso_8601": "2023-11-12T04:53:56.098562Z",
            "url": "https://files.pythonhosted.org/packages/91/4f/52c6ed51d2c8ea4803950c371b0232c43fe22b53c5b7aabb514d52987f46/SMAdiffz-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-12 04:53:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "smadiffz"
}
        
Elapsed time: 0.18121s