Toloka documentation

fit_predict

crowdkit.aggregation.embeddings.closest_to_average.ClosestToAverage.fit_predict | Source code

fit_predict(
    self,
    data: DataFrame,
    aggregated_embeddings: Optional[Series] = None
)

Fit the model and return the aggregated results.

Parameters Description

Parameters Type Description
data DataFrame

Workers' outputs with their embeddings. A pandas.DataFrame containing task, worker, output and embedding columns.

aggregated_embeddings Optional[Series]

Tasks' embeddings. A pandas.Series indexed by task and holding corresponding embeddings.

  • Returns:

    Tasks' embeddings and outputs. A pandas.DataFrame indexed by task with embedding and output columns.

  • Return type:

    DataFrame