feat(tsl-api-reference): expand API and module coverage

This commit is contained in:
csh
2026-08-14 17:12:55 +08:00
parent 8f1056130d
commit 3d3036ebe1
571 changed files with 47842 additions and 14458 deletions
@@ -0,0 +1,33 @@
# 数学函数 / 回归 / 回归检验
## `regress_ridge(y, x, k, constant, alpha)`
声明:function
执行岭回归并返回回归系数、残差和统计检验结果
<!-- tags: 回归 岭回归 正则化 regression ridge -->
| 参数 | 类型 | 说明 |
| ---------- | ------------- | ---------------------------------- |
| `y` | array of real | 被解释变量序列 |
| `x` | array of real | 解释变量矩阵,每列对应一个解释变量 |
| `k` | real\|array | 可选。岭参数或岭参数序列 |
| `constant` | boolean | 可选。是否包含常数项,默认 true |
| `alpha` | real | 可选。显著性水平,默认 0.05 |
返回:array
### 示例
范例01:使用指定岭参数执行回归
```tsl
y := array(49.0, 50.2, 50.5, 48.5);
x := array(
(1.0, 2.0),
(2.0, 1.0),
(3.0, 4.0),
(4.0, 3.0));
return regress_ridge(y, x, 0.1, true, 0.05);
```