Skip to main content

DPMMSubClustersStreaming

This package is a Python wrapper for the DPMMSubClustersStreaming.jl Julia package.
(for our paper Sampling in Dirichlet Process Mixture Models for Clustering Streaming Data, AISTATS 2022.).


Streaming DPGMM

Installation

  1. Install Julia from: https://julialang.org/downloads/platform
  2. Add our DPMMSubClusterStreaming package from within a Julia terminal via Julia package manager:
] add DPMMSubClustersStreaming
  1. Add our dpmmpythonStreaming package in python: pip install dpmmpythonStreaming
  2. Add Environment Variables:

    On Linux:

    1. Add to the "PATH" environment variable the path to the Julia executable (e.g., in .bashrc add: export PATH =$PATH:$HOME/julia/julia-1.6.0/bin).

    On Windows:

    1. Add to the "PATH" environment variable the path to the Julia executable (e.g., C:\Users<USER>\AppData\Local\Programs\Julia\Julia-1.6.0\bin).
  3. Install PyJulia from within a Python terminal:
	import julia;julia.install();

Usage Example:

from julia.api import Julia
jl = Julia(compiled_modules=False)
from dpmmpythonStreaming.dpmmwrapper import DPMMPython
from dpmmpythonStreaming.priors import niw
import numpy as np
data,gt = DPMMPython.generate_gaussian_data(10000, 2, 10, 100.0)
batch1 = data[:,0:5000]
batch2 = data[:,5000:]
prior = DPMMPython.create_prior(2, 0, 1, 1, 1)
model= DPMMPython.fit_init(batch1,100.0,prior = prior,verbose = True, burnout = 5, gt = None, epsilon = 0.0000001)
labels = DPMMPython.get_labels(model)
model = DPMMPython.fit_partial(model,1, 2, batch2)
labels = DPMMPython.get_labels(model)
print(labels)

Misc

For any questions: dinari@post.bgu.ac.il

Contributions, feature requests, suggestion etc.. are welcomed.

If you use this code for your work, please cite the following:

@inproceedings{dinari2022streaming,
  title={Sampling in Dirichlet Process Mixture Models for Clustering Streaming Data},
  author={Dinari, Or and  Freifeld, Oren},
  booktitle={International Conference on Artificial Intelligence and Statistics},
  year={2022}
}

Metadata

Release files for dpmmpythonStreaming 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for dpmmpythonStreaming 0.1.1
File Interpreter ABI Platform Actions
dpmmpythonStreaming-0.1.1-py3-none-any.whl Python 3 none any Details for dpmmpythonStreaming-0.1.1-py3-none-any.whl

Release files / dpmmpythonStreaming-0.1.1-py3-none-any.whl

Download URL dpmmpythonStreaming-0.1.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71d3e10936bc04bdcbec337156d8eef69c5169b446a010f625151e711fb8a2b3
BLAKE2b-256 checksum
How to use checksums
f304428134905dedeefd1f2282c3952ffede3dffe0171eea7466f2a5cad7dae3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for dpmmpythonStreaming 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page