category
pairwise_strength_ranker_common
Shared preprocessing, connectivity, and MM-iteration helpers for pairwise strength rankers.
logtalk_load(ranking_protocols(loader))staticPublic predicates
(no local declarations; see entity ancestors if any)
Protected predicates
update_strengths/4
Hook predicate that importing rankers must define to perform one synchronous strength-update iteration.
staticupdate_strengths(Context,Strengths0,Strengths,MaximumDifference)update_strengths(+nonvar,+list(number),-list(number),-number) - oneinitial_strengths/2
Initializes a positive strength vector with a uniform value for each ordered item.
staticinitial_strengths(Items,Strengths)initial_strengths(+list,-list(float)) - onestrength_pairs/3
Pairs ordered items with their learned strength values.
staticstrength_pairs(Items,StrengthValues,Strengths)strength_pairs(+list,+list(number),-list(pair)) - oneindex_items/3
Builds Item-Index pairs for the ordered training items.
staticindex_items(Items,Index,Indices)index_items(+list,+integer,-list(pair)) - onepreprocess_matchups/6
Builds directed adjacency, reverse adjacency, per-item win totals, and undirected pair-adjacency structures from aggregated pairwise matchups.
staticpreprocess_matchups(Matchups,IndexDictionary,DirectedAdjacency,ReverseAdjacency,WinWeights,PairAdjacency)preprocess_matchups(+list,+compound,-compound,-compound,-compound,-compound) - onebuild_dataset_model/5
Materializes dense per-item win totals and weighted undirected adjacency lists from the sparse preprocessing dictionaries.
staticbuild_dataset_model(Count,WinWeights,PairAdjacency,PairWeights,Wins)build_dataset_model(+integer,+compound,+compound,-list,-list(number)) - onerequire_strong_connectivity/4
Checks that the directed graph is strongly connected and throws a domain error with the strongly connected components otherwise.
staticrequire_strong_connectivity(Count,DirectedAdjacency,ReverseAdjacency,ErrorDomain)require_strong_connectivity(+integer,+compound,+compound,+atom) - onestrongly_connected/3
True when all indexed items are mutually reachable in both the forward and reverse adjacency graphs.
staticstrongly_connected(Count,DirectedAdjacency,ReverseAdjacency)strongly_connected(+integer,+compound,+compound) - zero_or_onestrongly_connected_components/4
Computes the strongly connected components of the directed graph induced by the forward and reverse adjacency dictionaries.
staticstrongly_connected_components(Count,DirectedAdjacency,ReverseAdjacency,Components)strongly_connected_components(+integer,+compound,+compound,-list) - oneoptimize_strengths/8
Runs the iterative strength-update loop until convergence or the maximum iteration bound is reached.
staticoptimize_strengths(MaximumIterations,Tolerance,UpdateContext,Strengths0,Strengths,Status,Iterations,FinalDifference)optimize_strengths(+integer,+number,+nonvar,+list(number),-list(number),-atom,-integer,-number) - onestrength_dictionary/2
Builds an index-addressable dictionary from an ordered list of strength values.
staticstrength_dictionary(Strengths,Dictionary)strength_dictionary(+list(number),-compound) - oneitem_denominator/5
Accumulates the pairwise MM denominator for one item using the current strength dictionary and weighted neighbors.
staticitem_denominator(Neighbors,StrengthDictionary,CurrentStrength,Denominator0,Denominator)item_denominator(+list(pair),+compound,+number,+number,-number) - onePrivate predicates
(no local declarations; see entity ancestors if any)
Operators
(none)