# Gretel Evaluation

[Gretel.ai](https://gretel.ai/) is another tool that provides the functionality to generate synthetic tabular data. We also use their [Gretel Score](https://gretel.ai/blog/measure-the-quality-of-any-synthetic-dataset-with-gretel-evaluate) as an evaluation metric.

## Installing Gretel Client

```python
pip install gretel-client
```

{% hint style="info" %}
If you are using Jupyter Notebook or Google Colab, please restart your kernel after installing the package.
{% endhint %}

```python
from sdgne.evaluator.evaluator import GretelEvaluation

evaluator = GretelEvaluation(synthesized_data, minority_column_label, 
                                minority_class_label, gretel_api_key)
                                
report = evaluator.run_gretel_quality_report()
```

## Importing Gretel Evaluation

```python
from sdgne.evaluator.evaluator import GretelEvaluation
```

## Creating an evaluator

```python
report = evaluator.run_gretel_quality_report()   
```

### Return

A dictionary containing the quality report generated by Gretel AI [\[7\]](https://seattle-university.gitbook.io/sdgne/references).

{% hint style="success" %}
To generate Gretel Score for synthetic data using SDGnE, you'd require [Gretel API Key](https://console.gretel.ai/users/me/key/).&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://seattle-university.gitbook.io/sdgne/gretel-evaluation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
