# Datasets · Flux

# Datasets

Flux includes several standard machine learning datasets.

`Flux.Data.Iris.features` — Method

    features()

Get the features of the iris dataset. This is a 4x150 matrix of Float64 elements. It has a row for each feature (sepal length, sepal width, petal length, petal width) and a column for each example.

    julia> features = Flux.Data.Iris.features();

    julia> summary(features)
    "4×150 Array{Float64,2}"

    julia> features[:, 1]
    4-element Array{Float64,1}:
     5.1
     3.5
     1.4
     0.2

source
`Flux.Data.Iris.labels` — Method

    labels()

Get the labels of the iris dataset, a 150 element array of strings listing the species of each example.

    julia> labels = Flux.Data.Iris.labels();

    julia> summary(labels)
    "150-element Array{String,1}"

    julia> labels[1]
    "Iris-setosa"

source
`Flux.Data.MNIST.images` — Method

    images()
    images(:test)

Load the MNIST images.

Each image is a 28×28 array of `Gray` colour values (see Colors.jl).

Return the 60,000 training images by default; pass `:test` to retrieve the 10,000 test images.

source
`Flux.Data.MNIST.labels` — Method

    labels()
    labels(:test)

Load the labels corresponding to each of the images returned from `images()`. Each label is a number from 0-9.

Return the 60,000 training labels by default; pass `:test` to retrieve the 10,000 test labels.

source
`Flux.Data.FashionMNIST.images` — Method

    images()
    images(:test)

Load the Fashion-MNIST images.

Each image is a 28×28 array of `Gray` colour values (see Colors.jl).

Return the 60,000 training images by default; pass `:test` to retrieve the 10,000 test images.

source
`Flux.Data.FashionMNIST.labels` — Method

    labels()
    labels(:test)

Load the labels corresponding to each of the images returned from `images()`. Each label is a number from 0-9.

Return the 60,000 training labels by default; pass `:test` to retrieve the 10,000 test labels.

source
`Flux.Data.CMUDict.phones` — Method

    phones()

Return a `Vector` containing the phones used in the CMU Pronouncing Dictionary.

source
`Flux.Data.CMUDict.symbols` — Method

    symbols()

Return a `Vector` containing the symbols used in the CMU Pronouncing Dictionary. A symbol is a phone with optional auxiliary symbols, indicating for example the amount of stress on the phone.

source
`Flux.Data.CMUDict.rawdict` — Method

    rawdict()

Return the unfiltered CMU Pronouncing Dictionary.

source
`Flux.Data.CMUDict.cmudict` — Method

    cmudict()

Return a filtered CMU Pronouncing Dictionary.

It is filtered so each word contains only ASCII characters and a combination of word characters (as determined by the regex engine using `\w`), '-' and '.'.

source
`Flux.Data.Sentiment.train` — Method

    train()

Return the train split of the Stanford Sentiment Treebank. The data is in treebank format.

source
`Flux.Data.Sentiment.test` — Method

    test()

Return the test split of the Stanford Sentiment Treebank. The data is in treebank format.

source
`Flux.Data.Sentiment.dev` — Method

    dev()

Return the dev split of the Stanford Sentiment Treebank. The data is in treebank format.

source

Theme

This document was generated with Documenter.jl on Monday 6 April 2020. Using Julia version 1.4.0.