UNPKG

shevchenko

Version:

JavaScript library for declension of Ukrainian anthroponyms

16 lines (15 loc) 556 B
/** * Represents a split of a dataset into training and validation sets. */ export type SplitData<T> = { trainingData: T[]; validationData: T[]; }; /** * Splits an array of objects into training and validation datasets, grouped by a specific feature and shuffled randomly within each group. */ export declare function splitData<T>(data: T[], features: (keyof T)[], splitRatio: number): SplitData<T>; /** * Shuffles the given array in place using the Fisher-Yates shuffle algorithm. */ export declare function shuffleData<T>(data: T[]): void;