I am new in Neural network and matlab. My problem -> I have some XYgraphs (X-data, Y-Time). All graphs have same time, but different X values. Also I have a starting point Z. I want to get the actual graph which start from Z, based on above said XY graphs. I tried it by using "nntool" which was available in matlab. I tried few algorithms like TRAINBR, TRAINLM, TRAINB etc. But the output of the trained network never starts from Z. I tried arranging my data, changed input ranges, tried with higher number of layers, epochs, neurons etc. Nothing worked. Please tell me how to solve this problem. No need to use nntool itself.You can suggest any better options... Please help me... A example picture is here...
Asked
Active
Viewed 49 times
0
-
Please show your plots and how the data looks like. And, what are you trying to achieve in this task? – zeeshan khan Jan 07 '19 at 20:19
-
Thanks for the reply... A picture is also added to the question... – Adarsh Sunil Jan 09 '19 at 04:37
-
Please Reply... someone..... – Adarsh Sunil May 09 '19 at 08:37
1 Answers
0
From what I can infer, you are trying to interpolate. Naively one can do it by shifting the mean of the data to Z. I don't have MATLAB, but it shouldn't be difficult to read the Python code.
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)

zeeshan khan
- 376
- 4
- 12
-
Thanks for your reply... But I want to know how you get the value for x for plotting plt.plot(x,Zdash)... – Adarsh Sunil May 14 '19 at 05:27
-
It is a 1D plot. Only Y varies while X is uniformly sampled `x = np.arange(1000)` – zeeshan khan May 14 '19 at 23:01