import { ClassifierBase } from '../base'; import { Params } from '../base/estimator'; export interface AdaBoostClassifierProps { nEstimators?: number; n_estimators?: number; learningRate?: number; learning_rate?: number; } /** * AdaBoost classifier. * * Binary (K = 2): discrete AdaBoost over polarity stumps with the SAMME * one-sided weight update. * * Multiclass (K > 2): SAMME (Zhu et al. 2009), sklearn's AdaBoostClassifier * algorithm. The weak learner is a weighted multiclass stump (each side * predicts its weighted-majority class), a stump is accepted while its * weighted error stays below 1 - 1/K, and * alpha = learning_rate * (log((1-err)/err) + log(K-1)). */ export declare class AdaBoostClassifier extends ClassifierBase { private nEstimators; private learningRate; private estimators; private estimatorWeights; private multiEstimators; private multiWeights; private classes; private nFeatures; constructor(props?: AdaBoostClassifierProps); getParams(): Params; private validateInput; private isFitted; /** * trainY here is already mapped to {-1, +1}. */ private trainStump; /** * Raw stump output in {-1, +1}. */ private stumpScore; /** * Weighted-misclassification-optimal multiclass stump: for every * midpoint threshold each side predicts its weighted-majority class. * yIdx holds class indices; weights are assumed normalized to sum 1. */ private trainMultiStump; /** * Class-index predictions of a multiclass stump. */ private multiStumpPredict; fit(trainX: number[][], trainY: number[]): void; private fitBinary; private fitMulticlass; private decisionScores; /** * Per-class alpha-weighted vote totals, indexed like this.classes. */ private voteScores; predict(testX: number[][]): number[]; /** * Returns per-sample probabilities ordered by the sorted class labels. * Binary uses a sigmoid over the ensemble score, multiclass the * normalized alpha-weighted vote share - both heuristic calibrations, * not sklearn's exact probability transform. */ predictProba(testX: number[][]): number[][]; getFeatureImportances(): number[]; get featureImportances(): number[]; }