import { Graph } from '../../../algorithms/graph/graph'; import { Path } from '../../../algorithms/types/algorithm-results'; import { Edge, Node } from '../../../algorithms/types/graph'; import { PlantedPathConfig } from '../path-planting/path-generator'; /** * Path ranking function type. * * Takes a list of candidate paths and returns them ranked by relevance. */ export type PathRanker = (graph: Graph, paths: Path[]) => Array<{ path: Path; score: number; }>; /** * Available evaluation metrics. */ export type MetricType = "spearman" | "kendall" | "ndcg" | "map" | "mrr" | "precision" | "recall"; /** * Available statistical tests. */ export type StatisticalTestType = "paired-t" | "wilcoxon" | "bootstrap"; /** * Method configuration for comparison experiments. */ export interface MethodConfig { /** Unique name for this method */ name: string; /** Path ranking function */ ranker: PathRanker; /** Optional parameters for the ranker */ params?: Record; } /** * Complete experiment configuration. */ export interface ExperimentConfig { /** Experiment name/identifier */ name: string; /** Description of what's being tested */ description?: string; /** Number of experiment repetitions (for statistical robustness) */ repetitions: number; /** Path planting configuration */ pathPlanting: PlantedPathConfig; /** Methods to compare */ methods: MethodConfig[]; /** Metrics to compute */ metrics: MetricType[]; /** Statistical tests to run */ statisticalTests: StatisticalTestType[]; /** Significance level for statistical tests (default: 0.05) */ alpha?: number; /** Number of bootstrap samples (default: 10000) */ nBootstrap?: number; /** Random seed for reproducibility */ seed: number; /** Optional: Cross-validation folds (default: no cross-validation) */ crossValidationFolds?: number; } /** * Graph specification for experiment. * * Defines what type of graph to use for experiments. */ export interface GraphSpec { /** Graph type identifier */ type: string; /** Number of nodes */ nodeCount: number; /** Edge probability (for random graphs) */ edgeProbability?: number; /** Number of communities (for community-structured graphs) */ communities?: number; /** Whether graph is directed */ directed?: boolean; /** Whether graph is weighted */ weighted?: boolean; /** Optional seed for deterministic graph generation */ seed?: number; } /** * Full experiment configuration with graph specs. */ export interface FullExperimentConfig { /** Base experiment configuration */ experiment: ExperimentConfig; /** Graph specifications to test */ graphSpecs: GraphSpec[]; /** Number of instances per graph spec (default: 1) */ instancesPerSpec?: number; } //# sourceMappingURL=experiment-config.d.ts.map