/** Options for `logisticRegression`. */ export interface LogisticRegressionOptions { /** Prepend a column of ones (default true). */ intercept?: boolean; /** Convergence tolerance on the max-norm of the Newton step (default 1e-8). */ tol?: number; /** Maximum IRLS iterations (default 100). */ maxIter?: number; } /** Result of `logisticRegression`. */ export interface LogisticRegressionResult { /** Fitted coefficients for the original predictors (excludes the intercept). */ coefficients: number[]; /** Fitted intercept (0 if `opts.intercept === false`). */ intercept: number; /** Predict class probabilities (P(y=1|x)) for new rows. */ predictProba: (x: number[][]) => number[]; /** Predict class labels (threshold 0.5) for new rows. */ predict: (x: number[][]) => number[]; } /** * Binary logistic regression `P(y=1|x) = sigmoid(xᵀβ)` fit by IRLS (Newton-Raphson * on the Bernoulli log-likelihood). * * @param X - Design matrix (rows = observations, cols = predictors) * @param y - Binary labels, each in {0, 1} * @param opts - `intercept` (default true) prepends a column of ones to X; * `tol` (default 1e-8) convergence tolerance; `maxIter` (default 100) * @returns Fitted coefficients/intercept plus `predict`/`predictProba` * * @example * const m = logisticRegression([[-2], [-1], [1], [2]], [0, 0, 1, 1]); * m.predict([[3]]) // => [1] */ export declare function logisticRegression(X: number[][], y: number[], opts?: LogisticRegressionOptions): LogisticRegressionResult; //# sourceMappingURL=logistic-regression.d.ts.map