import type { GetSplitsReturnType } from './getSplits.js'; export interface MappedSplit { data: number[]; mean: number; index: number; source: number; } export interface MatchedSplit { split: MappedSplit; otherSplitMatches: { split: MappedSplit; distanceFactor: number; sizeRatio: number; }[]; } export interface MatchModalitiesConfig { rawSplits1: readonly number[][]; rawSplits2: readonly number[][]; meanDistanceWeight?: number; sizeRatioWeight?: number; /** * If the size of the split is within this ratio of the other split, prioritize the match * Otherwise, all splits that do not have the correct ratio will be matched in the 2nd pass */ prioritizeSizeRatioAbove?: number; } export declare const HIGH_QUALITY_SAMPLE_COUNT = 100; export declare const MINIMUM_SIZE_RATIO_ABOVE = 0.5; export declare const getPrioritizationSizeRatio: (sampleCount: number, highQualitySampleCount?: number) => number; /** * Used to match the modalities of two datasets by their means. * The function will prioritize modalities with similar number of samples, and will try to match them by their means. * You may adjust how the modalities are prioritized using the following parameters: * * `meanDistanceWeight` - the weight of the mean distance in the comparison * `sizeRatioWeight` - the weight of the sample size ratio in the comparison * `prioritizeSizeRatioAbove` - prioritize modalities with a sample size ratio above this value */ export declare function matchModalities({ rawSplits1, rawSplits2, meanDistanceWeight, sizeRatioWeight, prioritizeSizeRatioAbove, }: MatchModalitiesConfig): (readonly [MappedSplit, MappedSplit | undefined] | readonly [MappedSplit | undefined, MappedSplit])[]; export declare const getModalityData: (input: readonly [MappedSplit | undefined, MappedSplit] | readonly [MappedSplit, MappedSplit | undefined]) => [number[] | undefined, number[] | undefined]; export declare function getMatchedUsableModalities({ isUsableModality, ...config }: MatchModalitiesConfig & { isUsableModality: (split: [number[] | undefined, number[] | undefined]) => split is [number[], number[]]; }): { usableModalities: [number[], number[]][]; discardedModalities: [number[] | undefined, number[] | undefined][]; }; export declare function getBestMatchingModality(split1: GetSplitsReturnType, split2: GetSplitsReturnType): { data1: number[]; data2: number[]; remaining1: number[]; remaining2: number[]; }; //# sourceMappingURL=matchModalities.d.ts.map