# DatasetDataSource

Data source for explainability analysis using a sample from a dataset.

DatasetDataSource allows you to perform explainability analysis on a random sample of data from a specified environment/dataset. This is useful for understanding general model behavior, analyzing feature importance patterns across multiple instances, or getting representative explanations.

This data source type is ideal for exploratory analysis, understanding overall model behavior, or when you want to analyze explanations across a representative sample rather than specific instances.

## Examples

Creating a dataset data source for production sampling:

```python
dataset_source = DatasetDataSource(
    env_type="PRODUCTION",
    num_samples=100,
    env_id="prod_dataset_uuid"
)
```

Creating a dataset data source for validation analysis:

```python
validation_source = DatasetDataSource(
    env_type="VALIDATION",
    num_samples=50
)
```

Creating a dataset data source with default sampling:

```python
default_source = DatasetDataSource(
    env_type="PRODUCTION"
)
```

## source\_type *: Literal\['ENVIRONMENT']*

## env\_type *: str*

## num\_samples *: int | None*

## env\_id *: str | UUID | None*


---

# 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://docs.fiddler.ai/api/fiddler-python-client-sdk/schemas/dataset-data-source.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.
