getTensor3m: getting tensor from triples

Description Usage Arguments Value Author(s)

View source: R/RDF2Tensor.R

Description

gets a tensor data structure as a set of frontal slices represented as sparse matrices. The entities as subject has a different id than object and the size of subject and object modes can be different.

Usage

1
getTensor3m(trp, S = NULL, P = NULL, O = NULL)

Arguments

trp

three columns representing the set of triples (subject, predicate, object). Each row representes one triple.

S

the predifined list of subjects

P

The set of predicates

O

the predifined list of objects

Value

A LIST containing:

X

set of sparse matrices with ones in the position of triples, each sparse matix represents one predicate (relationship)

S

the set of entities in the subject domain

O

the set of entities in the object domain

P

the set of predicates

Author(s)

Abdelmoneim Amer Desouki


RDFTensor documentation built on Jan. 16, 2021, 5:19 p.m.