Teleporting Simplicial Diffusion Layer / simplicial_track.py

Failed on benchmark

Raw ⬇ ZIP
 1import numpy as np
 2META={'name':'simplicial_node_classification','domain':'graph-nn','description':'Node classification on a two-community cyclic triangle simplicial complex.'}
 3def get_dataset(seed,n_train,n_test):
 4    rng=np.random.RandomState(seed); n,f=24,8
 5    def make(m,rs):
 6        y=np.zeros((m,n),dtype=np.int64); y[:,n//2:]=1
 7        x=rs.normal(0,1,(m,n,f)).astype(np.float32); x[:,:,0]+=(2*y-1)*.45
 8        return x,y
 9    xtr,ytr=make(n_train,rng); xte,yte=make(n_test,np.random.RandomState(seed+5000))
10    return {'xtr':xtr,'ytr':ytr,'xte':xte,'yte':yte,'task':'classification','metric':'err','out_dim':2}