UNPKG

@astermind/astermind-synthetic-data

Version:

OmegaSynth - Label-Conditioned Synthetic Data Generator for AsterMind ELM/KELM Pipelines

28 lines (27 loc) 807 B
/** * OneHot - One-hot encoding utilities */ export declare class OneHot { /** * Encode an index as a one-hot vector * @param index Index to encode * @param size Size of the one-hot vector */ static encode(index: number, size: number): number[]; /** * Decode a one-hot vector to an index * @param vector One-hot vector */ static decode(vector: number[]): number; /** * Encode multiple indices as one-hot vectors * @param indices Array of indices * @param size Size of each one-hot vector */ static encodeBatch(indices: number[], size: number): number[][]; /** * Decode multiple one-hot vectors to indices * @param vectors Array of one-hot vectors */ static decodeBatch(vectors: number[][]): number[]; }