forgot file.
This commit is contained in:
parent
cc6fac6533
commit
eeacfad4f6
20
src/Evaluation.hs
Normal file
20
src/Evaluation.hs
Normal file
@ -0,0 +1,20 @@
|
||||
module Evaluation ( varianceOfProducedCompounds
|
||||
, meanOfDistinctCompounds
|
||||
) where
|
||||
|
||||
import Control.Foldl as F
|
||||
import Numeric.LinearAlgebra as LA
|
||||
|
||||
import Environment
|
||||
|
||||
eps :: Amount
|
||||
eps = 0.01
|
||||
|
||||
varianceOfProducedCompounds :: [LA.Vector Amount] -> Double
|
||||
varianceOfProducedCompounds comps = F.fold F.variance $ sumElements <$> comps
|
||||
|
||||
-- | count compound as active if it is over eps.
|
||||
meanOfDistinctCompounds :: [LA.Vector Amount] -> Double
|
||||
meanOfDistinctCompounds comps = F.fold F.mean $ sumElements . LA.cmap (\x -> if abs x < eps then 0 else 1) <$> comps
|
||||
|
||||
-- TODO: Mean enzyme-activity?
|
Loading…
Reference in New Issue
Block a user