Skip to main content

SegmentScoreDistribution

Report
DashAI.back.reports.translation.SegmentScoreDistribution

Distribution of the sentence level BLEU scores across segments.

The corpus BLEU metric is a single point on this histogram; the histogram is the shape of the quality. A split whose scores cluster high with a handful near zero contains a few broken translations among otherwise good ones, while a wide flat distribution means quality is uniformly mediocre — a different problem to solve, and one the aggregate cannot tell apart.

Parameters

bins : integer, default=20
Number of bins used to bucket the per segment scores.

Methods

compute(self, y_true, y_pred, class_names: Optional[List[str]] = None) -> List[DashAI.back.core.artifacts.Artifact]

Defined on SegmentScoreDistribution

Build the segment score distribution histogram.

Parameters

y_true : array_like
Reference translations, one per row.
y_pred : array_like
The model's translations for the same rows.
class_names : Optional[List[str]]
Unused; always None for translation.

Returns

List[Artifact]
A single histogram figure with a mean reference line.

get_credential(self, name: str)

Defined on ConfigObject

Resolve a registered credential component by name.

Parameters

name : str
Credential component class name (e.g. "HuggingFaceCredential").

Returns

BaseCredential
An instance of the requested credential component.

get_metadata(cls) -> Dict[str, Any]

Defined on BaseReport

Get metadata values for the current report.

Returns

Dict[str, Any]
UI metadata, including whether the report needs a model that outputs class probabilities.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.

Compatible with