pandas - 我应该记录转换我的模型以进行线性回归分析吗
问题描述
我有一个波士顿房屋数据集,具有以下特征
<class 'pandas.core.frame.DataFrame'>
Int64Index: 414 entries, 1 to 414
Data columns (total 6 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 X2 house age 414 non-null float64
1 X3 distance to the nearest MRT station 414 non-null float64
2 X4 number of convenience stores 414 non-null int64
3 X5 latitude 414 non-null float64
4 X6 longitude 414 non-null float64
5 Y house price of unit area 414 non-null float64
dtypes: float64(5), int64(1)
标准差为:
X2 house age 11.392485
X3 distance to the nearest MRT station 1262.109595
X4 number of convenience stores 2.945562
X5 latitude 0.012410
X6 longitude 0.015347
Y house price of unit area 13.606488
dtype: float64
我试图计算价格的偏差并得到 0.599 的值
我记录转换数据并得到 -0.7064 的值
我遇到的问题是,我应该继续使用数据集日志转换还是不需要转换它,我什么时候应该在我的数据分析中考虑日志转换?
解决方案
是否使用对数转换完全取决于什么更适合您的数据。只需计算模型的性能(对数转换和非对数转换),看看哪个具有最佳性能指标。
推荐阅读
- php - 我想在 Laravel 中将一个值从一个表传递到另一个表
- react-native - 在 React-Native 中发生意外错误“index = 8, count = 2”
- php - 连续检查 MySQL 表更新的最佳方法是什么?
- sql-server - 使用 SPID 了解作业名称
- amazon-web-services - 获取“资源已存在于堆栈中”错误时如何重新部署堆栈,而不删除资源
- mongodb - 启用授权后,我无法使用 mongoose 连接到 monogdb
- javascript - 试图从不同的窗口打开一个现有的窗口
- ada - 询问很多素数时跳过一些素数的计算
- python - 在同一进程中启动 Django Channels Worker
- java - 警报管理器在 60 秒后未启动