tf.data.Dataset is a TensorFlow data abstraction representing a sequence of elements that can be transformed and iterated during model input processing.
A tf.data.Dataset represents model-ready data as elements that can be transformed and iterated. For tabular TensorFlow models, it converts DataFrame features and labels into an input pipeline that can shuffle, batch, and prefetch records. section 9.3.2
A practical dataset pipeline typically:
Shuffles training data, batches examples, and prefetches the next batch to overlap loading with preprocessing and model execution. section 9.3.2
How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it
How deep it goes
Explains conversion, shuffling, batching, prefetching, and dataset splits, but defers Dataset internals.
Examples
Uses property data with categorical and continuous columns, then creates train, validation, and test datasets.
What it assumes
Assumes a labeled DataFrame and feature columns prepared for Keras preprocessing layers.
What you can do after
Builds a shuffled, batched, prefetched dataset from a pandas-style DataFrame for Keras model input.
How it connects
Connects DataFrame inputs with Keras preprocessing layers, normalization, categorical encoding, and model execution.
image_dataset_from_directoryproduced by · image_dataset_from_directory is a Keras utility function that creates an image dataset from files organized in class-specific subdirectories.
tf.data APIuses · The tf.data API is TensorFlow’s API for constructing input pipelines that read, transform, batch, and iterate over data efficiently.
fit methodused by · A fit method is an operation that learns or estimates model parameters, structure, or transformation statistics from supplied data.
generationused by · Generation is the computational production of outputs from supplied inputs or context, often by applying a model to produce predictions or new content.
prefetchused by · Prefetching is the proactive retrieval or preparation of anticipated data or resources before they are needed.
This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.