datasets-0.4.0: Classical data sets for statistics and machine learning

Safe HaskellNone
LanguageHaskell2010

Numeric.Datasets.Titanic

Description

Titanic Data Set. For each person on board the fatal maiden voyage of the ocean liner SS Titanic, this dataset records Sex, Age (child/adult), Class (Crew, 1st, 2nd, 3rd Class) and whether or not the person survived.

``The Titanic survival data seem to become to categorical data analysis what Fisher's Iris data are to discriminant analysis.'' - Buja A.: A word from the editor of JCGS. Statistical Computing & Graphics Newsletter 10 (1), pp.32-33, 1999.

Retrieved from: https://raw.githubusercontent.com/JackStat/6003Data/master/Titanic.txt. A copy of the dataset can be found in datasets/titanic2_full.tsv .

Header:

PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked

Example rows :

10 1 2 "Nasser, Mrs. Nicholas (Adele Achem)" "female" 14 1 0 "237736" 30.0708 "" C 29 1 3 "O'Dwyer, Miss. Ellen "Nellie"" "female" NA 0 0 "330959" 7.8792 "" Q

Synopsis

Documentation

titanicLocal :: Dataset TitanicEntry Source #

The Titanic dataset, parsed from a local copy

data TitanicEntry Source #

Constructors

TitanicEntry 

Fields

Instances
Eq TitanicEntry Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Read TitanicEntry Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Show TitanicEntry Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Generic TitanicEntry Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Associated Types

type Rep TitanicEntry :: Type -> Type #

FromNamedRecord TitanicEntry Source # 
Instance details

Defined in Numeric.Datasets.Titanic

type Rep TitanicEntry Source # 
Instance details

Defined in Numeric.Datasets.Titanic

data Class Source #

Constructors

First 
Second 
Third 
Crew 
Instances
Bounded Class Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Enum Class Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Eq Class Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Methods

(==) :: Class -> Class -> Bool #

(/=) :: Class -> Class -> Bool #

Read Class Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Show Class Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Methods

showsPrec :: Int -> Class -> ShowS #

show :: Class -> String #

showList :: [Class] -> ShowS #

Generic Class Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Associated Types

type Rep Class :: Type -> Type #

Methods

from :: Class -> Rep Class x #

to :: Rep Class x -> Class #

type Rep Class Source # 
Instance details

Defined in Numeric.Datasets.Titanic

type Rep Class = D1 (MetaData "Class" "Numeric.Datasets.Titanic" "datasets-0.4.0-L5crXIpB7vF3Y59seHQZkS" False) ((C1 (MetaCons "First" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Second" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Third" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Crew" PrefixI False) (U1 :: Type -> Type)))

newtype Age Source #

Constructors

Age (Maybe Double) 
Instances
Eq Age Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Methods

(==) :: Age -> Age -> Bool #

(/=) :: Age -> Age -> Bool #

Read Age Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Show Age Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Methods

showsPrec :: Int -> Age -> ShowS #

show :: Age -> String #

showList :: [Age] -> ShowS #

Generic Age Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Associated Types

type Rep Age :: Type -> Type #

Methods

from :: Age -> Rep Age x #

to :: Rep Age x -> Age #

FromField Age Source #

The Age field requires a custom FromField instance because its value may be NA

Instance details

Defined in Numeric.Datasets.Titanic

Methods

parseField :: Field -> Parser Age #

type Rep Age Source # 
Instance details

Defined in Numeric.Datasets.Titanic

type Rep Age = D1 (MetaData "Age" "Numeric.Datasets.Titanic" "datasets-0.4.0-L5crXIpB7vF3Y59seHQZkS" True) (C1 (MetaCons "Age" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Double))))

data Sex Source #

Constructors

Female 
Male 
Instances
Bounded Sex Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Methods

minBound :: Sex #

maxBound :: Sex #

Enum Sex Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Methods

succ :: Sex -> Sex #

pred :: Sex -> Sex #

toEnum :: Int -> Sex #

fromEnum :: Sex -> Int #

enumFrom :: Sex -> [Sex] #

enumFromThen :: Sex -> Sex -> [Sex] #

enumFromTo :: Sex -> Sex -> [Sex] #

enumFromThenTo :: Sex -> Sex -> Sex -> [Sex] #

Eq Sex Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Methods

(==) :: Sex -> Sex -> Bool #

(/=) :: Sex -> Sex -> Bool #

Read Sex Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Show Sex Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Methods

showsPrec :: Int -> Sex -> ShowS #

show :: Sex -> String #

showList :: [Sex] -> ShowS #

Generic Sex Source # 
Instance details

Defined in Numeric.Datasets.Titanic

Associated Types

type Rep Sex :: Type -> Type #

Methods

from :: Sex -> Rep Sex x #

to :: Rep Sex x -> Sex #

type Rep Sex Source # 
Instance details

Defined in Numeric.Datasets.Titanic

type Rep Sex = D1 (MetaData "Sex" "Numeric.Datasets.Titanic" "datasets-0.4.0-L5crXIpB7vF3Y59seHQZkS" False) (C1 (MetaCons "Female" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Male" PrefixI False) (U1 :: Type -> Type))