import { BaseEstimator, Params } from '../base/estimator'; /** * Structural contract for the wrapped classifier. Validated at runtime by * shape so any estimator following the BaseEstimator contract works, * including binary-only classifiers (that is the point of these wrappers). */ export interface ClassifierLike extends BaseEstimator { fit(X: number[][], y: number[], sampleWeight?: number[]): void; predict(X: number[][]): number[]; predictProba?(X: number[][]): number[][]; decisionFunction?(X: number[][]): number[] | number[][]; } export declare function validateClassifierEstimator(estimator: unknown, wrapper: string): ClassifierLike; export declare function validateFitInputs(X: number[][], y: number[], wrapper: string): void; export declare function sortedUniqueLabels(y: number[]): number[]; /** * Split params into the wrapper's own params and nested params addressed as * `estimator__` (grid-search style, mirroring Pipeline's * `step__param` addressing). */ export declare function splitEstimatorParams(params: Params, className: string): { own: Params; nested: Params; }; /** Flatten a member's decisionFunction output to one score per sample. */ export declare function flattenDecision(d: number[] | number[][]): number[]; /** * Per-sample score of the positive class from a fitted binary member trained * on labels {0, 1}: decisionFunction (flattened) when available, else * predictProba's positive-class column, else the raw predict output (0/1 * votes). decisionFunction comes first to mirror sklearn's _predict_binary * and to stay consistent with OneVsOneClassifier's confidence source. */ export declare function binaryScores(est: ClassifierLike, X: number[][]): number[]; /** Index of the row maximum; the first maximum wins on ties. */ export declare function argmax(row: number[]): number;