# math_qa

<br />

- **Description**:

A large-scale dataset of math word problems and an interpretable neural math
problem solver that learns to map problems to operation programs.

- **Additional Documentation** :
  [Explore on Papers With Code](https://paperswithcode.com/dataset/mathqa)

- **Homepage** : <https://math-qa.github.io/>

- **Source code** :
  [`tfds.datasets.math_qa.Builder`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/datasets/math_qa/math_qa_dataset_builder.py)

- **Versions**:

  - **`1.0.0`** (default): Initial release.
- **Download size** : `6.96 MiB`

- **Dataset size** : `27.15 MiB`

- **Auto-cached**
  ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
  Yes

- **Splits**:

| Split | Examples |
|---|---|
| `'test'` | 2,985 |
| `'train'` | 29,837 |
| `'validation'` | 4,475 |

- **Feature structure**:

    FeaturesDict({
        'Problem': Text(shape=(), dtype=string),
        'Rationale': Text(shape=(), dtype=string),
        'annotated_formula': Text(shape=(), dtype=string),
        'category': Text(shape=(), dtype=string),
        'correct': Text(shape=(), dtype=string),
        'correct_option': Text(shape=(), dtype=string),
        'linear_formula': Text(shape=(), dtype=string),
        'options': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| Problem | Text |   | string |   |
| Rationale | Text |   | string |   |
| annotated_formula | Text |   | string |   |
| category | Text |   | string |   |
| correct | Text |   | string |   |
| correct_option | Text |   | string |   |
| linear_formula | Text |   | string |   |
| options | Text |   | string |   |

- **Supervised keys** (See
  [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):
  `None`

- **Figure**
  ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
  Not supported.

- **Examples**
  ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):

<button id="displaydataframe">Display examples...</button>

- **Citation**:

    @misc{amini2019mathqa,
          title={MathQA: Towards Interpretable Math Word Problem Solving with Operation-Based Formalisms},
          author={Aida Amini and Saadia Gabriel and Peter Lin and Rik Koncel-Kedziorski and Yejin Choi and Hannaneh Hajishirzi},
          year={2019},
          eprint={1905.13319},
          archivePrefix={arXiv},
          primaryClass={cs.CL}
    }