Sha256: d862599a2d506b2005568801f15c4c100f44146cd00106c3f4d77235d5a70134
Contents?: true
Size: 627 Bytes
Versions: 1
Compression:
Stored size: 627 Bytes
Contents
#!/usr/bin/env rake require "bundler/gem_tasks" require "rspec/core/rake_task" RSpec::Core::RakeTask.new("spec") require "benchmark" require "anomaly" task :benchmark do examples = 1_000_000.times.map{ [rand, rand, rand, 0] } Benchmark.bm do |x| x.report { Anomaly::Detector.new(examples, {:eps => 0.5}) } require "narray" x.report { Anomaly::Detector.new(examples, {:eps => 0.5}) } end end task :random_examples do examples = 10_000.times.map{ [rand, rand(10), rand(100), 0] } + 100.times.map{ [rand + 1, rand(10) + 2, rand(100) + 20, 1] } ad = Anomaly::Detector.new(examples) puts ad.eps end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
anomaly-0.1.0 | Rakefile |