chore(growth): move nil logic to scorer behaviour
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
Handle `nil` measurement in `Growth.Score.Scorer`.
This commit is contained in:
@@ -34,7 +34,7 @@ defmodule Growth.Calc.ZScore do
|
||||
"""
|
||||
@type s :: number()
|
||||
|
||||
@spec compute(number(), l(), m(), s()) :: Growth.measure()
|
||||
@spec compute(number(), l(), m(), s()) :: number()
|
||||
@doc """
|
||||
Compute the adjusted z-score for a given measurement (`y`) and the Box-Cox values: power (`l`), median (`m`), and
|
||||
coefficient of variation (`s`).
|
||||
@@ -49,11 +49,6 @@ defmodule Growth.Calc.ZScore do
|
||||
1.4698319520484722
|
||||
|
||||
"""
|
||||
|
||||
def compute(nil, _, _, _) do
|
||||
nil
|
||||
end
|
||||
|
||||
def compute(y, l, m, s) do
|
||||
y
|
||||
|> raw(l, m, s)
|
||||
|
Reference in New Issue
Block a user