Skip to main content

Powerful data structures for data analysis, time series for information diffusion analysis

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SMAdiffz-1.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SMAdiffz-1.1.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file SMAdiffz-1.1.1.tar.gz.

File metadata

  • Download URL: SMAdiffz-1.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for SMAdiffz-1.1.1.tar.gz
Algorithm Hash digest
SHA256 39309bb930c9424991059001ef60a89ab0e6a364dcbbbd6f711a4177cecb3c64
MD5 4ed7e5e54b1d542bd58ad3d407feeb8d
BLAKE2b-256 914f52c6ed51d2c8ea4803950c371b0232c43fe22b53c5b7aabb514d52987f46

See more details on using hashes here.

File details

Details for the file SMAdiffz-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: SMAdiffz-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for SMAdiffz-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac54d07510eb0d671ddb91d0c7f35d58f4cddb9ae28e1c19d9083402926f4be6
MD5 41ffc9a126cf35247687945862bf66a2
BLAKE2b-256 020412672053f7b6347bc70d133173eb484f1698cbdcac5f7ca9146f2388ef3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page