@astermind/astermind-elm
Version:
JavaScript Extreme Learning Machine (ELM) library for browser and Node.js.
23 lines (22 loc) • 963 B
TypeScript
import { ELMConfig } from '../core/ELMConfig';
export declare class VotingClassifierELM {
private baseConfig;
private elm?;
private modelWeights;
private categories;
private usesConfidence;
private inputSize?;
constructor(baseConfig: ELMConfig);
setModelWeights(weights: number[]): void;
calibrateWeights(predictionLists: string[][], trueLabels: string[]): void;
/** Train meta-classifier on model predictions (+ optional confidences) and true labels. */
train(predictionLists: string[][], // shape: [numModels][numExamples]
confidenceLists: number[][] | null, trueLabels: string[]): void;
/** Predict final label from a single stacked set of model labels (+ optional confidences). */
predict(labels: string[], confidences?: number[], topK?: number): Array<{
label: string;
prob: number;
}>;
loadModelFromJSON(json: string): void;
saveModelAsJSONFile(filename?: string): void;
}