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

Copyright | (c) 2015 Mihai Maruseac
License | BSD3
Maintainer | mihai.maruseac@maruseac.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell98

Statistics.Distribution.Laplace

Contents

- Constructors
- Accessors

Description

The Laplace distribution. This is the continuous probability defined as the difference of two iid exponential random variables or a Brownian motion evaluated as exponentially distributed times. It is used in differential privacy (Laplace Method), speech recognition and least absolute deviations method (Laplace's first law of errors, giving a robust regression method)

Synopsis

- data LaplaceDistribution
- laplace :: Double -> Double -> LaplaceDistribution
- laplaceE :: Double -> Double -> Maybe LaplaceDistribution
- ldLocation :: LaplaceDistribution -> Double
- ldScale :: LaplaceDistribution -> Double

# Documentation

data LaplaceDistribution Source #

Instances

Eq LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods (==) :: LaplaceDistribution -> LaplaceDistribution -> Bool Source # (/=) :: LaplaceDistribution -> LaplaceDistribution -> Bool Source #
Data LaplaceDistribution Source # |

Instance details

Defined in Statistics.Distribution.Laplace

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LaplaceDistribution -> c LaplaceDistribution Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LaplaceDistribution Source #

toConstr :: LaplaceDistribution -> Constr Source #

dataTypeOf :: LaplaceDistribution -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LaplaceDistribution) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LaplaceDistribution) Source #

gmapT :: (forall b. Data b => b -> b) -> LaplaceDistribution -> LaplaceDistribution Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LaplaceDistribution -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LaplaceDistribution -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> LaplaceDistribution -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LaplaceDistribution -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LaplaceDistribution -> m LaplaceDistribution Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LaplaceDistribution -> m LaplaceDistribution Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LaplaceDistribution -> m LaplaceDistribution Source #

Read LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods readsPrec :: Int -> ReadS LaplaceDistribution Source # readList :: ReadS [LaplaceDistribution] Source # readPrec :: ReadPrec LaplaceDistribution Source # readListPrec :: ReadPrec [LaplaceDistribution] Source #
Show LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods showsPrec :: Int -> LaplaceDistribution -> ShowS Source # show :: LaplaceDistribution -> String Source # showList :: [LaplaceDistribution] -> ShowS Source #
Generic LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Associated Types type Rep LaplaceDistribution :: Type -> Type Source # Methods from :: LaplaceDistribution -> Rep LaplaceDistribution x Source # to :: Rep LaplaceDistribution x -> LaplaceDistribution Source #
ToJSON LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods toJSON :: LaplaceDistribution -> Value Source # toEncoding :: LaplaceDistribution -> Encoding Source # toJSONList :: [LaplaceDistribution] -> Value Source # toEncodingList :: [LaplaceDistribution] -> Encoding Source #
FromJSON LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods parseJSON :: Value -> Parser LaplaceDistribution Source # parseJSONList :: Value -> Parser [LaplaceDistribution] Source #
Binary LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods put :: LaplaceDistribution -> Put Source # get :: Get LaplaceDistribution Source # putList :: [LaplaceDistribution] -> Put Source #
ContGen LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods genContVar :: PrimMonad m => LaplaceDistribution -> Gen (PrimState m) -> m Double Source #
Entropy LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods entropy :: LaplaceDistribution -> Double Source #
MaybeEntropy LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods maybeEntropy :: LaplaceDistribution -> Maybe Double Source #
Variance LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods variance :: LaplaceDistribution -> Double Source # stdDev :: LaplaceDistribution -> Double Source #
MaybeVariance LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods maybeVariance :: LaplaceDistribution -> Maybe Double Source # maybeStdDev :: LaplaceDistribution -> Maybe Double Source #
Mean LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods mean :: LaplaceDistribution -> Double Source #
MaybeMean LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods maybeMean :: LaplaceDistribution -> Maybe Double Source #
ContDistr LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods density :: LaplaceDistribution -> Double -> Double Source # quantile :: LaplaceDistribution -> Double -> Double Source # complQuantile :: LaplaceDistribution -> Double -> Double Source # logDensity :: LaplaceDistribution -> Double -> Double Source #
Distribution LaplaceDistribution Source # |
Instance details Defined in Statistics.Distribution.Laplace Methods cumulative :: LaplaceDistribution -> Double -> Double Source # complCumulative :: LaplaceDistribution -> Double -> Double Source #
FromSample LaplaceDistribution Double Source # | Create Laplace distribution from sample. No tests are made to check whether it truly is Laplace. Location of distribution estimated as median of sample.
Instance details Defined in Statistics.Distribution.Laplace Methods fromSample :: Vector v Double => v Double -> Maybe LaplaceDistribution Source #
type Rep LaplaceDistribution Source # |

Instance details

Defined in Statistics.Distribution.Laplace

type Rep LaplaceDistribution = D1 (MetaData "LaplaceDistribution" "Statistics.Distribution.Laplace" "statistics-0.15.0.0-6JZeW98TNbBJdNHw3GDX0L" False) (C1 (MetaCons "LD" PrefixI True) (S1 (MetaSel (Just "ldLocation") SourceUnpack SourceStrict DecidedStrict) (Rec0 Double) :*: S1 (MetaSel (Just "ldScale") SourceUnpack SourceStrict DecidedStrict) (Rec0 Double)))

# Constructors

laplace Source #

Arguments

:: Double | Location
-> Double | Scale
-> LaplaceDistribution |

Create an Laplace distribution.

laplaceE Source #

Arguments

:: Double | Location
-> Double | Scale
-> Maybe LaplaceDistribution |

Create an Laplace distribution.

# Accessors

ldLocation :: LaplaceDistribution -> Double Source #

Location.

ldScale :: LaplaceDistribution -> Double Source #

Scale.