-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Normalize data using a variety of methods. -- -- Normalize data using a variety of methods. For use with csv files. @package normalize @version 0.3.1.0 module Types newtype EntitySep EntitySep :: Text -> EntitySep [unEntitySep] :: EntitySep -> Text newtype EntityName EntityName :: Text -> EntityName [unEntityName] :: EntityName -> Text newtype NumSamples NumSamples :: Int -> NumSamples [unNumSamples] :: NumSamples -> Int newtype ValueThreshold ValueThreshold :: Double -> ValueThreshold [unValueThreshold] :: ValueThreshold -> Double newtype StdDevThreshold StdDevThreshold :: Double -> StdDevThreshold [unStdDevThreshold] :: StdDevThreshold -> Double newtype Base Base :: Double -> Base [unBase] :: Base -> Double newtype Field Field :: Text -> Field [unField] :: Field -> Text newtype Label Label :: Text -> Label [unLabel] :: Label -> Text newtype Sample Sample :: Text -> Sample [unSample] :: Sample -> Text newtype Divisor Divisor :: Bool -> Divisor [unDivisor] :: Divisor -> Bool newtype SynonymFlag SynonymFlag :: Bool -> SynonymFlag [unSynonymFlag] :: SynonymFlag -> Bool newtype NormSampleString NormSampleString :: Text -> NormSampleString [unNormSampleString] :: NormSampleString -> Text data Method StandardScore :: Method UpperQuartile :: Method QuantileMedian :: Method QuantileAverage :: Method None :: Method data Entity Entity :: !Text -> !Text -> !Text -> !Int -> !Double -> Entity [_label] :: Entity -> !Text [_sample] :: Entity -> !Text [_entity] :: Entity -> !Text [_numSamples] :: Entity -> !Int [_value] :: Entity -> !Double value :: Lens' Entity Double sample :: Lens' Entity Text numSamples :: Lens' Entity Int label :: Lens' Entity Text entity :: Lens' Entity Text instance Data.Csv.Conversion.FromNamedRecord Types.Entity instance Data.Csv.Conversion.ToNamedRecord Types.Entity instance Data.Csv.Conversion.DefaultOrdered Types.Entity instance GHC.Generics.Generic Types.Entity instance GHC.Show.Show Types.Entity instance GHC.Classes.Ord Types.Entity instance GHC.Classes.Eq Types.Entity instance GHC.Show.Show Types.Method instance GHC.Read.Read Types.Method instance GHC.Classes.Eq Types.Method instance GHC.Show.Show Types.NormSampleString instance GHC.Classes.Ord Types.NormSampleString instance GHC.Classes.Eq Types.NormSampleString instance GHC.Show.Show Types.SynonymFlag instance GHC.Classes.Ord Types.SynonymFlag instance GHC.Classes.Eq Types.SynonymFlag instance GHC.Show.Show Types.Divisor instance GHC.Classes.Ord Types.Divisor instance GHC.Classes.Eq Types.Divisor instance GHC.Show.Show Types.Sample instance GHC.Classes.Ord Types.Sample instance GHC.Classes.Eq Types.Sample instance GHC.Classes.Ord Types.Label instance GHC.Classes.Eq Types.Label instance GHC.Generics.Generic Types.Field instance GHC.Show.Show Types.Field instance GHC.Classes.Ord Types.EntityName instance GHC.Classes.Eq Types.EntityName module Load -- | Convert CSV entries into entities. csvRowToEntity :: Maybe Field -> Field -> Field -> Field -> Map Text Text -> Entity -- | Convert entities to a sample map, where each sample contains a -- collection of entities. toSampleMap :: Vector Entity -> Map Sample (Vector Entity) module Filter -- | Filter out entities that appear less than the specified amount and -- record their weight. filterEntitiesBy :: Maybe ValueThreshold -> Maybe StdDevThreshold -> NumSamples -> Map Sample (Vector Entity) -> Map Sample (Vector Entity) module Utility -- | Sort a sparse vector, ignoring zeros. sortSparseVector :: SpVector Double -> SpVector Double -- | Get the rank transformed vector of a sparse vector, ignoring zeros. rankSparseVector :: SpVector Double -> SpVector Int -- | Find the median of a sparse vector, ignoring zeros. medianSparseVector :: SpVector Double -> Double -- | Find the average of a sparse vector, ignoring zeros. avgSparseVector :: SpVector Double -> Double module Normalize -- | Log transform the normalize map. logTransform :: Base -> Map Sample (Vector Entity) -> Map Sample (Vector Entity) -- | Normalize all samples by a specific method. normalize :: Method -> Map Sample (Vector Entity) -> Map Sample (Vector Entity) -- | Normalize a sample (1) by another sample (2) by division. The -- NormSampleString contains the string that differentiates (1) from (2). -- NormSampleString must be within (2) and must make, upon its removal -- from (2), (1). For instance, if we want to normalize "normalizeMe" by -- "normalizeMeByThis", we would set this string to be ByThis so -- the normalized values from "normalizeMe" are divided by the normalized -- values from "normalizeMeByThis". This string must make the latter -- become the former, so By would not work as it would become -- "normalizeMeThis". normalizeBySample :: SynonymFlag -> Maybe EntitySep -> NormSampleString -> Map Sample (Vector Entity) -> Map Sample (Vector Entity)