GraphModel

class mowl.base_models.GraphModel(*args, **kwargs)[source]

Bases: Model

Abstract class for graph embedding methods.

Attributes Summary

edges

Returns the edges of the graph as a list of mowl.projection.edge.Edge objects.

graph_node_to_id

Returns a dictionary that maps graph nodes to ids.

graph_relation_to_id

Returns a dictionary that maps graph relations (edge labels) to ids.

projector

Returns the projector of the graph model.

Methods Summary

set_projector(projector)

Sets the projector of the graph model.

Attributes Documentation

edges

Returns the edges of the graph as a list of mowl.projection.edge.Edge objects.

Return type:

list of Edge objects

graph_node_to_id

Returns a dictionary that maps graph nodes to ids.

Return type:

dict

graph_relation_to_id

Returns a dictionary that maps graph relations (edge labels) to ids.

Return type:

dict

projector

Returns the projector of the graph model.

Return type:

ProjectionModel object

Methods Documentation

set_projector(projector)[source]

Sets the projector of the graph model.

Parameters:

projector (Projection object) – the projector to be set