Skip to main content

movingclusterlib

This library implements a tool to analyze cluster evolution during the time for a given Pandas dataframe.

Installation

pip install movingclusterlib

Usage example

import numpy as np
from movingclusterlib import GraphAnalizer, gates, plot_clusters

df = ...

# Cluster analysis
ga = GraphAnalizer(
    edge_func=gates.And(
        gates.TimeWindow(40000),
        gates.Equal("a"),
    ).full_code(),
    features={
        'ts': np.uint32,
        'a': np.int32,
    },
)
df['cluster_id'], df['cluster_size'] = ga.process(df)

# Plot 10 biggest clusters on a diagram
plot_clusters(df['ts'], df['cluster_id'], df['cluster_size'], size=10)

Download files

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

Source Distribution

movingclusterlib-0.1.2.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file movingclusterlib-0.1.2.tar.gz.

File metadata

  • Download URL: movingclusterlib-0.1.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for movingclusterlib-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a2f8ec2c7d85d82ec5d12773a15fec09fdafcc245f5ae1dfd92eb759a151594d
MD5 74d4ac6e9bfed0322af456a6ba30eb09
BLAKE2b-256 0899b93ff0d64418668a70baea55d9c8d2cf27321d8649f94bcb3a1dbd30c6be

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 file

0.1.1

1 file

0.1.0

1 file

Supported by

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