- Description:
Mathematics database.
This dataset code generates mathematical question and answer pairs, from a range of question types at roughly school-level difficulty. This is designed to test the mathematical learning and algebraic reasoning skills of learning models.
Original paper: Analysing Mathematical Reasoning Abilities of Neural Models (Saxton, Grefenstette, Hill, Kohli).
Example usage:
train_examples, val_examples = tfds.load(
'math_dataset/arithmetic__mul',
split=['train', 'test'],
as_supervised=True)
Additional Documentation: Explore on Papers With Code
Source code:
tfds.datasets.math_dataset.BuilderVersions:
1.0.0(default): No release notes.
Download size:
2.17 GiBSplits:
| Split | Examples |
|---|---|
'test' |
10,000 |
'train' |
1,999,998 |
- Feature structure:
FeaturesDict({
'answer': Text(shape=(), dtype=string),
'question': Text(shape=(), dtype=string),
})
- Feature documentation:
| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
| FeaturesDict | ||||
| answer | Text | string | ||
| question | Text | string |
Supervised keys (See
as_superviseddoc):('question', 'answer')Figure (tfds.show_examples): Not supported.
Citation:
@article{2019arXiv,
author = {Saxton, Grefenstette, Hill, Kohli},
title = {Analysing Mathematical Reasoning Abilities of Neural Models},
year = {2019},
journal = {arXiv:1904.01557}
}
mathdataset/algebra_linear_1d (default config)
Dataset size:
141.27 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/algebra_linear_1d_composed
Dataset size:
246.31 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/algebra_linear_2d
Dataset size:
174.46 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/algebra_linear_2d_composed
Dataset size:
281.35 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/algebra_polynomial_roots
Dataset size:
209.67 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/algebra_polynomial_roots_composed
Dataset size:
297.84 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/algebra_sequence_next_term
Dataset size:
186.03 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/algebra_sequence_nth_term
Dataset size:
222.03 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_add_or_sub
Dataset size:
138.95 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_add_or_sub_in_base
Dataset size:
142.87 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_add_sub_multiple
Dataset size:
140.18 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_div
Dataset size:
128.14 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_mixed
Dataset size:
143.08 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_mul
Dataset size:
123.42 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_mul_div_multiple
Dataset size:
140.60 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_nearest_integer_root
Dataset size:
185.02 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/arithmetic_simplify_surd
Dataset size:
254.30 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/calculus_differentiate
Dataset size:
244.75 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/calculus_differentiate_composed
Dataset size:
310.79 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/comparison_closest
Dataset size:
179.75 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/comparison_closest_composed
Dataset size:
256.87 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/comparison_kth_biggest
Dataset size:
195.94 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/comparison_kth_biggest_composed
Dataset size:
267.90 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/comparison_pair
Dataset size:
135.12 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/comparison_pair_composed
Dataset size:
231.35 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/comparison_sort
Dataset size:
179.28 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/comparison_sort_composed
Dataset size:
260.00 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/measurement_conversion
Dataset size:
166.67 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/measurement_time
Dataset size:
165.06 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_base_conversion
Dataset size:
139.60 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_div_remainder
Dataset size:
172.82 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_div_remainder_composed
Dataset size:
273.13 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/numbers_gcd
Dataset size:
175.57 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_gcd_composed
Dataset size:
284.52 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/numbers_is_factor
Dataset size:
125.69 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_is_factor_composed
Dataset size:
232.11 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_is_prime
Dataset size:
123.88 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_is_prime_composed
Dataset size:
231.57 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_lcm
Dataset size:
184.13 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_lcm_composed
Dataset size:
267.70 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/numbers_list_prime_factors
Dataset size:
158.40 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_list_prime_factors_composed
Dataset size:
251.96 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/numbers_place_value
Dataset size:
144.20 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_place_value_composed
Dataset size:
243.95 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_round_number
Dataset size:
159.81 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/numbers_round_number_composed
Dataset size:
247.42 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/polynomials_add
Dataset size:
304.24 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/polynomials_coefficient_named
Dataset size:
266.31 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/polynomials_collect
Dataset size:
190.81 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/polynomials_compose
Dataset size:
280.29 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/polynomials_evaluate
Dataset size:
162.76 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/polynomials_evaluate_composed
Dataset size:
272.91 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/polynomials_expand
Dataset size:
248.78 MiBAuto-cached (documentation): Yes (test), Only when
shuffle_files=False(train)Examples (tfds.as_dataframe):
mathdataset/polynomials_simplify_power
Dataset size:
262.49 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/probability_swr_p_level_set
Dataset size:
273.22 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):
mathdataset/probability_swr_p_sequence
Dataset size:
261.34 MiBAuto-cached (documentation): No
Examples (tfds.as_dataframe):