Finding the external fields $h_{i}$ and the coupling parameters $J_{ij}$ can fit the same means and pairwise covariance as the experiment data, using the equations
$\left<s_{i}\right>_{Ising} = \left<s_{i}\right>_{data} $
$\left<s_{i}s_{j}\right>_{Ising} = \left<s_{i}s_{j}\right>_{data} $.
We can solve the equations by iterations $h_{i}=h_{i}+\delta h_{i}$ and $J_{ij}=J_{ij}+\delta J_{ij}$ then make changes
$\delta h_{i}=\eta \{\left<s_{i}\right>_{data} - \left<s_{i}\right>_{Ising} \} $
$\delta J_{ij}=\eta \{\left<s_{i}s_{j}\right>_{data} - \left<s_{i}s_{j}\right>_{Ising} \} $.
We use the data ACV_slice5 (6 neurons) as our sample and set $\eta = 0.1$.
The cost function is
${(\left<s_{i}\right>_{data} - \left<s_{i}\right>_{Ising})}^{2} \leq 0.00000001$
&&
${(\left<s_{i}s_{j}\right>_{data} - \left<s_{i}s_{j}\right>_{Ising})}^{2} \leq 0.00000001$.
The experiment result and simulation result see figure.
Mean $s_{i}$ | 0.600000 | 0.628571 | 0.628571 | 0.600000 | 0.685714 | 0.457143 |
Simulation $s_{i}$ | 0.590619 | 0.672644 | 0.628609 | 0.609595 | 0.647693 | 0.477471 |
If the number of neurons is larger than 30, it is very slow to find the suitable $h_{i}$ and $J_{ij}$ for the good fitting.
The coefficient of $R^{2}$ is:
$R^{2}=1-\frac{\sum_{ij} \left(J_{ij}^{\text{approx}}-J_{ij}^{\text{Exact}} \right)^{2} }{\sum_{ij} \left(J_{ij}^{\text{Exact}}-J_{ij}^{\text{$\overline{Exact}$}} \right)^{2}}$ ,
with
$\overline{J_{ij}^{\text{Exact}}}=\frac {\sum_{i \neq j} J_{ij}^{\text{Exact}}}{N(N-1)}$.
The rms error is:
$\sqrt{\frac{1}{N(N-1)} \sum_{i \neq j} (J_{ij}^\text{approx}-J_{ij}^\text{Exact})^{2} }$.
h:n(0.0,0.1)&J:n(0.0,0.1) , n=20 at CT=0.2 | rms error | $R^{2}$ |
nMf | 0.261099 | -5.69658 |
IP | 0.36969 | -12.4251 |
SM | 0.135638 | -0.807203 |
TAP | 0.225045 | -3.97488 |
h:n(0.0,0.1)&J:n(0.0,0.1) ,n=20 at T=1 | rms error | $R^{2}$ |
nMf | 0.0501364 | 0.753083 |
IP | 0.0492352 | 0.761881 |
SM | 0.0504632 | 0.749854 |
TAP | 0.0501487 | 0.752963 |
h:n(0.0,0.2)&J:n(0.0,0.2) ,n=20 at CT=0.4 | rms error | $R^{2}$ |
nMf | 0.186599 | 0.144925 |
IP | 0.327701 | -1.63717 |
SM | 0.0808463 | 0.83949 |
TAP | 0.146637 | 0.471956 |
h:n(0.0,0.2)&J:n(0.0,0.2) ,n=20 at T=1.0 | rms error | $R^{2}$ |
nMf | 0.0989592 | 0.759511 |
IP | 0.105152 | 0.72847 |
SM | 0.102435 | 0.74232 |
TAP | 0.0992857 | 0.757921 |
J:n(0.0,0.06) ,n=200 at T=0.4 | rms error | $R^{2}$ | h:n(0.0,0.06) | rms error | $R^{2}$ |
nMf | 0.0252805 | 0.820135 | | 1.40724 | -0.111763 |
IP | 0.135993 | -4.20489 | | 14.1081 | -110.741 |
SM | 0.0429129 | 0.481737 | | 3.8296 | -7.23352 |
TAP | 0.021821 | 0.865994 | | 1.48845 | -0.243794 |
J:n(0.0,0.06) ,n=200 at T=1.0 | rms error | $R^{2}$ | h:n(0.0,0.06) | rms error | $R^{2}$ |
nMf | 0.0299218 | 0.748029 | | 0.0187765 | 0.999802 |
IP | 0.033059 | 0.692421 | | 0.0524186 | 0.998457 |
SM | 0.0299849 | 0.746966 | | 0.0184704 | 0.999808 |
TAP | 0.0299236 | 0.747998 | | 0.0354793 | 0.999293 |
h:n(0.0,0.07) & J:n(0.0,0.07), n=200 at T=1 | $\sqrt{200}$ |
h:n(0.0,0.08) & J:n(0.0,0.08), n=150 at T=1 | $\sqrt{150}$ |
h:n(0.0,0.1) & J:n(0.0,0.1) , n=100 at T=1 | $\sqrt{100}$ |
h:n(0.0,0.14) & J:n(0.0,0.14), n=50 at T=1 | $\sqrt{50} $ |
h:n(0.0,0.22) & J:n(0.0,0.22), n=20 at T=1 | $\sqrt{20} $ |
We set the mean equal to zero and the variance of normal distribution of h and J
from $\frac{1}{\sqrt{200}}$: $\frac{1}{\sqrt{150}}$: $\frac{1}{\sqrt{100}}$:$\frac{1}{\sqrt{50}}$:$\frac{1}{\sqrt{20}} \approx 0.07 : 0.08 : 0.1 : 0.14 : 0.22 $.
We use the normal distribution of h and J to get the coefficients of $R^{2}$ and the RMSerror at T=1.