> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fiddler.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ModelTaskParams

> Configuration parameters for different model task types and evaluation metrics.

Configuration parameters for different model task types and evaluation metrics.

ModelTaskParams defines task-specific parameters that control how models are
evaluated and monitored within Fiddler. Different model types (classification,
regression, ranking) require different parameters to properly compute metrics
and perform analysis.

These parameters are essential for accurate metric computation, proper baseline
establishment, and meaningful performance monitoring across different model
types and use cases.

## Examples

Configuration for binary classification:

```python theme={null}
binary_params = ModelTaskParams(
    binary_classification_threshold=0.5,
    target_class_order=["negative", "positive"]
)
```

Configuration for multi-class classification with class weights:

```python theme={null}
multiclass_params = ModelTaskParams(
    target_class_order=["class_a", "class_b", "class_c"],
    class_weights=[0.3, 0.5, 0.2],
    weighted_ref_histograms=True
)
```

Configuration for ranking models:

```python theme={null}
ranking_params = ModelTaskParams(
    group_by="query_id",
    top_k=10,
    target_class_order=["not_relevant", "relevant", "highly_relevant"]
)
```

Configuration for imbalanced datasets:

```python theme={null}
imbalanced_params = ModelTaskParams(
    binary_classification_threshold=0.3,
    class_weights=[0.1, 0.9],
    weighted_ref_histograms=True
)
```

## binary\_classification\_threshold

Threshold for labels

## target\_class\_order

Order of target classes

## group\_by

Query/session id column for ranking models

## model\_config

Configuration for the model, should be a dictionary conforming to \[ConfigDict]\[pydantic.config.ConfigDict].

## top\_k

Top k results to consider when computing ranking metrics

## class\_weights

Weight of each classes

## weighted\_ref\_histograms

Whether baseline histograms must be weighted or not while drift metrics
