Intelligent Agricultural Solutions of Machine Learning
超平面方程
\[ \mathbf{w} \cdot \mathbf{x} + b = 0 \]
优化目标
\[ \min_{\mathbf{w},b} \frac{1}{2}\|\mathbf{w}\|^2 + C\sum_{i=1}^n \xi_i \]
目标函数
\[ \min_{w} \|Xw - y\|_2^2 \]
正则化
\[ \alpha \|w\|_1 \] (L1) / \[ \alpha \|w\|_2^2 \] (L2)
目标函数
\[ \min_{w} \|Xw - y\|_2^2 + \alpha \|w\|_2^2 \]
目标函数
\[ \min_{w} \frac{1}{2n}\|Xw - y\|_2^2 + \alpha \|w\|_1 \]
目标函数
\[ \min_{w} \frac{1}{2n}\|Xw - y\|_2^2 + \alpha(\rho\|w\|_1 + \frac{1-\rho}{2}\|w\|_2^2) \]
信息增益
\[ IG(D_p) = I(D_p) - \sum_{j=1}^k \frac{N_j}{N_p}I(D_j) \]
基尼指数
\[ Gini(t) = 1 - \sum_{j=1}^c [p(j|t)]^2 \]
集成预测
\[ \hat{y} = \frac{1}{B} \sum_{b=1}^B T_b(x) \]
特征采样
\( m \approx \sqrt{p} \) (分类) / \( m \approx p/3 \) (回归)
梯度提升
\[ F_m(x) = F_{m-1}(x) + \nu \gamma_m h_m(x) \]
直方图算法
\( O(\#data \times \#bins) \)
目标函数
\[ \mathcal{L}^{(t)} = \sum_{i=1}^n l(y_i, \hat{y}_i^{(t-1)} + f_t(x_i)) + \Omega(f_t) \]
泰勒展开
\[ \mathscr{L}^{(t)}\approx\sum_{i=1}^{n}\left[g_i f_t(x_i) + \frac{1}{2} h_i f_t^2(x_i)\right] + \Omega(f_t) \] \
潜变量
\( X = TP^T + E \)
\( Y = UQ^T + F \)
加法模型
\[ F(x) = \sum_{m=1}^M \gamma_m h_m(x) \]
梯度下降
\[ r_{im} = -\left[\frac{\partial L(y_i, F(x_i))}{\partial F(x_i)}\right]_{F(x)=F_{m-1}(x)} \]
卷积运算
\[ (I * K)(i,j) = \sum_m \sum_n I(i+m, j+n)K(m,n) \]
池化
\( \text{MaxPool}(x)_{i,j} = \max_{m,n \in \mathcal{N}(i,j)} x_{m,n} \)
前向传播
\[ a^{(l)} = \sigma(W^{(l)}a^{(l-1)} + b^{(l)}) \]
反向传播
\[ \frac{\partial E}{\partial w_{ij}^{(l)}} = \delta_i^{(l)} a_j^{(l-1)} \]
支持PLINK二进制格式和TXT格式的基因型数据
支持TXT格式的组学数据
# 使用特定模型进行基因组选择
IASML --bfile random50k --phe phenotype.test2.txt --phe-pos 7 --model ridge --out result
# 使用给定参数训练模型
IASML --bfile random50k --phe phenotype.test2.txt --phe-pos 7 --model-params result_model.txt --out result
# 使用预训练神经网络预测
IASML --bfile random50k --phe phenotype.test2.txt --phe-pos 7 --model-frame result_final_model.keras --out result
# 使用特定模型进行预测
IASML --tfile data.txt --phe phenotype.test2.txt --phe-pos 7 --model ridge --out result
# 使用给定参数训练模型
IASML --tfile data.txt --phe phenotype.test2.txt --phe-pos 7 --model-params result_model.txt --out result
# 使用预训练神经网络预测
IASML --tfile data.txt --phe phenotype.test2.txt --phe-pos 7 --model-frame result_final_model.keras --out result
# 执行交叉验证剖分
IASML --phe phenotype.test2.txt --cv-split 5 --split-seed 42 --out result
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
kernel | string | ["linear", "rbf", "poly"] | 核函数类型 |
gamma | string | ["scale", "auto"] | 核函数系数 |
epsilon | float | [0.01, 0.1, 0.2] | 控制间隔带的宽度 |
C | float | [0.1, 1, 10, 100] | 正则化参数 |
svm
kernel: rbf
gamma: auto
epsilon: 0.1
C: 0.1
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
alpha | float | np.logspace(-4, 0, 10) | 正则化强度(L2惩罚项系数) |
solver | string | ["auto", "svd", "cholesky", "lsqr"] | 求解器类型 |
ridge
alpha: 1.0
solver: auto
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
alpha | float | np.logspace(-4, 0, 20) | 正则化强度(L1惩罚项系数) |
lasso
alpha: 0.379
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
alpha | float | np.logspace(-4, 0, 10) | 总体正则化强度 |
l1_ratio | float | [0.1, 0.5, 0.7, 0.9] | L1正则化占比 |
elasticnet
alpha: 1.0
l1_ratio: 0.5
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
max_depth | int | [10, 20, None] | 树的最大深度 |
min_samples_split | int | [2, 5, 10] | 分裂内部节点所需的最小样本数 |
min_samples_leaf | int | [1, 2, 4] | 叶节点所需的最小样本数 |
max_features | string | [None, 'sqrt', 'log2'] | 寻找最佳分割时考虑的特征数量 |
decision_tree
max_depth: 10
min_samples_split: 5
min_samples_leaf: 2
max_features: log2
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
n_estimators | int | [100, 200, 300] | 决策树数量 |
max_depth | int | [10, 20, None] | 树的最大深度 |
min_samples_split | int | [2, 5, 10] | 分裂内部节点所需的最小样本数 |
min_samples_leaf | int | [1, 2, 4] | 叶节点所需的最小样本数 |
max_features | string | [None, 'sqrt', 'log2'] | 寻找最佳分割时考虑的特征数量 |
random_forest
n_estimators: 200
max_depth: 20
min_samples_split: 5
min_samples_leaf: 4
max_features: log2
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
n_estimators | int | [100, 200, 300] | 提升树的数量 |
learning_rate | float | [0.01, 0.1, 0.2] | 学习率 |
max_depth | int | [3, 5, 7] | 树的最大深度 |
lightgbm
n_estimators: 100
max_depth: 3
learning_rate: 0.01
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
n_estimators | int | [100, 200, 300] | 提升树数量 |
learning_rate | float | [0.01, 0.1, 0.2] | 学习率 |
max_depth | int | [3, 5, 7] | 树的最大深度 |
xgboost
n_estimators: 100
max_depth: 3
learning_rate: 0.01
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
n_components | int | np.arange(1, 100) | 保留成分数 |
pls
n_components: 63
参数名 | 类型 | 推荐范围 | 描述 |
---|---|---|---|
n_estimators | int | [50, 500] | 提升树数量 |
gbm
n_estimators: 100
max_depth: 3
learning_rate: 0.01