statistics-0.13.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 | Haskell98

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 Source #

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

Functor LinearTransform Source # |
Methods fmap :: (a -> b) -> LinearTransform a -> LinearTransform b # (<$) :: a -> LinearTransform b -> LinearTransform a #
Eq d => Eq (LinearTransform d) Source # |
Methods (==) :: LinearTransform d -> LinearTransform d -> Bool # (/=) :: LinearTransform d -> LinearTransform d -> Bool #
Data d => Data (LinearTransform d) Source # |

Methods

gfoldl :: (forall a b. Data a => c (a -> b) -> a -> 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 a. Data a => c (t a)) -> Maybe (c (LinearTransform d)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall a e. (Data a, Data e) => c (t a e)) -> Maybe (c (LinearTransform d)) #

gmapT :: (forall b. Data b => b -> b) -> LinearTransform d -> LinearTransform d #

gmapQl :: (r -> r' -> r) -> r -> (forall a. Data a => a -> r') -> LinearTransform d -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall a. Data a => a -> r') -> LinearTransform d -> r #

gmapQ :: (forall a. Data a => a -> u) -> LinearTransform d -> [u] #

gmapQi :: Int -> (forall a. Data a => a -> u) -> LinearTransform d -> u #

gmapM :: Monad m => (forall a. Data a => a -> m a) -> LinearTransform d -> m (LinearTransform d) #

gmapMp :: MonadPlus m => (forall a. Data a => a -> m a) -> LinearTransform d -> m (LinearTransform d) #

gmapMo :: MonadPlus m => (forall a. Data a => a -> m a) -> LinearTransform d -> m (LinearTransform d) #

Read d => Read (LinearTransform d) Source # |
Methods readsPrec :: Int -> ReadS (LinearTransform d) # readList :: ReadS [LinearTransform d] # readPrec :: ReadPrec (LinearTransform d) # readListPrec :: ReadPrec [LinearTransform d] #
Show d => Show (LinearTransform d) Source # |
Methods showsPrec :: Int -> LinearTransform d -> ShowS # show :: LinearTransform d -> String # showList :: [LinearTransform d] -> ShowS #
Generic (LinearTransform d) Source # |
Associated Types type Rep (LinearTransform d) :: * -> * # Methods from :: LinearTransform d -> Rep (LinearTransform d) x # to :: Rep (LinearTransform d) x -> LinearTransform d #
ToJSON d => ToJSON (LinearTransform d) Source # |
Methods toJSON :: LinearTransform d -> Value # toEncoding :: LinearTransform d -> Encoding # toJSONList :: [LinearTransform d] -> Value # toEncodingList :: [LinearTransform d] -> Encoding #
FromJSON d => FromJSON (LinearTransform d) Source # |
Methods parseJSON :: Value -> Parser (LinearTransform d) # parseJSONList :: Value -> Parser [LinearTransform d] #
Binary d => Binary (LinearTransform d) Source # |
Methods put :: LinearTransform d -> Put # get :: Get (LinearTransform d) # putList :: [LinearTransform d] -> Put #
ContGen d => ContGen (LinearTransform d) Source # |
Methods genContVar :: PrimMonad m => LinearTransform d -> Gen (PrimState m) -> m Double Source #
(Entropy d, DiscreteDistr d) => Entropy (LinearTransform d) Source # |
Methods entropy :: LinearTransform d -> Double Source #
(MaybeEntropy d, DiscreteDistr d) => MaybeEntropy (LinearTransform d) Source # |
Methods maybeEntropy :: LinearTransform d -> Maybe Double Source #
Variance d => Variance (LinearTransform d) Source # |
Methods variance :: LinearTransform d -> Double Source # stdDev :: LinearTransform d -> Double Source #
MaybeVariance d => MaybeVariance (LinearTransform d) Source # |
Methods maybeVariance :: LinearTransform d -> Maybe Double Source # maybeStdDev :: LinearTransform d -> Maybe Double Source #
Mean d => Mean (LinearTransform d) Source # |
Methods mean :: LinearTransform d -> Double Source #
MaybeMean d => MaybeMean (LinearTransform d) Source # |
Methods maybeMean :: LinearTransform d -> Maybe Double Source #
ContDistr d => ContDistr (LinearTransform d) Source # |
Methods density :: LinearTransform d -> Double -> Double Source # quantile :: LinearTransform d -> Double -> Double Source # logDensity :: LinearTransform d -> Double -> Double Source #
Distribution d => Distribution (LinearTransform d) Source # |
Methods cumulative :: LinearTransform d -> Double -> Double Source # complCumulative :: LinearTransform d -> Double -> Double Source #
type Rep (LinearTransform d) Source # |

type Rep (LinearTransform d) = D1 (MetaData "LinearTransform" "Statistics.Distribution.Transform" "statistics-0.13.3.0-Fvkducafmyw9ljEnBhS6Nm" False) (C1 (MetaCons "LinearTransform" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "linTransLocation") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Double)) ((:*:) (S1 (MetaSel (Just Symbol "linTransScale") SourceUnpack SourceStrict DecidedUnpack) (Rec0 Double)) (S1 (MetaSel (Just Symbol "linTransDistr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 d)))))

linTransFixedPoint :: LinearTransform d -> Double Source #

Get fixed point of linear transformation

scaleAround Source #

Arguments

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

Apply linear transformation to distribution.