Skip to content

Commit

Permalink
Added note about narray
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Kane committed Dec 11, 2011
1 parent 002e90f commit 1eeaf28
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ And then execute:
bundle install
```

For max performance (about 3x faster), also install the NArray gem:

```
gem "narray"
```

Anomaly will automatically detect it and use it.

## How to Use

Train the detector with **only non-anomalies**. Each row is a sample.
Expand Down Expand Up @@ -60,12 +68,12 @@ You can easily persist the detector to a file or database - it's very tiny.
serialized_ad = Marshal.dump(ad)

# Save to a file
File.open("anomaly_detector.txt", "w") {|f| f.write(serialized_ad) }
File.open("anomaly_detector.dump", "w") {|f| f.write(serialized_ad) }

# ...

# Read it later
ad2 = Marshal.load(File.open("anomaly_detector.txt", "r").read)
ad2 = Marshal.load(File.open("anomaly_detector.dump", "r").read)
```

## Contributing
Expand Down

0 comments on commit 1eeaf28

Please sign in to comment.