@astermind/astermind-synth
Version:
OmegaSynth - Label-Conditioned Synthetic Data Generator for AsterMind ELM/KELM Pipelines
61 lines (60 loc) • 1.61 kB
TypeScript
/**
* HybridGenerator - Blends Retrieval + ELM jitter for realism + variation
* 1. Retrieve real sample
* 2. Encode
* 3. Apply ELM noise
* 4. Decode
*/
import { LabeledSample } from '../types';
export interface HybridGeneratorConfig {
maxLength: number;
elmHiddenUnits?: number;
elmActivation?: 'tanh' | 'relu' | 'leakyrelu' | 'sigmoid' | 'linear' | 'gelu';
elmRidgeLambda?: number;
noiseSize?: number;
jitterStrength?: number;
exactMode?: boolean;
useOneHot?: boolean;
useClassification?: boolean;
usePatternCorrection?: boolean;
seed?: number;
}
export declare class HybridGenerator {
private retrieval;
private elm;
private encoder;
private config;
private jitterStrength;
private patternCorrector;
constructor(config: HybridGeneratorConfig);
/**
* Train the hybrid generator on labeled samples
*/
train(samples: LabeledSample[]): void;
/**
* Generate a hybrid sample (retrieval + jitter)
* @param label Label to generate for
* @param noiseSeed Optional seed for deterministic output
*/
generate(label: string, noiseSeed?: number): string;
/**
* Apply jitter to an encoded vector
*/
private applyJitter;
/**
* Generate an ELM vector for jittering
*/
private generateELMVector;
/**
* Generate multiple hybrid samples
*/
generateBatch(label: string, count: number): string[];
/**
* Get all available labels
*/
getLabels(): string[];
/**
* Check if generator is trained
*/
isTrained(): boolean;
}