import { ClassifierBase } from '../base'; import { Params } from '../base/estimator'; export interface GradientBoostingClassifierProps { nEstimators?: number; n_estimators?: number; learningRate?: number; learning_rate?: number; maxDepth?: number; max_depth?: number; minSamplesSplit?: number; min_samples_split?: number; subsample?: number; maxFeatures?: number | 'sqrt' | 'log2'; max_features?: number | 'sqrt' | 'log2'; randomState?: number; random_state?: number; } /** * Gradient boosting classifier following sklearn's GradientBoostingClassifier. * * Binary (K = 2): log loss. F_0 is the log-odds of the positive class, each * round fits one regression tree to the negative gradient y - p and replaces * each leaf value with the Newton step sum(residuals) / sum(p * (1 - p)). * * Multiclass (K > 2): multinomial deviance. F_0k = log(prior_k), each round * fits K trees (one per class) to y_k - softmax_k(F) using the shared * pre-round probabilities, with the Newton step * (K-1)/K * sum(residuals) / sum(p * (1 - p)) per leaf. */ export declare class GradientBoostingClassifier extends ClassifierBase { private nEstimators; private learningRate; private maxDepth; private minSamplesSplit; private subsample; private maxFeatures?; private randomState?; private estimators; private multiEstimators; private classes; private initF; private initFMulti; private fitted; constructor(props?: GradientBoostingClassifierProps); getParams(): Params; private sampleRows; private buildTree; /** * Fit one tree to the residuals over the in-bag rows and replace its * leaf values with the Newton step * factor * sum(residuals) / sum(p * (1 - p)). */ private fitNewtonTree; fit(trainX: number[][], trainY: number[]): void; private fitBinary; private fitMulticlass; /** * Signed distance to the decision boundary: number[] for binary, * number[][] (per-class margins) for multiclass. */ decisionFunction(testX: number[][]): number[] | number[][]; private decisionFunctionBinary; private decisionFunctionMulti; /** * Returns per-sample probabilities ordered by the sorted class labels. */ predictProba(testX: number[][]): number[][]; predict(testX: number[][]): number[]; get featureImportances(): number[]; }