线性回归-LinearRegression

2021-04-22
714
1
# 概述 对spark ml库中线性回归的封装 # 数据集要求 表格类数据,比如csv格式等。 # 训练 ## 输入 数据集所在的obs路径 ## 输出 模型文件输出的obs路径,模型为spark pipeline格式的模型 ## 算法参数 |参数名称 |参数说明 | | ------------ | ------------ | |input_features_str |输入的列名以逗号分隔组成的字符串,例如 "column_a", "column_a,column_b" | |label_col |目标列 | |regressor_feature_vector_col |算子输入的特征向量列的列名,默认为"model_features" | |max_iter |最大迭代次数,默认为100 | |reg_param |正则化参数,默认为0.0 | |elastic_net_param |弹性网络参数,默认为0.0 | |tol |收敛阈值,默认为1e-6 | |fit_intercept |是否使用截距,默认为True | |standardization |是否对特征进行正则化,默认为True | |solver |优化时采用的处理算法,支持l-bfgs、normal、auto,默认为auto | |aggregation_depth |聚合深度,默认为2 | |loss |损失函数类型,支持squaredError、huber,默认为squaredError | |epsilon |默认为1.35 |
概述
对spark ml库中线性回归的封装
数据集要求
表格类数据,比如csv格式等。
训练
输入
数据集所在的obs路径
输出
模型文件输出的obs路径,模型为spark pipeline格式的模型
算法参数
参数名称 | 参数说明 |
---|---|
input_features_str | 输入的列名以逗号分隔组成的字符串,例如 “column_a”, “column_a,column_b” |
label_col | 目标列 |
regressor_feature_vector_col | 算子输入的特征向量列的列名,默认为"model_features" |
max_iter | 最大迭代次数,默认为100 |
reg_param | 正则化参数,默认为0.0 |
elastic_net_param | 弹性网络参数,默认为0.0 |
tol | 收敛阈值,默认为1e-6 |
fit_intercept | 是否使用截距,默认为True |
standardization | 是否对特征进行正则化,默认为True |
solver | 优化时采用的处理算法,支持l-bfgs、normal、auto,默认为auto |
aggregation_depth | 聚合深度,默认为2 |
loss | 损失函数类型,支持squaredError、huber,默认为squaredError |
epsilon | 默认为1.35 |
概述
对spark ml库中线性回归的封装
数据集要求
表格类数据,比如csv格式等。
训练
输入
数据集所在的obs路径
输出
模型文件输出的obs路径,模型为spark pipeline格式的模型
算法参数
参数名称 | 参数说明 |
---|---|
input_features_str | 输入的列名以逗号分隔组成的字符串,例如 “column_a”, “column_a,column_b” |
label_col | 目标列 |
regressor_feature_vector_col | 算子输入的特征向量列的列名,默认为"model_features" |
max_iter | 最大迭代次数,默认为100 |
reg_param | 正则化参数,默认为0.0 |
elastic_net_param | 弹性网络参数,默认为0.0 |
tol | 收敛阈值,默认为1e-6 |
fit_intercept | 是否使用截距,默认为True |
standardization | 是否对特征进行正则化,默认为True |
solver | 优化时采用的处理算法,支持l-bfgs、normal、auto,默认为auto |
aggregation_depth | 聚合深度,默认为2 |
loss | 损失函数类型,支持squaredError、huber,默认为squaredError |
epsilon | 默认为1.35 |