Skip to content

Repository files navigation

MIDAS Ruby

MIDAS - edge stream anomaly detection - for Ruby

Build Status

Installation

Add this line to your application’s Gemfile:

gem"midas-edge"

Getting Started

Create a detector

midas=Midas::Detector.new

Update with an event

score=midas.update(source_id,destination_id,time)

IDs should be integers and events should be ordered by time (ascending). Higher scores are more anomalous. There is not currently a defined threshold for anomalies.

Parameters

Pass parameters - default values below

Midas::Detector.new(rows: 2,# number of hash functionsbuckets: 769,# number of bucketsalpha: 0.5,# temporal decay factorthreshold: nil,# todorelations: true,# whether to use MIDAS-R or MIDASseed: 0# random seed)

Performance

For large datasets, read data directly from files

midas.batch_update("data.csv")

Resources

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone --recursive https://github.com/ankane/midas-ruby.git
cd midas-ruby
bundle install
bundle exec rake compile
bundle exec rake test

About

Edge stream anomaly detection for Ruby

Resources

Stars

55 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages