Google I/O is a wrap! Catch up on TensorFlow sessions View sessions

diamonds

  • Description:

This classic dataset contains physical attributes and prices of 53940 diamonds.

Attributes:

  • price: Price in US dollars.
  • carat: Weight of the diamond.
  • cut: Cut quality (ordered worst to best).
  • color: Color of the diamond (ordered best to worst).
  • clarity: Clarity of the diamond (ordered worst to best).
  • x: Length in mm.
  • y: Width in mm.
  • z: Depth in mm.
  • depth: Total depth percentage: 100 * z / mean(x, y)
  • table: Width of the top of the diamond relative to the widest point.

  • Homepage: https://ggplot2.tidyverse.org/reference/diamonds.html

  • Source code: tfds.structured.diamonds.Diamonds

  • Versions:

    • 1.0.0 (default): Initial release.
  • Download size: 2.64 MiB

  • Dataset size: 13.01 MiB

  • Auto-cached (documentation): Yes

  • Splits:

Split Examples
'train' 53,940
  • Feature structure:
FeaturesDict({
    'features': FeaturesDict({
        'carat': tf.float32,
        'clarity': ClassLabel(shape=(), dtype=tf.int64, num_classes=8),
        'color': ClassLabel(shape=(), dtype=tf.int64, num_classes=7),
        'cut': ClassLabel(shape=(), dtype=tf.int64, num_classes=5),
        'depth': tf.float32,
        'table': tf.float32,
        'x': tf.float32,
        'y': tf.float32,
        'z': tf.float32,
    }),
    'price': tf.float32,
})
  • Feature documentation:
Feature Class Shape Dtype Description
FeaturesDict
features FeaturesDict
features/carat Tensor tf.float32
features/clarity ClassLabel tf.int64
features/color ClassLabel tf.int64
features/cut ClassLabel tf.int64
features/depth Tensor tf.float32
features/table Tensor tf.float32
features/x Tensor tf.float32
features/y Tensor tf.float32
features/z Tensor tf.float32
price Tensor tf.float32
  • Citation:
@Book{,
  author = {Hadley Wickham},
  title = {ggplot2: Elegant Graphics for Data Analysis},
  publisher = {Springer-Verlag New York},
  year = {2016},
  isbn = {978-3-319-24277-4},
  url = {https://ggplot2.tidyverse.org},
}