.. index:: single: schulze_ranker
.. _schulze_ranker/0:

.. rst-class:: right

**object**

``schulze_ranker``
==================

Schulze pairwise preference ranker. Learns one deterministic score per item from a dataset object implementing the ``pairwise_ranking_dataset_protocol`` protocol by computing strongest paths over aggregated head-to-head outcomes and returns a self-describing ranker term with diagnostics that can be used for ranking and export.

| **Availability:** 
|    ``logtalk_load(schulze_ranker(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:0
| **Date:** 2026-05-07

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Imports:**
|    ``public`` :ref:`ranking_dataset_common <ranking_dataset_common/0>`
|    ``public`` :ref:`score_ranker_model_common <score_ranker_model_common/0>`
|    ``public`` :ref:`condorcet_victory_common <condorcet_victory_common/0>`
| **Uses:**
|    :ref:`avltree <avltree/0>`
|    :ref:`list <list/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|     :ref:`options_protocol/0::check_option/1`  :ref:`options_protocol/0::check_options/1`  :ref:`ranker_protocol/0::check_ranker/1`  :ref:`options_protocol/0::default_option/1`  :ref:`options_protocol/0::default_options/1`  :ref:`ranker_protocol/0::diagnostic/2`  :ref:`ranker_protocol/0::diagnostics/2`  :ref:`ranker_protocol/0::export_to_clauses/4`  :ref:`ranker_protocol/0::export_to_file/4`  :ref:`ranking_dataset_common/0::grouped_dataset_groups/2`  :ref:`ranking_dataset_common/0::grouped_dataset_items/2`  :ref:`ranking_dataset_common/0::grouped_dataset_items/3`  :ref:`ranking_dataset_common/0::grouped_dataset_summary/2`  :ref:`ranker_protocol/0::learn/2`  :ref:`ranker_protocol/0::learn/3`  :ref:`options_protocol/0::option/2`  :ref:`options_protocol/0::option/3`  :ref:`ranking_dataset_common/0::pairwise_dataset_connected_components/2`  :ref:`ranking_dataset_common/0::pairwise_dataset_declared_items/2`  :ref:`ranking_dataset_common/0::pairwise_dataset_items/2`  :ref:`ranking_dataset_common/0::pairwise_dataset_matchups/2`  :ref:`ranking_dataset_common/0::pairwise_dataset_preferences/2`  :ref:`ranking_dataset_common/0::pairwise_dataset_summary/2`  :ref:`ranking_dataset_common/0::pairwise_dataset_win_totals/2`  :ref:`ranking_dataset_common/0::pairwise_measurement_dataset_connected_components/2`  :ref:`ranking_dataset_common/0::pairwise_measurement_dataset_declared_items/2`  :ref:`ranking_dataset_common/0::pairwise_measurement_dataset_items/2`  :ref:`ranking_dataset_common/0::pairwise_measurement_dataset_measurements/2`  :ref:`ranking_dataset_common/0::pairwise_measurement_dataset_summary/2`  :ref:`ranker_protocol/0::print_ranker/1`  :ref:`ranker_protocol/0::rank/3`  :ref:`ranker_protocol/0::ranker_options/2`  :ref:`ranker_protocol/0::scores/2`  :ref:`ranking_dataset_common/0::temporal_pairwise_dataset_connected_components/2`  :ref:`ranking_dataset_common/0::temporal_pairwise_dataset_declared_items/2`  :ref:`ranking_dataset_common/0::temporal_pairwise_dataset_games/2`  :ref:`ranking_dataset_common/0::temporal_pairwise_dataset_games/3`  :ref:`ranking_dataset_common/0::temporal_pairwise_dataset_items/2`  :ref:`ranking_dataset_common/0::temporal_pairwise_dataset_periods/2`  :ref:`ranking_dataset_common/0::temporal_pairwise_dataset_summary/2`  :ref:`options_protocol/0::valid_option/1`  :ref:`options_protocol/0::valid_options/1`  :ref:`ranker_protocol/0::valid_ranker/1`  :ref:`ranking_dataset_common/0::validate_grouped_dataset/1`  :ref:`ranking_dataset_common/0::validate_grouped_dataset/2`  :ref:`ranking_dataset_common/0::validate_pairwise_dataset/1`  :ref:`ranking_dataset_common/0::validate_pairwise_dataset/2`  :ref:`ranking_dataset_common/0::validate_pairwise_measurement_dataset/1`  :ref:`ranking_dataset_common/0::validate_pairwise_measurement_dataset/2`  :ref:`ranking_dataset_common/0::validate_temporal_pairwise_dataset/1`  :ref:`ranking_dataset_common/0::validate_temporal_pairwise_dataset/2`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. index:: strongest_paths/2
.. _schulze_ranker/0::strongest_paths/2:

``strongest_paths/2``
^^^^^^^^^^^^^^^^^^^^^

Returns the labeled strongest-path relation as ``path(Item1,Item2,Strength)`` terms for all ordered pairs of distinct learned items.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``strongest_paths(Ranker,StrongestPaths)``
| **Mode and number of proofs:**
|    ``strongest_paths(+compound,-list(compound))`` - ``one``


------------

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

.. seealso::

   :ref:`pairwise_ranking_dataset_protocol <pairwise_ranking_dataset_protocol/0>`, :ref:`ranker_protocol <ranker_protocol/0>`, :ref:`copeland_ranker <copeland_ranker/0>`, :ref:`borda_ranker <borda_ranker/0>`

