Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA_SOFIE_GNN Namespace Reference

Classes

class  EncodeProcessDecode
 
class  MLPGraphIndependent
 
class  MLPGraphNetwork
 
class  SofieGNN
 

Functions

 CopyData (input_data)
 
 GenerateData ()
 
 get_graph_data_dict (num_nodes, num_edges, NODE_FEATURE_SIZE=2, EDGE_FEATURE_SIZE=2, GLOBAL_FEATURE_SIZE=1)
 
 make_mlp_model ()
 
 PrintSofie (output, printShape=False)
 
 RunGNet (inputGraphData)
 

Variables

 c0 = ROOT.TCanvas()
 
 c1 = c0.cd(1)
 
 c2 = c0.cd(2)
 
 core = ROOT.TMVA.Experimental.SOFIE.RModel_GNN.ParseFromMemory(ep_model._core._network, CoreGraphData, filename = "core")
 
 CoreGraphData = get_graph_data_dict(num_nodes, num_edges, 2*LATENT_SIZE, 2*LATENT_SIZE, 2*LATENT_SIZE)
 
 data = GenerateData()
 
list dataSet = []
 
 DecodeGraphData = get_graph_data_dict(num_nodes,num_edges, LATENT_SIZE, LATENT_SIZE, LATENT_SIZE)
 
 decoder = ROOT.TMVA.Experimental.SOFIE.RModel_GraphIndependent.ParseFromMemory(ep_model._decoder._network, DecodeGraphData, filename = "decoder")
 
 edge_data
 
int edge_size = 4
 
 edgesG = outGnet[1].edges.numpy()
 
 edgesS = np.asarray(outSofie[1].edge_data)
 
 encoder = ROOT.TMVA.Experimental.SOFIE.RModel_GraphIndependent.ParseFromMemory(ep_model._encoder._network, GraphData, filename = "encoder")
 
 end = time.time()
 
 endSC = time.time()
 
 ep_model = EncodeProcessDecode()
 
 g = out[1].globals.numpy()
 
 global_data
 
int global_size = 1
 
 globG = outGnet[1].globals.numpy()
 
 globS = np.asarray(outSofie[1].global_data)
 
 gnet_data_i = utils_tf.data_dicts_to_graphs_tuple([graphData])
 
list gnetData = []
 
 gnn = SofieGNN()
 
 GraphData = get_graph_data_dict(num_nodes,num_edges, node_size, edge_size, global_size)
 
list graphData = dataSet[i]
 
 hDe = ROOT.TH1D("hDe","Difference for edge data",100,1,0)
 
 hDg = ROOT.TH1D("hDg","Difference for global data",100,1,0)
 
 hDn = ROOT.TH1D("hDn","Difference for node data",100,1,0)
 
 hG = ROOT.TH1D("hG","Result from graphnet",100,1,0)
 
 hS = ROOT.TH1D("hS","Result from SOFIE",100,1,0)
 
 input_core_graph_data = utils_tf.data_dicts_to_graphs_tuple([CoreGraphData])
 
 input_data = ROOT.TMVA.Experimental.SOFIE.GNN_Data()
 
 input_graph_data = utils_tf.data_dicts_to_graphs_tuple([GraphData])
 
int LATENT_SIZE = 100
 
 node_data
 
int node_size = 4
 
 nodesG = outGnet[1].nodes.numpy()
 
 nodesS = np.asarray(outSofie[1].node_data)
 
int num_edges = 20
 
int NUM_LAYERS = 4
 
int num_nodes = 5
 
int numevts = 100
 
 out = RunGNet(gnetData[i])
 
 outGnet = RunGNet(gnetData[i])
 
 output_gn = ep_model(input_graph_data, processing_steps)
 
 output_transform = ROOT.TMVA.Experimental.SOFIE.RModel_GraphIndependent.ParseFromMemory(ep_model._output_transform._network, DecodeGraphData, filename = "output_transform")
 
 outSofie = gnn.infer(sofieData[i])
 
int processing_steps = 5
 
 rec = np.array([0,0,0,0,1,1,1,2,2,3,1,2,3,4,2,3,4,3,4,4], dtype='int32')
 
 receivers
 
 senders
 
 snd = np.array([1,2,3,4,2,3,4,3,4,4,0,0,0,0,1,1,1,2,2,3], dtype='int32')
 
list sofieData = []
 
 start = time.time()
 
 start0 = time.time()
 

Function Documentation

◆ CopyData()

TMVA_SOFIE_GNN.CopyData (   input_data)

Definition at line 143 of file TMVA_SOFIE_GNN.py.

◆ GenerateData()

TMVA_SOFIE_GNN.GenerateData ( )

Definition at line 176 of file TMVA_SOFIE_GNN.py.

◆ get_graph_data_dict()

TMVA_SOFIE_GNN.get_graph_data_dict (   num_nodes,
  num_edges,
  NODE_FEATURE_SIZE = 2,
  EDGE_FEATURE_SIZE = 2,
  GLOBAL_FEATURE_SIZE = 1 
)

Definition at line 22 of file TMVA_SOFIE_GNN.py.

◆ make_mlp_model()

TMVA_SOFIE_GNN.make_mlp_model ( )

Definition at line 32 of file TMVA_SOFIE_GNN.py.

◆ PrintSofie()

TMVA_SOFIE_GNN.PrintSofie (   output,
  printShape = False 
)

Definition at line 133 of file TMVA_SOFIE_GNN.py.

◆ RunGNet()

TMVA_SOFIE_GNN.RunGNet (   inputGraphData)

Definition at line 195 of file TMVA_SOFIE_GNN.py.

Variable Documentation

◆ c0

TMVA_SOFIE_GNN.c0 = ROOT.TCanvas()

Definition at line 243 of file TMVA_SOFIE_GNN.py.

◆ c1

TMVA_SOFIE_GNN.c1 = c0.cd(1)

Definition at line 245 of file TMVA_SOFIE_GNN.py.

◆ c2

TMVA_SOFIE_GNN.c2 = c0.cd(2)

Definition at line 278 of file TMVA_SOFIE_GNN.py.

◆ core

TMVA_SOFIE_GNN.core = ROOT.TMVA.Experimental.SOFIE.RModel_GNN.ParseFromMemory(ep_model._core._network, CoreGraphData, filename = "core")

Definition at line 113 of file TMVA_SOFIE_GNN.py.

◆ CoreGraphData

TMVA_SOFIE_GNN.CoreGraphData = get_graph_data_dict(num_nodes, num_edges, 2*LATENT_SIZE, 2*LATENT_SIZE, 2*LATENT_SIZE)

Definition at line 96 of file TMVA_SOFIE_GNN.py.

◆ data

TMVA_SOFIE_GNN.data = GenerateData()

Definition at line 183 of file TMVA_SOFIE_GNN.py.

◆ dataSet

list TMVA_SOFIE_GNN.dataSet = []

Definition at line 181 of file TMVA_SOFIE_GNN.py.

◆ DecodeGraphData

Definition at line 100 of file TMVA_SOFIE_GNN.py.

◆ decoder

TMVA_SOFIE_GNN.decoder = ROOT.TMVA.Experimental.SOFIE.RModel_GraphIndependent.ParseFromMemory(ep_model._decoder._network, DecodeGraphData, filename = "decoder")

Definition at line 117 of file TMVA_SOFIE_GNN.py.

◆ edge_data

TMVA_SOFIE_GNN.edge_data

Definition at line 215 of file TMVA_SOFIE_GNN.py.

◆ edge_size

int TMVA_SOFIE_GNN.edge_size = 4

Definition at line 15 of file TMVA_SOFIE_GNN.py.

◆ edgesG

TMVA_SOFIE_GNN.edgesG = outGnet[1].edges.numpy()

Definition at line 259 of file TMVA_SOFIE_GNN.py.

◆ edgesS

TMVA_SOFIE_GNN.edgesS = np.asarray(outSofie[1].edge_data)

Definition at line 260 of file TMVA_SOFIE_GNN.py.

◆ encoder

TMVA_SOFIE_GNN.encoder = ROOT.TMVA.Experimental.SOFIE.RModel_GraphIndependent.ParseFromMemory(ep_model._encoder._network, GraphData, filename = "encoder")

Definition at line 109 of file TMVA_SOFIE_GNN.py.

◆ end

TMVA_SOFIE_GNN.end = time.time()

Definition at line 206 of file TMVA_SOFIE_GNN.py.

◆ endSC

TMVA_SOFIE_GNN.endSC = time.time()

Definition at line 226 of file TMVA_SOFIE_GNN.py.

◆ ep_model

TMVA_SOFIE_GNN.ep_model = EncodeProcessDecode()

Definition at line 86 of file TMVA_SOFIE_GNN.py.

◆ g

TMVA_SOFIE_GNN.g = out[1].globals.numpy()

Definition at line 203 of file TMVA_SOFIE_GNN.py.

◆ global_data

TMVA_SOFIE_GNN.global_data

Definition at line 216 of file TMVA_SOFIE_GNN.py.

◆ global_size

int TMVA_SOFIE_GNN.global_size = 1

Definition at line 16 of file TMVA_SOFIE_GNN.py.

◆ globG

TMVA_SOFIE_GNN.globG = outGnet[1].globals.numpy()

Definition at line 272 of file TMVA_SOFIE_GNN.py.

◆ globS

TMVA_SOFIE_GNN.globS = np.asarray(outSofie[1].global_data)

Definition at line 273 of file TMVA_SOFIE_GNN.py.

◆ gnet_data_i

TMVA_SOFIE_GNN.gnet_data_i = utils_tf.data_dicts_to_graphs_tuple([graphData])

Definition at line 191 of file TMVA_SOFIE_GNN.py.

◆ gnetData

list TMVA_SOFIE_GNN.gnetData = []

Definition at line 188 of file TMVA_SOFIE_GNN.py.

◆ gnn

TMVA_SOFIE_GNN.gnn = SofieGNN()

Definition at line 231 of file TMVA_SOFIE_GNN.py.

◆ GraphData

Definition at line 89 of file TMVA_SOFIE_GNN.py.

◆ graphData

list TMVA_SOFIE_GNN.graphData = dataSet[i]

Definition at line 190 of file TMVA_SOFIE_GNN.py.

◆ hDe

TMVA_SOFIE_GNN.hDe = ROOT.TH1D("hDe","Difference for edge data",100,1,0)

Definition at line 252 of file TMVA_SOFIE_GNN.py.

◆ hDg

TMVA_SOFIE_GNN.hDg = ROOT.TH1D("hDg","Difference for global data",100,1,0)

Definition at line 254 of file TMVA_SOFIE_GNN.py.

◆ hDn

TMVA_SOFIE_GNN.hDn = ROOT.TH1D("hDn","Difference for node data",100,1,0)

Definition at line 253 of file TMVA_SOFIE_GNN.py.

◆ hG

TMVA_SOFIE_GNN.hG = ROOT.TH1D("hG","Result from graphnet",100,1,0)

Definition at line 200 of file TMVA_SOFIE_GNN.py.

◆ hS

TMVA_SOFIE_GNN.hS = ROOT.TH1D("hS","Result from SOFIE",100,1,0)

Definition at line 229 of file TMVA_SOFIE_GNN.py.

◆ input_core_graph_data

TMVA_SOFIE_GNN.input_core_graph_data = utils_tf.data_dicts_to_graphs_tuple([CoreGraphData])

Definition at line 97 of file TMVA_SOFIE_GNN.py.

◆ input_data

TMVA_SOFIE_GNN.input_data = ROOT.TMVA.Experimental.SOFIE.GNN_Data()

Definition at line 213 of file TMVA_SOFIE_GNN.py.

◆ input_graph_data

TMVA_SOFIE_GNN.input_graph_data = utils_tf.data_dicts_to_graphs_tuple([GraphData])

Definition at line 92 of file TMVA_SOFIE_GNN.py.

◆ LATENT_SIZE

int TMVA_SOFIE_GNN.LATENT_SIZE = 100

Definition at line 17 of file TMVA_SOFIE_GNN.py.

◆ node_data

TMVA_SOFIE_GNN.node_data

Definition at line 214 of file TMVA_SOFIE_GNN.py.

◆ node_size

int TMVA_SOFIE_GNN.node_size = 4

Definition at line 14 of file TMVA_SOFIE_GNN.py.

◆ nodesG

TMVA_SOFIE_GNN.nodesG = outGnet[1].nodes.numpy()

Definition at line 266 of file TMVA_SOFIE_GNN.py.

◆ nodesS

TMVA_SOFIE_GNN.nodesS = np.asarray(outSofie[1].node_data)

Definition at line 267 of file TMVA_SOFIE_GNN.py.

◆ num_edges

int TMVA_SOFIE_GNN.num_edges = 20

Definition at line 11 of file TMVA_SOFIE_GNN.py.

◆ NUM_LAYERS

int TMVA_SOFIE_GNN.NUM_LAYERS = 4

Definition at line 18 of file TMVA_SOFIE_GNN.py.

◆ num_nodes

int TMVA_SOFIE_GNN.num_nodes = 5

Definition at line 10 of file TMVA_SOFIE_GNN.py.

◆ numevts

int TMVA_SOFIE_GNN.numevts = 100

Definition at line 180 of file TMVA_SOFIE_GNN.py.

◆ out

TMVA_SOFIE_GNN.out = RunGNet(gnetData[i])

Definition at line 202 of file TMVA_SOFIE_GNN.py.

◆ outGnet

TMVA_SOFIE_GNN.outGnet = RunGNet(gnetData[i])

Definition at line 258 of file TMVA_SOFIE_GNN.py.

◆ output_gn

TMVA_SOFIE_GNN.output_gn = ep_model(input_graph_data, processing_steps)

Definition at line 103 of file TMVA_SOFIE_GNN.py.

◆ output_transform

TMVA_SOFIE_GNN.output_transform = ROOT.TMVA.Experimental.SOFIE.RModel_GraphIndependent.ParseFromMemory(ep_model._output_transform._network, DecodeGraphData, filename = "output_transform")

Definition at line 121 of file TMVA_SOFIE_GNN.py.

◆ outSofie

TMVA_SOFIE_GNN.outSofie = gnn.infer(sofieData[i])

Definition at line 257 of file TMVA_SOFIE_GNN.py.

◆ processing_steps

int TMVA_SOFIE_GNN.processing_steps = 5

Definition at line 19 of file TMVA_SOFIE_GNN.py.

◆ rec

TMVA_SOFIE_GNN.rec = np.array([0,0,0,0,1,1,1,2,2,3,1,2,3,4,2,3,4,3,4,4], dtype='int32')

Definition at line 13 of file TMVA_SOFIE_GNN.py.

◆ receivers

TMVA_SOFIE_GNN.receivers

Definition at line 218 of file TMVA_SOFIE_GNN.py.

◆ senders

TMVA_SOFIE_GNN.senders

Definition at line 219 of file TMVA_SOFIE_GNN.py.

◆ snd

TMVA_SOFIE_GNN.snd = np.array([1,2,3,4,2,3,4,3,4,4,0,0,0,0,1,1,1,2,2,3], dtype='int32')

Definition at line 12 of file TMVA_SOFIE_GNN.py.

◆ sofieData

list TMVA_SOFIE_GNN.sofieData = []

Definition at line 210 of file TMVA_SOFIE_GNN.py.

◆ start

TMVA_SOFIE_GNN.start = time.time()

Definition at line 199 of file TMVA_SOFIE_GNN.py.

◆ start0

TMVA_SOFIE_GNN.start0 = time.time()

Definition at line 230 of file TMVA_SOFIE_GNN.py.