linear-regression - 我是否正确考虑了线性回归模型?
问题描述
我有以下模型:
<bound method Model.summary of Class : LinearRegression
Schema
------
Number of coefficients : 18
Number of examples : 21613
Number of feature columns : 17
Number of unpacked features : 17
Hyperparameters
---------------
L1 penalty : 10000000000.0
L2 penalty : 0.0
Training Summary
----------------
Solver : fista
Solver iterations : 10
Solver status : Completed (Iteration limit reached).
Training time (sec) : 1.2776
Settings
--------
Residual sum of squares : 2842629034369063.5
Training RMSE : 364204.5762
Highest Positive Coefficients
-----------------------------
(intercept) : 274873.056
bathrooms : 8468.5311
grade : 842.068
sqft_living_sqrt : 350.0606
sqft_living : 24.4207
Lowest Negative Coefficients
----------------------------
No Negative Coefficients :
这是否意味着我的等式将是:
预测 = 274873.056 + 8468.5311[浴室] + 842.068[等级]^2 + 350.0606[sqft_living_sqrt]^3 + 24.4207[sqft_living]^4
如果这是正确的,那么模型如何知道哪些特征属于 2 次方、3 次方等?如果我改变特征的顺序,系数会改变吗?
解决方案
我不确定我是否使用 ^2 ... ^3... ^4.. 跟随您?RMSE 执行 ^2 ... ^2 ... ( 等等 )
这是 RMSE 所做的:
均方根误差
- 找出原始值和预测值之间的差异。
- 平方差异
- 将所有平方差相加
- 取总和的平均值。
- 取平均值的平方根
你可以在这里看到我的例子 Math SE https://math.stackexchange.com/questions/3650442/simple-calculation-from-formula-rmse/3843518#3843518
只是,用 RMSE 公式替换您的值。并计算 RMSE。
问候,
//将要
推荐阅读
- python - 使用 Python / Scrapy 进行 Google 身份验证
- ios - 可以通过“邮递员软件”获取 XML 数据,但我无法通过 SWIFT 获取数据
- sqlite - React native 和 Expo Sqlite,使用时间戳字段按日期查询
- python - 如何在 selenium 中注入 javascript for 循环 - python
- vb.net - 他们是一种编写按钮的方法,该按钮将用作实时按钮
- sql - 按彼此接近的时间戳进行分区(例如 30 分钟)
- r - 什么水平的因素首先出现 ggpredict
- c++ - 静态库中具有静态成员的类的显式模板实例化
- python - Odoo 错误引发 ValueError("叶 %r 中的无效字段 %r" % (left, str(leaf)))
- python - Argparse :: 询问 1 或 3 个参数