1

I am trying to convert this code of matlab in python...

parpool
X = power;
T = coi;

net = feedforwardnet(10);
net = train(net,X,T,'useParallel','no','showResources','yes');
Y = net(X);
figure;

plot(X,T,'o',X,Y,'x');    

Here is Target File attached i.e Coi

Here is Input File attached i.e Power

I tried a little bit but getting error like assertion error when training

input_data = power # Power is my input array of length 45
output_data = coi # Coi is my output array of length 60000

h = np.max(input_data )
l = np.min(input_data )

net = nl.net.newff([[l, h]], [1, 1])

error = net.train(input_data, output_data)
out = net.sim(output_data)

Matlab code is working... but i want this same thing to work in python...

Output on matlab

Uzair
  • 231
  • 4
  • 18

0 Answers0