0

与我的其他一些问题类似,我正在研究 FB Prophet 模型并希望对变量进行超参数调整。我相信(测试)我可以遍历非标准变量,首先将它们分配给网格中的变量。

它运行,但需要永远。让它去12个多小时,它仍然没有完成。读到我可以尝试使用 Dask 加快速度,但是每次运行它时,我的计算机都会崩溃。这是一个装备精良的游戏桌面,我在本地运行客户端,所以我假设我的 Dask 设置中有一些不正确的东西。

例如,即使运行创建参数网格的代码的第一部分也会使我的计算机崩溃:

if __name__ == '__main__':
    from dask.distributed import Client
    client = Client()

param_grid = {  
 
                'changepoint_prior_scale': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'changepoint_range': [0.8, 0.9],
                'seasonality_mode': ['multiplicative', 'additive'],
                'growth': ['linear', 'logistic'],
                'yearly_seasonality': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'weekly_seasonality': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'daily_seasonality': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'monthy_fourier': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'monthy_prior_scale': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'daily_fourier': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'daily_prior_scale': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'weekly_fourier': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'weekly_prior_scale': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'yearly_fourier': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100],
                'yearly_prior_scale': [0.005, .01, 0.05, 0.5, 1, 5, 10, 20, 30, 40, 50, 60, 70, 80 ,90, 100]
              }


# Generate all combinations of parameters
all_params = [dict(zip(param_grid.keys(), v)) for v in itertools.product(*param_grid.values())]
print(all_params)

我究竟做错了什么?

4

0 回答 0