(path: string)
| 49 | } |
| 50 | |
| 51 | function loadSnapshot(path: string): Snapshot { |
| 52 | if (!existsSync(path)) { |
| 53 | console.error(`File not found: ${path}`); |
| 54 | process.exit(1); |
| 55 | } |
| 56 | const raw = JSON.parse(readFileSync(path, "utf8")); |
| 57 | return raw as Snapshot; |
| 58 | } |
| 59 | |
| 60 | /** Kendall tau-b rank correlation over the intersection of two top-K lists. |
| 61 | * Returns null when the intersection is < 2 items (undefined correlation). */ |