import { Graph } from '../../../../../algorithms/graph/graph'; import { PathRankingConfig, RankedPath } from '../../../../../algorithms/pathfinding/path-ranking'; import { Edge, Node } from '../../../../../algorithms/types/graph'; import { mannWhitneyUTest } from './statistical-functions'; /** * Spearman's rank correlation coefficient. * * Measures the monotonic relationship between two rankings. * Returns value in [-1, 1] where: * - 1: perfect positive correlation (rankings identical) * - 0: no correlation * - -1: perfect negative correlation (rankings reversed) * * Uses Pearson correlation on rank values. * @param rankingA - First ranking (array of comparable items or numeric ranks) * @param rankingB - Second ranking (array of comparable items or numeric ranks) */ export declare const spearmanCorrelation: (rankingA: T[], rankingB: T[]) => number; /** * Kendall's Tau rank correlation coefficient. * * Measures ordinal association between two rankings based on * concordant and discordant pairs. * * Returns value in [-1, 1] where: * - 1: perfect agreement (all pairs concordant) * - 0: no association * - -1: perfect disagreement (all pairs discordant) * @param rankingA - First ranking (array of comparable items or numeric ranks) * @param rankingB - Second ranking (array of comparable items or numeric ranks) */ export declare const kendallTau: (rankingA: T[], rankingB: T[]) => number; /** * Run all path ranking methods on the same graph. * * Executes Path Salience Ranking and all baseline methods, * returning their results in a Map for easy comparison. * @param graph * @param sourceId * @param targetId * @param config */ export declare const runAllRankings: (graph: Graph, sourceId: string, targetId: string, config?: Partial>) => Promise[]>>; /** * Metrics computed from a set of ranked paths. */ export interface RankingMetrics { /** Mean geometric mean MI of paths */ meanMI: number; /** Standard deviation of MI values */ stdMI: number; /** Entropy-based path diversity (0-1, higher = more diverse) */ pathDiversity: number; /** Hub avoidance: 1 - (high-degree node frequency) */ hubAvoidance: number; /** Proportion of unique nodes in reachable set */ nodeCoverage: number; /** Mean score across all paths */ meanScore: number; /** Standard deviation of scores */ stdScore: number; } /** * Compute comprehensive metrics for a set of ranked paths. * * @param rankedPaths - Array of ranked paths * @param graph - Optional graph for node coverage calculation * @param hubThreshold - Degree threshold for hub classification (default: 10) * @returns Computed metrics */ export declare const computeRankingMetrics: (rankedPaths: RankedPath[], graph?: Graph, hubThreshold?: number) => RankingMetrics; /** * Compare two sets of ranked paths using statistical tests. * @param rankedPathsA * @param rankedPathsB */ export declare const compareRankings: (rankedPathsA: RankedPath[], rankedPathsB: RankedPath[]) => { spearman: number; kendall: number; mannWhitney: ReturnType; cohensD: number; }; /** * Generate a canonical signature for a path. * Used for comparing paths across different ranking methods. * @param rankedPath */ export declare const pathSignature: (rankedPath: RankedPath) => string; /** * Generate all path signatures for a ranked path list. * @param rankedPaths */ export declare const allPathSignatures: (rankedPaths: RankedPath[]) => string[]; export { cohensD, confidenceInterval, jaccardSimilarity, mannWhitneyUTest, pathDiversity } from './statistical-functions'; //# sourceMappingURL=path-ranking-helpers.d.ts.map