简介
spark 线性回归样例:
http://spark.apache.org/docs/latest/ml-classification-regression.html#linear-regression
源代码:
https://github.com/apache/spark/blob/v3.1.2/mllib/src/main/scala/org/apache/spark/ml/regression/LinearRegression.scala
线性模型主要训练参数
-
系数
-
截距 intercept: Double
The model intercept for “binomial” logistic regression. If this model was fit with the “multinomial” family then an exception is thrown
“二项”逻辑回归的模型截距。如果此模型适合“多项式”族,则会引发异常 -
残差
scala代码样例
package