import { ClassifierBase } from '../../base'; import { Params } from '../../base/estimator'; import { XGBoostProps } from './xgboostBase'; export interface XGBoostClassifierProps extends XGBoostProps { } /** * XGBoost classifier. * * Binary (K = 2): binary:logistic. p = sigmoid(F), g = p - y, * h = p * (1 - p); the initial margin is logit(base_score). * * Multiclass (K > 2): multi:softprob. Each round builds K trees on the * shared pre-round softmax probabilities with g = p_k - 1{y=k} and * h = max(2 * p_k * (1 - p_k), 1e-16), matching the xgboost library's * softmax objective (multiclass_obj: kEps = 1e-16f). Initial margins are 0 (softmax is shift-invariant, * so base_score has no effect here). */ export declare class XGBoostClassifier extends ClassifierBase { private params; private trees; private multiTrees; private baseMargin; private fitted; private classes; private nFeatures; constructor(props?: XGBoostClassifierProps); getParams(): Params; fit(trainX: number[][], trainY: number[]): void; private fitMulticlass; private predictMarginBinary; private predictMarginMulti; /** * Returns per-sample probabilities ordered by the sorted class labels. */ predictProba(testX: number[][]): number[][]; predict(testX: number[][]): number[]; get featureImportances(): number[]; }