标签: timestep

LSTM 模型中的时间步长到底是什么?

作为一个整体,我是 LSTM 和 RNN 的新手,我一直在绞尽脑汁想了解什么是时间步长。我真的很感激对此的直观解释

deep-learning lstm recurrent-neural-network timestep

9
推荐指数
1
解决办法
1万
查看次数

熊猫:从timedelta中提取小时

此答案说明了如何在Pandas中将整数转换为每小时的时间步长。我需要做相反的事情。

我的数据框df1

   A
0  02:00:00
1  01:00:00
2  02:00:00
3  03:00:00
Run Code Online (Sandbox Code Playgroud)

我的预期数据框df1

   A         B
0  02:00:00  2
1  01:00:00  1
2  02:00:00  2
3  03:00:00  3
Run Code Online (Sandbox Code Playgroud)

我正在尝试:

df1['B'] = df1['A'].astype(int)
Run Code Online (Sandbox Code Playgroud)

之所以失败,是因为: TypeError: cannot astype a timedelta from [timedelta64[ns]] to [int32]

做这个的最好方式是什么?

编辑

如果我尝试df['B'] = df['A'].dt.hour,那么我得到: AttributeError: 'TimedeltaProperties' object has no attribute 'hour'

python delta pandas timestep

4
推荐指数
2
解决办法
2535
查看次数

时间步长的变化不会影响 Dymola 中的模拟结果

我正在研究在 Modelica 的建筑库中开发的热水储存模型。使用Dymola通过Dassl模拟模型,我将模拟的时间步长从1s改为1200s,但是我没有看到模拟结果有任何变化。它与求解器有关吗?如果您能提供帮助,我将不胜感激。

simulation modelica timestep

2
推荐指数
1
解决办法
88
查看次数