File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ before_install :
2+ - gem update bundler
13rvm :
24 - 1.9.3
35 - 2.0.0
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ def next(x)
6969
7070 p = prob ( xt , @sigma , x )
7171 s = score ( p )
72- log . debug "change_finder:#{ Thread . current . object_id } x:#{ x } xt:#{ xt } p:#{ p } s:#{ s } term:#{ @term } r:#{ @r } data:#{ @data } mu:#{ @mu } sigma:#{ @sigma } c:#{ @c } "
72+ @ log. debug "change_finder:#{ Thread . current . object_id } x:#{ x } xt:#{ xt } p:#{ p } s:#{ s } term:#{ @term } r:#{ @r } data:#{ @data } mu:#{ @mu } sigma:#{ @sigma } c:#{ @c } "
7373 s
7474 end
7575
Original file line number Diff line number Diff line change @@ -324,7 +324,18 @@ def load_from_file
324324 @outliers = stored [ :outliers ]
325325 @outlier_bufs = stored [ :outlier_bufs ]
326326 @scores = stored [ :scores ]
327- @outliers . each { |outlier | outlier . log = log } # @log is not dumped, so have to set at here
327+
328+ # @log is not dumped, so have to set to @outliers and @scores at here
329+ log_proc = Proc . new do |stored_value |
330+ if @targets
331+ @targets . each { |target | stored_value [ target ] . log = log }
332+ elsif @target
333+ stored_value [ @target ] . log = log
334+ end
335+ end
336+ @outliers . each_value { |outlier | log_proc . call ( outlier ) }
337+ @scores . each_value { |score | log_proc . call ( score ) }
338+
328339 else
329340 log . warn "anomalydetect: configuration param was changed. ignore stored data"
330341 end
You can’t perform that action at this time.
0 commit comments