问题描述
我正在研究一个小的 ML 回归问题,经过实证研究后,我发现标准化我的依赖特征的最佳方法是使用对数缩放(np.log 或 np.log1p)。但是我想知道是否可以直接从曲线中知道它应该是标准化的正确方法。这是我的代码(y 是一个包含我的因变量值的 Pandas Serie):
fig = plt.figure(figsize=(12,8),constrained_layout=True)
grid = gridspec.GridSpec(ncols=3,nrows=4,figure=fig)
# Histrogram
ax1 = fig.add_subplot(grid[0,:])
sns.distplot(y,ax=ax1)
ax1.set_title("Histrogram of revenue",fontsize=10)
# Probability plot
ax2 = fig.add_subplot(grid[2:,:2])
stats.probplot(y,plot=ax2)
ax2.set_title("QQplot of revenue")
# Boxplot
ax3 = fig.add_subplot(grid[2:,2])
sns.Boxplot(y,ax=ax3,orient="v")
ax3.set_title("Boxplot of revenue")
plt.show()
它给出了以下图: Plots for the distribution of revenue
我也有这个峰度和偏度:
print(f"Kurtosis : {y.kurt()}")
print(f"Skewness : {y.skew()}")
Kurtosis : 12.055176638707394
Skewness : 2.793478695162504
所以我的问题是基于这些信息,你怎么知道选择哪种归一化技术(例如,这里是 log 而不是 Z 归一化)。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)