ml-inference

Document the online anomaly scoring pipeline for Kafka-based fraud detection services.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/GaneshMadarasu/real-time-anomaly-detection-pipeline --skill ml-inference
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ml-inference
Source: https://github.com/GaneshMadarasu/real-time-anomaly-detection-pipeline/tree/main/.claude/skills/ml-inference
Command: npx skills add https://github.com/GaneshMadarasu/real-time-anomaly-detection-pipeline --skill ml-inference

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill explains how to operate the online anomaly scoring service that classifies streaming transaction events, maintains model state, and keeps inference behavior stable in production.

Core Features & Use Cases

  • Live anomaly scoring: Combines River HalfSpaceTrees with a custom amount-based deviation scorer to detect suspicious events as they arrive.
  • Operational model control: Handles dynamic threshold adjustment, Redis-backed persistence, and hot-swapping of promoted models without restarting the service.
  • Use Cases: Use it when you need to debug Kafka-driven fraud scoring, verify score-before-learn behavior, or keep online learning and deployment logic synchronized across services.

Quick Start

Use this Skill to review the ml-inference service flow, scoring logic, and operational safeguards from the repository context.

Frequently Asked Questions about ml-inference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I score streaming transaction events for fraud detection using Kafka?

To score streaming fraud, you process Kafka transaction events through River HalfSpaceTrees with score-before-learn execution, applying custom amount-based deviation scoring to classify suspicious events as they arrive.

How does online anomaly detection work with River HalfSpaceTrees?

Online anomaly detection with River HalfSpaceTrees works by incrementally scoring streaming transaction events using synchronized StandardAbsoluteDeviation logic and NaN-safe feature vectors, maintaining dynamic thresholds to flag suspicious activity in real time.

Can I hot-swap promoted models during live inference without restarting the service?

Yes, you can hot-swap promoted models during live inference using forward-only hot-swapping logic, allowing the fraud scoring service to update models without restarting, while Redis-backed persistence maintains operational model state.

Why does my online anomaly scoring pipeline require score-before-learn execution?

Score-before-learn execution is required to prevent data leakage and ensure inference stability, scoring each streaming transaction event against the current model state before updating the online learning algorithm with the new event data.

How do I persist model state for online learning using Redis?

You persist online learning model state using Redis-backed persistence to store and retrieve River HalfSpaceTrees parameters and dynamic threshold adjustments, ensuring synchronized scoring behavior across distributed fraud detection services.

What are the limitations of using online anomaly scoring for streaming fraud detection?

Limitations include requiring strict score-before-learn execution, synchronized StandardAbsoluteDeviation logic across services, and careful NaN-safe feature vector construction to avoid drift and maintain stable inference behavior in production.