asikist/nnc

How can I get 'single_init.pt' in /nodec_experiments/kuramoto/train.ipynb

Opened this issue · 2 comments

Even in the 'gen_parameters.py' , there is no way to gain 'single_init.pt'

Hi @kaieye. you are correct this seems to be missing from the repo code.

For reproduce-ability, you may find the experimental data on two possible sources if I remember right:

  1. https://ieee-dataport.org/documents/neural-ordinary-differential-equation-control-dynamics-graphs

  2. https://codeocean.com/explore/02eb3fc8-312e-426a-aa5b-159a82f9d99b?query=IEEE%20Transactions%20on%20Control%20of%20Network%20Systems&page=1&filter=all&refine=journal

For training and testing on a new batch of samples, which is expected to produce effective neural network controllers as well, you may generate the initial state, namely x0, yourself. E.g. if the initial states of your dynamics are sampled from a uniform distribution with support $[0,1]$, namely $x_0 \in [0,1]^N, x_0^{(i)} \sim \mathcal{U}(0, 1)$ for $N$ nodes, you may try x0 = torch.rand([batch_size, n_nodes]).

In general, please keep in mind that different hyper-parameters may be required to efficiently learn control for different distributions/samples of initial states, so you may be required to change hyper-parameters to get the desired results.
Hope the above help and please let me know if everything worked fine.

I added a series of related codes and some path errors in the code, you can check my pr. If it works, I'm glad to make a contribution