v0.1.0 — Now Available

Open-Environmental Massive Online Analysis

A Python library for Utilitarian Online Learning and Streaming Data. Build adaptive machine learning systems that learn continuously from data streams in real-time.

$ pip install openmoa

Why OpenMOA?

Designed for researchers and practitioners working with streaming data and online learning.

Real-time Learning

Process data streams instantly with adaptive algorithms that learn incrementally without storing historical data.

Concept Drift Detection

Automatically detect and adapt to changes in data distribution over time with built-in drift detectors.

Modular Architecture

Combine classifiers, regressors, drift detectors, and evaluators with a clean, extensible API design.

Scikit-learn Compatible

Familiar API patterns that integrate seamlessly with the Python scientific computing ecosystem.

Extensive Algorithms

Hoeffding Trees, Adaptive Random Forest, ADWIN, DDM, and many more state-of-the-art streaming algorithms.

Rich Documentation

Comprehensive tutorials, API references, and real-world examples to get you started quickly.

Quick Start

Run a binary classification benchmark with evolving feature streams.

fesl_demo.py
from openmoa.datasets import Spambase
  from openmoa.classifiers import FESLClassifier
  from openmoa.streams import OpenFeatureStream, ShuffledStream
  from openmoa.evaluation import prequential_evaluation
  
  # Load and shuffle a static dataset
  base_stream = ShuffledStream(Spambase(), random_seed=42)
  
  # Wrap with Trapezoidal Feature Evolution (TDS)
  stream = OpenFeatureStream(
      base_stream,
      evolution_pattern="tds",
      tds_mode="ordered",
      d_min=2,
      random_seed=42
  )
  
  # Initialize the FESL classifier
  classifier = FESLClassifier(
      schema=base_stream.get_schema(),
      alpha=1.0,
      lambda_=0.1,
      window_size=100
  )
  
  # Run prequential evaluation
  results = prequential_evaluation(
      stream=stream,
      learner=classifier,
      max_instances=10000,
      sample_frequency=1000
  )
  
  print(f"Accuracy: {results.accuracy()}")