UNPKG

@astermind/astermind-premium

Version:

Astermind Premium - Premium ML Toolkit

59 lines 1.57 kB
export interface HierarchicalELMOptions { hierarchy: { [parent: string]: string[]; }; rootCategories: string[]; hiddenUnits?: number; activation?: 'relu' | 'tanh' | 'sigmoid' | 'linear'; maxLen?: number; useTokenizer?: boolean; } export interface HierarchicalELMResult { path: string[]; label: string; prob: number; levelProbs: number[]; } /** * Hierarchical ELM for tree-structured classification * Features: * - Coarse-to-fine classification * - Tree-structured decision making * - Multi-level probability estimation * - Efficient hierarchical search */ export declare class HierarchicalELM { private elms; private hierarchy; private rootCategories; private options; private trained; constructor(options: HierarchicalELMOptions); /** * Initialize ELMs for each level in hierarchy */ private _initializeELMs; /** * Train hierarchical ELM * @param X Input features * @param yLabels Full hierarchical paths (e.g., ['root', 'parent', 'child']) */ train(X: number[][], yLabels: string[][]): void; /** * Predict with hierarchical model */ predict(x: number[] | number[][], topK?: number): HierarchicalELMResult[]; /** * Hierarchical prediction from root to leaf */ private _predictHierarchical; /** * Get hierarchy structure */ getHierarchy(): Map<string, string[]>; /** * Get root categories */ getRootCategories(): string[]; } //# sourceMappingURL=hierarchical-elm.d.ts.map