@astermind/astermind-premium
Version:
Astermind Premium - Premium ML Toolkit
62 lines • 1.6 kB
TypeScript
export interface SparseKernelELMOptions {
categories: string[];
kernelType?: 'rbf' | 'polynomial' | 'linear' | 'sigmoid';
numLandmarks?: number;
landmarkSelection?: 'random' | 'kmeans' | 'diverse';
gamma?: number;
degree?: number;
coef0?: number;
activation?: 'relu' | 'tanh' | 'sigmoid' | 'linear';
maxLen?: number;
useTokenizer?: boolean;
}
export interface SparseKernelELMResult {
label: string;
prob: number;
}
/**
* Sparse Kernel ELM with landmark-based approximation
* Features:
* - Sparse kernel matrix approximation
* - Landmark selection strategies
* - Reduced computational complexity
* - Scalable to large datasets
*/
export declare class SparseKernelELM {
private kelm;
private categories;
private options;
private landmarks;
private trained;
constructor(options: SparseKernelELMOptions);
/**
* Train with sparse kernel approximation
*/
train(X: number[][], y: number[] | string[]): void;
/**
* Select landmark points
*/
private _selectLandmarks;
/**
* K-means landmark selection
*/
private _kmeansLandmarks;
/**
* Diverse landmark selection
*/
private _diverseLandmarks;
/**
* Get labels for landmarks
*/
private _getLandmarkLabels;
private _euclideanDistance;
/**
* Predict using sparse kernel
*/
predict(X: number[] | number[][], topK?: number): SparseKernelELMResult[];
/**
* Get selected landmarks
*/
getLandmarks(): number[][];
}
//# sourceMappingURL=sparse-kernel-elm.d.ts.map