From 1e210de60ce43553da45219ba07433da88f372de Mon Sep 17 00:00:00 2001 From: Mathew Shen Date: Fri, 29 Nov 2024 02:32:08 +0800 Subject: [PATCH] doc: fix format (#126) --- crowdkit/aggregation/classification/majority_vote.py | 9 +++------ .../aggregation/classification/zero_based_skill.py | 9 +++------ crowdkit/aggregation/multilabel/binary_relevance.py | 10 ++++------ 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/crowdkit/aggregation/classification/majority_vote.py b/crowdkit/aggregation/classification/majority_vote.py index 10dcfb1..be8d079 100644 --- a/crowdkit/aggregation/classification/majority_vote.py +++ b/crowdkit/aggregation/classification/majority_vote.py @@ -23,12 +23,9 @@ class MajorityVote(BaseClassificationAggregator): resulting label will have the largest sum of weights. - {% note info %} - - If two or more labels have the largest number of votes, the resulting - label will be the same for all tasks that have the same set of labels with the same number of votes. - - {% endnote %} + Note: + If two or more labels have the largest number of votes, the resulting + label will be the same for all tasks that have the same set of labels with the same number of votes. Examples: Basic Majority Vote: diff --git a/crowdkit/aggregation/classification/zero_based_skill.py b/crowdkit/aggregation/classification/zero_based_skill.py index 928b0df..52fafe8 100644 --- a/crowdkit/aggregation/classification/zero_based_skill.py +++ b/crowdkit/aggregation/classification/zero_based_skill.py @@ -20,12 +20,9 @@ class ZeroBasedSkill(BaseClassificationAggregator): This process is repeated until the labels change or exceed the number of iterations. - {% note info %} - - It is necessary that all workers in the dataset that is sent to `predict` exist in responses to - the dataset that was sent to `fit`. - - {% endnote %} + Note: + It is necessary that all workers in the dataset that is sent to `predict` exist in responses to + the dataset that was sent to `fit`. Examples: >>> from crowdkit.aggregation import ZeroBasedSkill diff --git a/crowdkit/aggregation/multilabel/binary_relevance.py b/crowdkit/aggregation/multilabel/binary_relevance.py index 9217c48..32d4c2a 100644 --- a/crowdkit/aggregation/multilabel/binary_relevance.py +++ b/crowdkit/aggregation/multilabel/binary_relevance.py @@ -19,13 +19,11 @@ class BinaryRelevance(BaseClassificationAggregator): each label is treated as a class in binary classification problem and aggregated separately using aggregation algorithms for classification, e.g. Majority Vote or Dawid Skene. - {% note info %} + Note: + If this method is used for single-label classification, the output of the BinaryRelevance method may differ + from the output of the basic aggregator used for its intended purpose, since each class generates a binary + classification task, and therefore it is considered separately. For example, some objects may not have labels. - If this method is used for single-label classification, the output of the BinaryRelevance method may differ - from the output of the basic aggregator used for its intended purpose, since each class generates a binary - classification task, and therefore it is considered separately. For example, some objects may not have labels. - - {% endnote %} Examples: >>> import pandas as pd