Azzera filtri
Azzera filtri

Saving multiple runs within a neural network

1 visualizzazione (ultimi 30 giorni)
Tyler Menz
Tyler Menz il 22 Gen 2020
Modificato: Vimal Rathod il 30 Gen 2020
Hello, I'm using a neural network to analyze a time series dataset with roughly 15,000 lines of data. I'm running abundance data against environmental variables looking for correlations. I'm running the network 100 times for each different parameter to get accurate results. The issue i'm having is that the network is only outputting the results from the last run and I'd like to save them all.
I've incorporated the following into the end of my network to try and save the outputs, targets, p-values, and r2 for each run
for k=1:100
p=1;
q= 15843;
outputmat(p:q,1) = targets;
outputmat(p:q,2) = outputs;
but it is still just saving the last batch of results. Any clue how to get it to save all the data i'm looking for?

Risposte (1)

Vimal Rathod
Vimal Rathod il 30 Gen 2020
Modificato: Vimal Rathod il 30 Gen 2020
It seems the outputmat does not depend on the k value of your "for loop" and thus it is updating the same values in the loop.
You could use
for k = 1:100
p = 1;
q = 15000;
outputmat(p:q , 2*k-1) = targets;
outputmat(p:q , 2*k) = outputs;
end
Hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by