多元线性回归拟合算法模块,提供拟合入口、特征曲线升维以及回归系数置信区间的计算。 (Multiple linear regression fitting algorithms: fit entry points, feature curve scaling, and confidence interval computation.)
LinearFittingAlgorithm
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| LinearFitting | 2 | 对给定的自变量矩阵与观测值向量执行多元线性回归(最小二乘)拟合,并返回拟合模型及其误差测试结果。 (Performs ordinary least squares multiple linear regression on the given feature matrix and observed values, returning the fitted… |
| CurveScale | 1 | 将自变量序列升维为多项式特征向量,用于构造形如以下形式的非线性(多项式)拟合: (Scales the input sequence into a polynomial feature vector for building nonlinear/polynomial fits of the form:) h(X) = a + b*x1 + c*x2^2… |
| left | 1 | 计算回归系数置信区间的左边界。(Computes the lower bound of the confidence interval for a regression coefficient.) |
| right | 1 | 计算回归系数置信区间的右边界。(Computes the upper bound of the confidence interval for a regression coefficient.) |
| ConfidenceInterval | 1 | 计算回归系数在给定置信水平下的置信区间 [beta - t*S, beta + t*S]。(Computes the confidence interval [beta - t*S, beta + t*S] for a regression coefficient at the given confidence level.) |
03 Members
Double[0:,0:], Double())使用二维自变量数组 x 与观测值数组 y 执行多元线性回归拟合。(Performs multiple linear regression fitting using a 2D feature array and an observed value array.)
| Name | Type | Description |
|---|---|---|
x | Double[0:,0:] | 自变量二维数组,每一行代表一个样本点的特征向量。(The 2D feature array, each row is a sample's feature vector.) |
y | Double() | 与 x 各行对应的观测值数组。(The observed values corresponding to each row of x.) |
拟合得到的 MLRFit 模型。(The fitted multiple linear regression model.)
NumericMatrix, Vector)对给定的自变量矩阵与观测值向量执行多元线性回归(最小二乘)拟合,并返回拟合模型及其误差测试结果。 (Performs ordinary least squares multiple linear regression on the given feature matrix and observed values, returning the fitted model and its fit errors.)
| Name | Type | Description |
|---|---|---|
x | NumericMatrix | 自变量矩阵,每一行是一个样本点,每一列是一个特征维度。例如: (The feature matrix, each row is a sample point and each column is a feature dimension. e.g.) |
f | Vector | 观测值向量,与矩阵 x 的每一行一一对应。例如: (The observed value vector, corresponding to each row of matrix x. e.g.) |
IEnumerable(Of Double))将自变量序列升维为多项式特征向量,用于构造形如以下形式的非线性(多项式)拟合: (Scales the input sequence into a polynomial feature vector for building nonlinear/polynomial fits of the form:)
h(X) = a + b*x1 + c*x2^2 + d*x3^3 + ... | Name | Type | Description |
|---|---|---|
X | IEnumerable(Of Double) | 原始自变量序列。(The original independent variable sequence.) |
升维后的特征向量,第 i 个元素为 x^(i+1)。(The scaled feature vector where the i-th element is x^(i+1).)
Double, Double, Double)计算回归系数置信区间的左边界。(Computes the lower bound of the confidence interval for a regression coefficient.)
| Name | Type | Description |
|---|---|---|
beta | Double | 回归系数估计值。(The estimated regression coefficient.) |
t | Double | t 分布临界值(对应给定置信水平与自由度)。(The t-distribution critical value for the given confidence level and degrees of freedom.) |
S | Double | 回归系数的标准误。(The standard error of the regression coefficient.) |
置信区间下界 beta - tS。(The lower bound beta - tS.)
Double, Double, Double)计算回归系数置信区间的右边界。(Computes the upper bound of the confidence interval for a regression coefficient.)
| Name | Type | Description |
|---|---|---|
beta | Double | 回归系数估计值。(The estimated regression coefficient.) |
t | Double | t 分布临界值(对应给定置信水平与自由度)。(The t-distribution critical value for the given confidence level and degrees of freedom.) |
S | Double | 回归系数的标准误。(The standard error of the regression coefficient.) |
置信区间上界 beta + tS。(The upper bound beta + tS.)
Double, Double, Double)计算回归系数在给定置信水平下的置信区间 [beta - tS, beta + tS]。(Computes the confidence interval [beta - tS, beta + tS] for a regression coefficient at the given confidence level.)
| Name | Type | Description |
|---|---|---|
beta | Double | 回归系数估计值。(The estimated regression coefficient.) |
t | Double | t 分布临界值(对应给定置信水平与自由度)。(The t-distribution critical value for the given confidence level and degrees of freedom.) |
S | Double | 回归系数的标准误。(The standard error of the regression coefficient.) |
由下界与上界组成的 DoubleRange 置信区间。(A DoubleRange confidence interval consisting of the lower and upper bounds.)