class_docstr: Main class to compute agreement metrics.
  
  Example:
      >>> import argilla as rg
      >>> from argilla.client.feedback.metrics import AgreementMetric
      >>> metric = AgreementMetric(dataset=dataset, question_name=question, filter_by={"response_status": "submitted"})
      >>> metrics_report = metric.compute("alpha")
class_docstr_tok: ["Main","class","to","compute","agreement","metrics",".","Example",":",">",">",">","import","argilla","as","rg",">",">",">","from","argilla.client.feedback.metrics","import","AgreementMetric",">",">",">","metric","=","AgreementMetric","(","dataset=dataset",",","question_name=question",",","filter_by=","{","``","response_status","''",":","``","submitted","''","}",")",">",">",">","metrics_report","=","metric.compute","(","``","alpha","''",")"]
docstr: Initialize a `AgreementMetric` object to compute agreement metrics.
  
  Args:
      dataset: FeedbackDataset to compute the metrics.
      question_name: Name of the question for which we want to analyse the agreement.
      filter_by: A dict with key the field to filter by, and values the filters to apply.
          Can be one of: draft, pending, submitted, and discarded. If set to None,
          no filter will be applied. Defaults to None (no filter is applied).
      sort_by: A list of `SortBy` objects to sort your dataset by.
          Defaults to None (no filter is applied).
      max_records: The maximum number of records to use for training. Defaults to None.
docstr_tok: ["Initialize","a","`","AgreementMetric","`","object","to","compute","agreement","metrics",".","Args",":","dataset",":","FeedbackDataset","to","compute","the","metrics",".","question_name",":","Name","of","the","question","for","which","we","want","to","analyse","the","agreement",".","filter_by",":","A","dict","with","key","the","field","to","filter","by",",","and","values","the","filters","to","apply",".","Can","be","one","of",":","draft",",","pending",",","submitted",",","and","discarded",".","If","set","to","None",",","no","filter","will","be","applied",".","Defaults","to","None","(","no","filter","is","applied",")",".","sort_by",":","A","list","of","`","SortBy","`","objects","to","sort","your","dataset","by",".","Defaults","to","None","(","no","filter","is","applied",")",".","max_records",":","The","maximum","number","of","records","to","use","for","training",".","Defaults","to","None","."]
code: def __init__(
      self,
      dataset: FeedbackDataset,
      question_name: str,
      filter_by: Optional[
          Dict[
              str,
              Union[
                  "ResponseStatusFilter", List["ResponseStatusFilter"]
              ],
          ]
      ] = None,
      sort_by: Optional[List["SortBy"]] = None,
      max_records: Optional[int] = None,
  ) -> None:
      """Initialize a `AgreementMetric` object to compute agreement metrics.
  
      Args:
          dataset: FeedbackDataset to compute the metrics.
          question_name: Name of the question for which we want to analyse the agreement.
          filter_by: A dict with key the field to filter by, and values the filters to apply.
              Can be one of: draft, pending, submitted, and discarded. If set to None,
              no filter will be applied. Defaults to None (no filter is applied).
          sort_by: A list of `SortBy` objects to sort your dataset by.
              Defaults to None (no filter is applied).
          max_records: The maximum number of records to use for training. Defaults to None.
      """
      self._metrics_per_question = METRICS_PER_QUESTION
      super().__init__(dataset, question_name)
      self._filter_by = filter_by
      self._sort_by = sort_by
      self._max_records = max_records
  
file_path: argilla/src/argilla/client/feedback/metrics/agreement_metrics.py
imports: from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Union
  from nltk.metrics.agreement import AnnotationTask
  from nltk.metrics.distance import binary_distance, interval_distance, masi_distance
  from argilla.client.feedback.dataset import FeedbackDataset
  from argilla.client.feedback.metrics.base import AgreementMetricResult, AnnotationTaskMetricBase, MetricBase
  from argilla.client.feedback.schemas import LabelQuestion, MultiLabelQuestion, RankingQuestion, RatingQuestion
  from argilla.client.feedback.schemas.remote.shared import RemoteSchema
label_desc: Use image node_id 1 to create a new AgreementMetric object from inherited base classes: MetricBase with example: obj = AgreementMetric(dataset, question_name, filter_by, sort_by, max_records)