možda će nekome pomoći, ovo je zadatak s auditornih za GNN
import numpy as np
from scipy.stats import logistic
V = np.array([[0.1, 0, 0, 0],
[0, 0.1, 0, 0],
[0, 0, 0.1, 0],
[0, 0, 0, 0.1],
[0.1, 0, 0.1, 0.1],
[0, 0.1, 0.1, 0],
[0.1, 0.1, 0, 0],
[0, 0.1, 0, 0.1]])
U = np.array([[0, 0.1, 0.1, 0],
[0.1, 0, 0.1, 0.1],
[0.1, 0.1, 0, 0],
[0, 0.1, 0, 0]])
W = 0.1 * np.eye(4)
WV = 0.1 * np.eye(4)
for _ in range(4):
WV = np.vstack((WV, [0, 0, 0, 0]))
l = np.linspace(1, V.shape[0], V.shape[0])
s = np.zeros((V.shape[1], 1))
s = np.dot(V.T, l) + np.dot(U.T, s).T
s = logistic.cdf(s)[0]
print(s)
s = np.dot(V.T, l) + np.dot(U.T, s).T
s = logistic.cdf(s)
print(s)
s = np.dot(V.T, l) + np.dot(U.T, s).T
s = logistic.cdf(s)
print(s)
o = np.dot(W.T, s) + np.dot(WV.T, l).T
o = logistic.cdf(o)
print(o)