Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ smooth
Function
smooth
rl3/plot_ddpg_result.py:6–13 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
4
import
numpy
as
np
5
6
def
smooth(x):
7
# last 100
8
n = len(x)
9
y = np.zeros(n)
10
for
i in range(n):
11
start = max(0, i - 99)
12
y[i] = float(x[start:(i+1)].sum()) / (i - start + 1)
13
return
y
14
15
j = np.load(
'ddpg_results.npz'
)
16
Callers
1
plot_ddpg_result.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected