Skip to main content

A toolkit for calculating process entropy quickly. With specific applications to tweets.

Project description

ProcessEntropy

A toolkit for calculating process entropy quickly. With specific applications to tweets.

Example Usage

# Load in tweets between 2018/11/16 to 2019/01/01
import pandas as pd
with open("example_data/BBCWorld_Tweets_small.csv", 'r') as f:
    BBC = pd.read_csv(f)

with open("example_data/BuzzFeedNews_Tweets_small.csv", 'r') as f:
    BuzzFeed = pd.read_csv(f)


# Find process entropy of BuzzFeed tweets
from ProcessEntropy.CrossEntropy import tweet_self_entropy

print(tweet_self_entropy(BuzzFeed['tweet']))


# Find cross entropy between BuzzFeed and BBC World
from ProcessEntropy.CrossEntropy import timeseries_cross_entropy

target = list(zip(BuzzFeed['created_at'], BuzzFeed['tweet']))
source = list(zip(BBC['created_at'], BBC['tweet']))

print(timeseries_cross_entropy(target, source))



Requirements

  • Python 3.x with packages:
    • Numba
    • NTLK
    • Numpy

Installation

pip install ProcessEntropy

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

ProcessEntropy-0.9.0.dev0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

ProcessEntropy-0.9.0.dev0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file ProcessEntropy-0.9.0.dev0.tar.gz.

File metadata

  • Download URL: ProcessEntropy-0.9.0.dev0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.8

File hashes

Hashes for ProcessEntropy-0.9.0.dev0.tar.gz
Algorithm Hash digest
SHA256 27e0f51526a43fb4235c104bff561f955b102d836c148ff02df55240c096172a
MD5 8282332e7c914ccaca6e8b99de525f77
BLAKE2b-256 d89f7d94c8cb40592f13c73f421ed726d48d0ba0033a5fd2ab915beb4ef77d98

See more details on using hashes here.

File details

Details for the file ProcessEntropy-0.9.0.dev0-py3-none-any.whl.

File metadata

  • Download URL: ProcessEntropy-0.9.0.dev0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.8

File hashes

Hashes for ProcessEntropy-0.9.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 f91cb87c0d89860cacaba18cd89c65c4298f98ec4f095154774e45bf5a7987eb
MD5 6b224555094d3397e49e5e675e723962
BLAKE2b-256 c662c71ae73e9607d88888830160bafb86f4ea27371df0aebac5a1de28ee69e3

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