Class: CompletionKit::MetricCalibrationStats::Result

Inherits:
Struct
  • Object
show all
Defined in:
app/services/completion_kit/metric_calibration_stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#agree_countObject

Returns the value of attribute agree_count

Returns:

  • (Object)

    the current value of agree_count



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def agree_count
  @agree_count
end

#agreement_highObject

Returns the value of attribute agreement_high

Returns:

  • (Object)

    the current value of agreement_high



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def agreement_high
  @agreement_high
end

#agreement_lowObject

Returns the value of attribute agreement_low

Returns:

  • (Object)

    the current value of agreement_low



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def agreement_low
  @agreement_low
end

#agreement_pointObject

Returns the value of attribute agreement_point

Returns:

  • (Object)

    the current value of agreement_point



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def agreement_point
  @agreement_point
end

#borderline_countObject

Returns the value of attribute borderline_count

Returns:

  • (Object)

    the current value of borderline_count



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def borderline_count
  @borderline_count
end

#borderline_rateObject

Returns the value of attribute borderline_rate

Returns:

  • (Object)

    the current value of borderline_rate



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def borderline_rate
  @borderline_rate
end

#disagree_countObject

Returns the value of attribute disagree_count

Returns:

  • (Object)

    the current value of disagree_count



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def disagree_count
  @disagree_count
end

#gateObject

Returns the value of attribute gate

Returns:

  • (Object)

    the current value of gate



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def gate
  @gate
end

#kappaObject

Returns the value of attribute kappa

Returns:

  • (Object)

    the current value of kappa



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def kappa
  @kappa
end

#maeObject

Returns the value of attribute mae

Returns:

  • (Object)

    the current value of mae



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def mae
  @mae
end

#pearsonObject

Returns the value of attribute pearson

Returns:

  • (Object)

    the current value of pearson



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def pearson
  @pearson
end

#sample_sizeObject

Returns the value of attribute sample_size

Returns:

  • (Object)

    the current value of sample_size



6
7
8
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 6

def sample_size
  @sample_size
end

Instance Method Details

#counter_only?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 12

def counter_only?
  gate == :counter
end

#firm?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 20

def firm?
  gate == :firm
end

#marginObject



28
29
30
31
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 28

def margin
  return nil if agreement_low.nil? || agreement_high.nil?
  (agreement_high - agreement_low) / 2.0
end

#provisional?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 16

def provisional?
  gate == :provisional
end

#short_to_targetObject



24
25
26
# File 'app/services/completion_kit/metric_calibration_stats.rb', line 24

def short_to_target
  [PROVISIONAL_MIN - sample_size, 0].max
end