cdcstream

CDCStream - Change Detection in Categorical Evolving Data Streams

https://github.com/fzi-forschungszentrum-informatik/cdcstream

Science Score: 31.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 11 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary
Last synced: 11 months ago · JSON representation ·

Repository

CDCStream - Change Detection in Categorical Evolving Data Streams

Basic Info
  • Host: GitHub
  • Owner: fzi-forschungszentrum-informatik
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 135 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 5
Created almost 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

Change Detection in Categorical Evolving Data Streams - CDCStream

Paper available at http://dx.doi.org/10.5445/IR/1000155196, cite as (BibTex): @techreport{TratBenderOvtcharova2023_1000155196, author = {Trat, Martin and Bender, Janek and Ovtcharova, Jivka}, year = {2023}, title = {Sensitivity-Based Optimization of Unsupervised Drift Detection for Categorical Data Streams}, doi = {10.5445/IR/1000155196}, institution = {{Karlsruher Institut für Technologie (KIT)}}, issn = {2194-1629}, series = {KIT Scientific Working Papers}, keywords = {unsupervised concept drift detection, data stream mining, productive artificial intelligence, categorical data processing}, pagetotal = {10}, language = {english}, volume = {208} }

Implementation of an augmented version of Dino Ienco's algorithm CDCStream (https://doi.org/10.1145/2554850.2554864).

Installation

Requirements

  • WEKA v3.8.6 or greater: Installation, GitHub
    • Without this requirement, code execution fails.
  • Java
    • Download and install Java 11 OpenJDK 11, e.g. from RedHat (more recent versions might work as well).
    • Note that I experienced issues using Temurin (via adoptium.net).
    • Make sure that the Java folder (path including /bin at the end) is added to environment variable PATH.
    • Some problems during python package installation can be solved by correctly setting the environment variable JAVA_HOME. Set it to point to the respective java folder (e.g. /usr/lib/jvm/java-11-openjdk-amd64) NOT including /bin or further components at the end.
    • Without this requirement, attempting to install package javabridge might fail.
  • Build tools
    • Ubuntu: Based on the python-weka-wrapper3 documentation, fulfill build requirements. sh sudo apt-get install build-essential python3-dev
    • Windows: Microsoft Visual C++ 14.0 or greater. For this, download Build Tools from Microsoft and install those (installation of Core Features for C++ Build Tools, C++ 2019 Redistributable Update, Windows 10 SDK and MSVC v142 (or greater) should suffice; a subsequent restart might be necessary).
    • Without these requirements, attempting to install package javabridge might fail.
  • Python >=3.7

Setup

  • Use pip (after installing above-stated requirements!): sh python -m pip install cdcstream
  • @poetry users: trouble installing python-javabridge? --> See Development section
  • First usage of the cdcstream package should automatically add all required WEKA packages. If this does not succeed: Manually add package DilcaDistance v1.0.2 or greater to WEKA:
    • Start WEKA GUI
    • Select Tools / Package manager and install the latest version of DilcaDistance (Dependency fastCorrBasedFS should be installed after confirming prompted request.); It might be necessary to click the Toggle load button with DilcaDistance selected in order to get Yes in the Loaded column.

Example

```py import numpy as np import pandas as pd from cdcstream.dilcawrapper import dilcaworkflow from cdcstream import CDCStream, tools

NBATCHES = 50 tools.managejvm_start() # start a Java VM in order to integrate WEKA

instatiate drift detector

def alertcbck(alertcode, alertmsg): if not alertmsg: alertmsg = 'no msg' print(f'{alertmsg} (code {alert_code})')

c = CDCStream( alertcallback=alertcbck, summaryextractor=dilcaworkflow, summaryextractorargs={'nominalcols': 'all'}, factorwarn=2.0, factorchange=3.0, factorstdextrforg=0, cooldown_cycles=0 )

create random data (will be interpreted as being nominal)

batches = [] for i in range(N_BATCHES): batches.append( pd.DataFrame(np.random.randint(1, 10, size=(10,5))) )

employ created data as stream and feed it to drift detector

for b in batches: c.feednewbatch(b)

tools.managejvmstop() # cleanup ```

Development

  • Python poetry
    • strangely, installation of python-javabridge fails with poetry versions > 1.1.15 (at the time of writing, newest poetry version is 1.3.1); this might be related to PEP 621 --> a workaround is to install python-javabridge via pip: sh python -m poetry run pip install python-javabridge # from outside the virtual environment
    • afterwards, continue installation via poetry sh python -m poetry install ## License Code is copyright to the FZI Research Center for Information Technology and released under the GNU General Public License v3.0. All dependencies are copyright to the respective authors and released under the respective licenses. A copy of these licenses is provided in LICENSE_LIBRARIES.

Acknowledgements

BMBF Logo

This software was developed at the FZI Research Center for Information Technology. The associated research was funded by the German Federal Ministry of Education and Research (grant number: 02K18D033) within the context of the project SEAMLESS.

To Do

  • add tests

Owner

  • Name: FZI Forschungszentrum Informatik
  • Login: fzi-forschungszentrum-informatik
  • Kind: organization
  • Email: github@fzi.de
  • Location: Karlsruhe, Germany

FZI Research Center for Information Technology

Citation (CITATION.bib)

@techreport{TratBenderOvtcharova2023_1000155196,
    author       = {Trat, Martin and Bender, Janek and Ovtcharova, Jivka},
    year         = {2023},
    title        = {Sensitivity-Based Optimization of Unsupervised Drift Detection for Categorical Data Streams},
    doi          = {10.5445/IR/1000155196},
    institution  = {{Karlsruher Institut für Technologie (KIT)}},
    issn         = {2194-1629},
    series       = {KIT Scientific Working Papers},
    keywords     = {unsupervised concept drift detection, data stream mining, productive artificial intelligence, categorical data processing},
    pagetotal    = {10},
    language     = {english},
    volume       = {208}
}

GitHub Events

Total
Last Year

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 72
  • Total Committers: 1
  • Avg Commits per committer: 72.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Martin Trat t****t@f****e 72
Committer Domains (Top 20 + Academic)
fzi.de: 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 36 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
pypi.org: cdcstream

Implementation of Ienco's algorithm CDCStream

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 36 Last month
Rankings
Dependent packages count: 6.6%
Downloads: 18.4%
Average: 23.7%
Forks count: 30.5%
Dependent repos count: 30.6%
Stargazers count: 32.3%
Maintainers (1)
Last synced: 11 months ago

Dependencies

poetry.lock pypi
  • numpy 1.21.1
  • packaging 21.3
  • pandas 1.1.5
  • pyparsing 3.0.9
  • python-dateutil 2.8.2
  • python-javabridge 4.0.3
  • python-weka-wrapper3 0.2.11
  • pytz 2022.2.1
  • six 1.16.0
pyproject.toml pypi
  • numpy *
  • packaging *
  • pandas *
  • python >=3.7
  • python-javabridge *
  • python-weka-wrapper3 ^0.2