Class: Midas::Detector

Inherits:
Object
  • Object
show all
Defined in:
lib/midas/detector.rb

Instance Method Summary collapse

Constructor Details

#initialize(rows: 2, buckets: 769, alpha: 0.5, threshold: nil, relations: true, directed: true, seed: 0) ⇒ Detector

Returns a new instance of Detector.



3
4
5
6
7
8
9
10
11
# File 'lib/midas/detector.rb', line 3

def initialize(rows: 2, buckets: 769, alpha: 0.5, threshold: nil, relations: true, directed: true, seed: 0)
  @rows = rows
  @buckets = buckets
  @alpha = alpha
  @threshold = threshold
  @relations = relations
  @directed = directed
  @seed = seed
end

Instance Method Details

#fit_predict(x) ⇒ Object



13
14
15
# File 'lib/midas/detector.rb', line 13

def fit_predict(x)
  _fit_predict(x, @rows, @buckets, @alpha, @threshold || Float::NAN, @relations, @directed, @seed)
end