Statistics.Distribution.Transform

statistics-0.16.3.0: A library of statistical types, data, and functions

Copyright | (c) 2013 John McDonnell;
License | BSD3
Maintainer | bos@serpentine.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Statistics.Distribution.Transform

Description

Transformations over distributions

Synopsis

- data LinearTransform d = LinearTransform {
  - linTransLocation :: !Double
  - linTransScale :: !Double
  - linTransDistr :: d
  }
- linTransFixedPoint :: LinearTransform d -> Double
- scaleAround :: Double -> Double -> d -> LinearTransform d

# Documentation

data LinearTransform d #

Linear transformation applied to distribution.

    LinearTransform μ σ _
    x' = μ + σ·x

Constructors

LinearTransform |
Fields linTransLocation :: !Double Location parameter. linTransScale :: !Double Scale parameter. linTransDistr :: d Distribution being transformed.

#### Instances

Instances details

Functor LinearTransform # |
Instance details Defined in Statistics.Distribution.Transform Methods fmap :: (a -> b) -> LinearTransform a -> LinearTransform b # (<$) :: a -> LinearTransform b -> LinearTransform a #
FromJSON d => FromJSON (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods parseJSON :: Value -> Parser (LinearTransform d) # parseJSONList :: Value -> Parser [LinearTransform d] # omittedField :: Maybe (LinearTransform d) #
ToJSON d => ToJSON (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods toJSON :: LinearTransform d -> Value # toEncoding :: LinearTransform d -> Encoding # toJSONList :: [LinearTransform d] -> Value # toEncodingList :: [LinearTransform d] -> Encoding # omitField :: LinearTransform d -> Bool #
Binary d => Binary (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods put :: LinearTransform d -> Put # get :: Get (LinearTransform d) # putList :: [LinearTransform d] -> Put #
Data d => Data (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods gfoldl :: (forall d0 b. Data d0 => c (d0 -> b) -> d0 -> c b) -> (forall g. g -> c g) -> LinearTransform d -> c (LinearTransform d) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LinearTransform d) # toConstr :: LinearTransform d -> Constr # dataTypeOf :: LinearTransform d -> DataType # dataCast1 :: Typeable t => (forall d0. Data d0 => c (t d0)) -> Maybe (c (LinearTransform d)) # dataCast2 :: Typeable t => (forall d0 e. (Data d0, Data e) => c (t d0 e)) -> Maybe (c (LinearTransform d)) # gmapT :: (forall b. Data b => b -> b) -> LinearTransform d -> LinearTransform d # gmapQl :: (r -> r' -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> LinearTransform d -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d0. Data d0 => d0 -> r') -> LinearTransform d -> r # gmapQ :: (forall d0. Data d0 => d0 -> u) -> LinearTransform d -> [u] # gmapQi :: Int -> (forall d0. Data d0 => d0 -> u) -> LinearTransform d -> u # gmapM :: Monad m => (forall d0. Data d0 => d0 -> m d0) -> LinearTransform d -> m (LinearTransform d) # gmapMp :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> LinearTransform d -> m (LinearTransform d) # gmapMo :: MonadPlus m => (forall d0. Data d0 => d0 -> m d0) -> LinearTransform d -> m (LinearTransform d) #
Generic (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Associated Types
type Rep (LinearTransform d) |
Instance details Defined in Statistics.Distribution.Transform type Rep (LinearTransform d) = D1 ('MetaData "LinearTransform" "Statistics.Distribution.Transform" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "LinearTransform" 'PrefixI 'True) (S1 ('MetaSel ('Just "linTransLocation") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: (S1 ('MetaSel ('Just "linTransScale") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "linTransDistr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d))))
Methods from :: LinearTransform d -> Rep (LinearTransform d) x # to :: Rep (LinearTransform d) x -> LinearTransform d #
Read d => Read (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods readsPrec :: Int -> ReadS (LinearTransform d) # readList :: ReadS [LinearTransform d] # readPrec :: ReadPrec (LinearTransform d) # readListPrec :: ReadPrec [LinearTransform d] #
Show d => Show (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods showsPrec :: Int -> LinearTransform d -> ShowS # show :: LinearTransform d -> String # showList :: [LinearTransform d] -> ShowS #
Eq d => Eq (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods (==) :: LinearTransform d -> LinearTransform d -> Bool # (/=) :: LinearTransform d -> LinearTransform d -> Bool #
ContDistr d => ContDistr (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods density :: LinearTransform d -> Double -> Double # logDensity :: LinearTransform d -> Double -> Double # quantile :: LinearTransform d -> Double -> Double # complQuantile :: LinearTransform d -> Double -> Double #
ContGen d => ContGen (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods genContVar :: StatefulGen g m => LinearTransform d -> g -> m Double #
Distribution d => Distribution (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods cumulative :: LinearTransform d -> Double -> Double # complCumulative :: LinearTransform d -> Double -> Double #
Entropy d => Entropy (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods entropy :: LinearTransform d -> Double #
MaybeEntropy d => MaybeEntropy (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods maybeEntropy :: LinearTransform d -> Maybe Double #
MaybeMean d => MaybeMean (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods maybeMean :: LinearTransform d -> Maybe Double #
MaybeVariance d => MaybeVariance (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods maybeVariance :: LinearTransform d -> Maybe Double # maybeStdDev :: LinearTransform d -> Maybe Double #
Mean d => Mean (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods mean :: LinearTransform d -> Double #
Variance d => Variance (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform Methods variance :: LinearTransform d -> Double # stdDev :: LinearTransform d -> Double #
type Rep (LinearTransform d) # |
Instance details Defined in Statistics.Distribution.Transform type Rep (LinearTransform d) = D1 ('MetaData "LinearTransform" "Statistics.Distribution.Transform" "statistics-0.16.3.0-JhFVwN7Kv9y2XSvDlj54t" 'False) (C1 ('MetaCons "LinearTransform" 'PrefixI 'True) (S1 ('MetaSel ('Just "linTransLocation") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: (S1 ('MetaSel ('Just "linTransScale") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "linTransDistr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 d))))

linTransFixedPoint :: LinearTransform d -> Double #

Get fixed point of linear transformation

scaleAround #

Arguments

:: Double | Fixed point
-> Double | Scale parameter
-> d | Distribution
-> LinearTransform d |

Apply linear transformation to distribution.