0

我是神经网络和matlab的新手。我的问题 -> 我有一些 XY 图表(X 数据,Y 时间)。所有图表都有相同的时间,但不同的 X 值。我也有一个起点 Z。我想根据上述 XY 图得到从 Z 开始的实际图。我使用 matlab 中提供的“nntool”进行了尝试。我尝试了一些算法,如 TRAINBR、TRAINLM、TRAINB 等。但训练后的网络的输出永远不会从 Z 开始。我尝试排列我的数据,更改输入范围,尝试使用更多的层数、时期、神经元等。没有任何效果。请告诉我如何解决这个问题。无需使用 nntool 本身。您可以提出任何更好的选择...请帮助我...示例图片在这里...

4

1 回答 1

0

根据我的推断,您正在尝试进行插值。天真地可以通过将数据的平均值转移到 Z 来做到这一点。我没有 MATLAB,但阅读 Python 代码应该不难。

import matplotlib.pyplot as plt
import numpy as np

Z = 250

# Creating some fake data
y = np.zeros((1000,3))
y[:,0] = np.arange(1000)-500
y[:,1] = np.arange(1000)
y[:,2] = np.arange(1000)+500

x = np.arange(1000)

# Plotting fake data
plt.plot(x,y)

#Take mean along Y axis
ymean = np.mean(y,axis=1)

# Shift the mean to the desired Z after shifting it to origin
Zdash = ymean + (Z - ymean[0]) 

阴谋

plt.plot(x,y)
plt.plot(x,Zdash)

情节2

于 2019-05-10T09:05:40.817 回答