math_dataset

  • 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)
  • Config 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)
Split Examples
'test' 10,000
'train' 1,999,998
  • Features:
FeaturesDict({
    'answer': Text(shape=(), dtype=tf.string),
    'question': Text(shape=(), dtype=tf.string),
})
@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)

mathdataset/algebra_linear_1d_composed

mathdataset/algebra_linear_2d

mathdataset/algebra_linear_2d_composed

mathdataset/algebra_polynomial_roots

mathdataset/algebra_polynomial_roots_composed

mathdataset/algebra_sequence_next_term

mathdataset/algebra_sequence_nth_term

mathdataset/arithmetic_add_or_sub

mathdataset/arithmetic_add_or_sub_in_base

mathdataset/arithmetic_add_sub_multiple

mathdataset/arithmetic_div

mathdataset/arithmetic_mixed

mathdataset/arithmetic_mul

mathdataset/arithmetic_mul_div_multiple

mathdataset/arithmetic_nearest_integer_root

mathdataset/arithmetic_simplify_surd

mathdataset/calculus_differentiate

mathdataset/calculus_differentiate_composed

mathdataset/comparison_closest

mathdataset/comparison_closest_composed

mathdataset/comparison_kth_biggest

mathdataset/comparison_kth_biggest_composed

mathdataset/comparison_pair

mathdataset/comparison_pair_composed

mathdataset/comparison_sort

mathdataset/comparison_sort_composed

mathdataset/measurement_conversion

mathdataset/measurement_time

mathdataset/numbers_base_conversion

mathdataset/numbers_div_remainder

mathdataset/numbers_div_remainder_composed

mathdataset/numbers_gcd

mathdataset/numbers_gcd_composed

mathdataset/numbers_is_factor

mathdataset/numbers_is_factor_composed

mathdataset/numbers_is_prime

mathdataset/numbers_is_prime_composed

mathdataset/numbers_lcm

mathdataset/numbers_lcm_composed

mathdataset/numbers_list_prime_factors

mathdataset/numbers_list_prime_factors_composed

mathdataset/numbers_place_value

mathdataset/numbers_place_value_composed

mathdataset/numbers_round_number

mathdataset/numbers_round_number_composed

mathdataset/polynomials_add

mathdataset/polynomials_coefficient_named

mathdataset/polynomials_collect

mathdataset/polynomials_compose

mathdataset/polynomials_evaluate

mathdataset/polynomials_evaluate_composed

mathdataset/polynomials_expand

mathdataset/polynomials_simplify_power

mathdataset/probability_swr_p_level_set

mathdataset/probability_swr_p_sequence