minst-idx-0.1.0.0: Read and write data in the IDX format used in e.g. the MINST database.

CopyrightChristof Schramm
LicenseGPL v 3
MaintainerChristof Schramm <christof.schramm@campus.lmu.de>
StabilityExperimental
PortabilityShould work in all common Haskell implementations
Safe HaskellNone
LanguageHaskell2010

Data.IDX

Contents

Description

A package for reading and writing data in the IDX format. This data format is used for machine-learning data sets like the MINST database of handwritten digits (http://yann.lecun.com/exdb/mnist/)

Synopsis

Data types

data IDXData Source

Datatype for storing IDXData. Internally data is always stored either as Int or Double unboxed vectors. However when binary serialization is used, the data is serialized according to the IDXContentType.

Accessing data

idxType :: IDXData -> IDXContentType Source

Return the what type the data is stored in

idxDimensions :: IDXData -> Vector Int Source

Return an unboxed Vector of Int dimensions

isIDXReal :: IDXData -> Bool Source

Return wether the data in this IDXData value is stored as double values

isIDXIntegral :: IDXData -> Bool Source

Return wether the data in this IDXData value is stored as integral values

idxDoubleContent :: IDXData -> Vector Double Source

Return contained doubles, if no doubles are contained convert the content to double by using fromIntegral

idxIntContent :: IDXData -> Vector Int Source

Return contained ints, if no ints are contained, convert content to ints by using round

IO / Serialization

ByteString serialization

File IO