Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This dataset code generates mathematical question and answer pairs, from a range of question types at roughly school-level difficulty.

License

NotificationsYou must be signed in to change notification settings

google-deepmind/mathematics_dataset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This dataset code generates mathematical question and answer pairs, from a rangeof question types at roughly school-level difficulty. This is designed to testthe mathematical learning and algebraic reasoning skills of learning models.

Original paper:Analysing MathematicalReasoning Abilities of Neural Models(Saxton, Grefenstette, Hill, Kohli).

Example questions

Question: Solve -42*r + 27*c = -1167 and 130*r + 4*c = 372 for r.Answer: 4Question: Calculate -841880142.544 + 411127.Answer: -841469015.544Question: Let x(g) = 9*g + 1. Let q(c) = 2*c + 1. Let f(i) = 3*i - 39. Let w(j) = q(x(j)). Calculate f(w(a)).Answer: 54*a - 30Question: Let e(l) = l - 6. Is 2 a factor of both e(9) and 2?Answer: FalseQuestion: Let u(n) = -n**3 - n**2. Let e(c) = -2*c**3 + c. Let l(j) = -118*e(j) + 54*u(j). What is the derivative of l(a)?Answer: 546*a**2 - 108*a - 118Question: Three letters picked without replacement from qqqkkklkqkkk. Give prob of sequence qql.Answer: 1/110

Pre-generated data

Pre-generated files

Version 1.0

This is the version released with the original paper. It contains 2 million(question, answer) pairs per module, with questions limited to 160 characters inlength, and answers to 30 characters in length. Note the training data for eachquestion type is split into "train-easy", "train-medium", and "train-hard". Thisallows training models via a curriculum. The data can also be mixed togetheruniformly from these training datasets to obtain the results reported in thepaper. Categories:

  • algebra (linear equations, polynomial roots, sequences)
  • arithmetic (pairwise operations and mixed expressions, surds)
  • calculus (differentiation)
  • comparison (closest numbers, pairwise comparisons, sorting)
  • measurement (conversion, working with time)
  • numbers (base conversion, remainders, common divisors and multiples,primality, place value, rounding numbers)
  • polynomials (addition, simplification, composition, evaluating, expansion)
  • probability (sampling without replacement)

Getting the source

PyPI

The easiest way to get the source is to use pip:

$ pip install mathematics_dataset

From GitHub

Alternately you can get the source by cloning the mathematics_datasetrepository:

$ git clone https://github.com/deepmind/mathematics_dataset$ pip install --upgrade mathematics_dataset/

Generating examples

Generated examples can be printed to stdout via thegenerate script. Forexample:

python -m mathematics_dataset.generate --filter=linear_1d

will generate example (question, answer) pairs for solving linear equations inone variable.

We've also includedgenerate_to_file.py as an example of how to write thegenerated examples to text files. You can use this directly, or adapt it foryour generation and training needs.

Dataset Metadata

The following table is necessary for this dataset to be indexed by searchengines such asGoogle Dataset Search.

propertyvalue
nameMathematics Dataset
url
sameAshttps://github.com/deepmind/mathematics_dataset
descriptionThis dataset consists of mathematical question and answer pairs, from a rangeof question types at roughly school-level difficulty. This is designed to testthe mathematical learning and algebraic reasoning skills of learning models.\n\n## Example questions\n\n```\nQuestion: Solve -42*r + 27*c = -1167 and 130*r + 4*c = 372 for r.\nAnswer: 4\n\nQuestion: Calculate -841880142.544 + 411127.\nAnswer: -841469015.544\n\nQuestion: Let x(g) = 9*g + 1. Let q(c) = 2*c + 1. Let f(i) = 3*i - 39. Let w(j) = q(x(j)). Calculate f(w(a)).\nAnswer: 54*a - 30\n```\n\nIt contains 2 million(question, answer) pairs per module, with questions limited to 160 characters inlength, and answers to 30 characters in length. Note the training data for eachquestion type is split into "train-easy", "train-medium", and "train-hard". Thisallows training models via a curriculum. The data can also be mixed togetheruniformly from these training datasets to obtain the results reported in thepaper. Categories:\n\n* **algebra** (linear equations, polynomial roots, sequences)\n* **arithmetic** (pairwise operations and mixed expressions, surds)\n* **calculus** (differentiation)\n* **comparison** (closest numbers, pairwise comparisons, sorting)\n* **measurement** (conversion, working with time)\n* **numbers** (base conversion, remainders, common divisors and multiples,\n primality, place value, rounding numbers)\n* **polynomials** (addition, simplification, composition, evaluating, expansion)\n* **probability** (sampling without replacement)
provider
propertyvalue
nameDeepMind
sameAshttps://en.wikipedia.org/wiki/DeepMind
citationhttps://identifiers.org/arxiv:1904.01557

About

This dataset code generates mathematical question and answer pairs, from a range of question types at roughly school-level difficulty.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors6

Languages


[8]ページ先頭

©2009-2025 Movatter.jp