<jupyter_start><jupyter_text>Validation case of the algorithm with variable intensity in preferenceThis notebook is based on the code of the validation test `test_validation.test_method_with_comparison_intensity`.<jupyter_code>import sys
sys.path.insert(0, "..")
from consensus.entities.ranking_process import RankingProcess
from consensus.entities.ranking import Preference<jupyter_output><empty_output><jupyter_text>First, a new blank _ranking process_ is created:<jupyter_code>rk_process = RankingProcess()<jupyter_output><empty_output><jupyter_text>The list of alternatives is specified hereafter. They will be ranked by the members in the group which tries to reach a consensus.<jupyter_code># Names of alternatives
alternative_names = ("A", "B", "C", "D", "E", "F", "G", "H")

# Creates the alternatives
for name in alternative_names:
    rk_process.new_alternative(
        name=name,
        description=f"Alternative '{name}'"
    )<jupyter_output><empty_output><jupyter_text>Now, let's add two members in the group _Grace_ and _Barbara_:<jupyter_code>rk_process.new_member("Grace")
rk_process.new_member("Barbara")<jupyter_output><empty_output><jupyter_text>_Grace_ makes a ranking of alternatives with a _moderate preference_ between the four classes she specifies:- A, B- C, D, E- F- G, H<jupyter_code>rk_process.make_ranking("Grace", [
    ["A", "B"],
    ["C", "D", "E"],
    ["F"],
    ["G", "H"]
])<jupyter_output><empty_output><jupyter_text>_Barabara_ makes exactly the same ranking but with variable intensities:- A, B are **very strongly** prefered over- C, D, E which are **moderately** prefered over- F which is strongly prefered over- G, H<jupyter_code>rk_process.make_ranking(
    "Barbara",
    [
        ["A", "B"],
        ["C", "D", "E"],
        ["F"],
        ["G", "H"]
    ],
    [
        Preference.VERY_STRONG,
        Preference.MODERATE,
        Preference.STRONG
    ]
)<jupyter_output><empty_output><jupyter_text>The table bellow gives payoff of every alternative.<jupyter_code>payoff_table = rk_process.payoff()
display(payoff_table)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12131303520456709, 'fraction_numerical': 0.0004757373929590866, 'mean_word_length': 5.20353982300885, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '141386', 'license': 'MIT', 'n_tokens_mistral': 712, 'n_tokens_neox': 688, 'n_words': 182, 'path': 'notebooks/validation_test_method_with_comparison_intensity.ipynb', 'repo_name': 'flaudanum/consensus', 'size': '2102'}