@astermind/astermind-premium
Version:
Astermind Premium - Premium ML Toolkit
58 lines • 1.51 kB
TypeScript
import type { Graph } from './graph-elm.js';
export interface GraphKernelELMOptions {
categories: string[];
kernelType?: 'weisfeiler-lehman' | 'shortest-path' | 'random-walk';
wlIterations?: number;
kernel?: 'rbf' | 'polynomial' | 'linear' | 'sigmoid';
gamma?: number;
degree?: number;
coef0?: number;
activation?: 'relu' | 'tanh' | 'sigmoid' | 'linear';
}
export interface GraphKernelELMResult {
label: string;
prob: number;
}
/**
* Graph Kernel ELM
* Features:
* - Graph kernels (Weisfeiler-Lehman, shortest-path, random-walk)
* - Graph structure encoding
* - Node classification/regression
*/
export declare class GraphKernelELM {
private kelm;
private categories;
private options;
private trained;
constructor(options: GraphKernelELMOptions);
/**
* Train on graphs
*/
train(graphs: Graph[], y: number[] | string[]): void;
/**
* Compute graph kernel features
*/
private _computeGraphKernelFeatures;
/**
* Weisfeiler-Lehman kernel
*/
private _weisfeilerLehmanKernel;
/**
* Shortest-path kernel
*/
private _shortestPathKernel;
/**
* Random-walk kernel
*/
private _randomWalkKernel;
/**
* Compute shortest paths (Floyd-Warshall simplified)
*/
private _computeShortestPaths;
/**
* Predict on graphs
*/
predict(graphs: Graph | Graph[], topK?: number): GraphKernelELMResult[];
}
//# sourceMappingURL=graph-kernel-elm.d.ts.map