@finite-logic/quantum-rate
v1.0.0
Published
FINITE LOGIC: QuantumRate - Basic Time Series Anomaly Detection Model (Free Tier) Focus: API Security & Anomaly Detection
Maintainers
Readme
finite-logic-quantum-rate
Focus: API Security & Anomaly Detection
FINITE LOGIC: QuantumRate - Basic Time Series Anomaly Detection Model (Free Tier)
QuantumRate provides the core mathematical models and algorithms for detecting anomalies and outliers within sequential time-series data (e.g., transaction rates, login attempts, server telemetry). It is a lightweight, self-contained utility for basic, local anomaly detection.
This package is the analytical foundation for the FINITE LOGIC Professional Tier's Global Threat Feed, which integrates external, contextual security data for enhanced, real-time threat scoring.
🚀 Installation (Free Tier)
This package is designed for Node.js environments.
npm install @finite-logic/quantum-rate
💡 Quick Start Example: Detecting Outliers
This example demonstrates how to feed time-series data into the AnomalyDetector to identify points that fall outside the learned baseline.
// Import the core detector class const AnomalyDetector = require('@finite-logic/quantum-rate');
// 1. Initialize the detector // Sensitivity (0.01 to 0.5) controls how easily outliers are flagged. const detector = new AnomalyDetector(sensitivity = 0.15);
// 2. Define historical time-series data (e.g., daily transaction volume) const historicalData = [100, 105, 98, 110, 103, 99, 108, 104, 101, 106];
// 3. Train the detector on the baseline data detector.train(historicalData); console.log("Detector trained on baseline data.");
// 4. Test new, real-time data points const liveData = [102, 105, 250, 100, 12, 112];
console.log("\n--- QuantumRate: Anomaly Detection Results ---");
liveData.forEach((value, index) => {
const isAnomaly = detector.analyze(value);
if (isAnomaly) {
console.log(❌ ANOMALY detected at index ${index}: Value ${value});
} else {
console.log(✅ Normal: Value ${value});
}
});
📚 API Reference
AnomalyDetector Class
new AnomalyDetector(sensitivity = 0.2)
Creates a new detector instance.
sensitivity (number): A float (0.01 to 0.5) determining the threshold for deviation. Lower numbers are more sensitive.
train(data)
Establishes the statistical baseline using an array of historical data points.
data (Array): The array of time-series values used to calculate the mean and standard deviation.
analyze(value)
Analyzes a single new data point against the trained baseline.
value (number): The new data point to check.
Returns: boolean - true if the value is an anomaly, false otherwise.
🔒 Upgrade to Professional Tier
While this package provides the core detection algorithm, the FINITE LOGIC Professional Tier offers advanced capabilities by integrating contextual data.
Upgrade for the Global Threat Feed API — a managed service that enriches your anomaly scores with external data (IP reputation, zero-day threat intelligence) for highly accurate and contextualized fraud and security detection.
[Link to your FINITE LOGIC Pricing Page Here]
