UNPKG

@astermind/astermind-synth

Version:

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

54 lines (53 loc) 1.55 kB
/** * ELMGenerator - Label-conditioned string generator using ELM * Trains an ELM to generate encoded strings based on labels + noise */ import { LabeledSample } from '../types'; export interface ELMGeneratorConfig { maxLength: number; hiddenUnits?: number; activation?: 'tanh' | 'relu' | 'leakyrelu' | 'sigmoid' | 'linear' | 'gelu'; ridgeLambda?: number; noiseSize?: number; seed?: number; useOneHot?: boolean; useClassification?: boolean; usePatternCorrection?: boolean; } export declare class ELMGenerator { private encoder; private elm; private labels; private config; private noiseSize; private patternCorrector; private sequenceContext; private useClassification; constructor(config: ELMGeneratorConfig); /** * Train the ELM generator on labeled samples */ train(samples: LabeledSample[]): void; /** * Generate a string for a given label * @param label Label to generate for * @param noiseSeed Optional seed for noise generation (for deterministic output) */ generate(label: string, noiseSeed?: number): string; /** * Generate multiple strings for a label with confidence-based selection */ generateBatch(label: string, count: number): string[]; /** * Refine generated string using sequence context */ private refineWithSequenceContext; /** * Get all trained labels */ getLabels(): string[]; /** * Check if model is trained */ isTrained(): boolean; }