|
20 | 20 |
|
21 | 21 | logging.basicConfig(level=logging.INFO)
|
22 | 22 |
|
23 |
| -class OWL2Vec(Model): |
24 |
| - |
| 23 | +class OWL2VecStar(Model): |
25 | 24 | '''
|
26 | 25 | :param dataset: Dataset composed by training, validation and testing sets, each of which are in OWL format.
|
27 | 26 | :type dataset: :class:`mowl.datasets.base.Dataset`
|
28 | 27 | :param outfile: Path to save the final model
|
29 | 28 | :type outfile: str
|
30 | 29 | :param bidirectional_taxonomy: If true, the ontology projection into a graph will add inverse edges per each subclass axiom
|
31 | 30 | :type bidirectional_taxonomy: bool
|
32 |
| - :param include_literals: If true the graph will also include triples involving data property assertions and annotations. Default is False. |
33 |
| - :type include_literals: bool |
34 |
| - :param only_taxonomy: If true, the projection will only include subClass edges |
| 31 | + :param only_taxonomy: If true, the ontology projection will consider only subclass axioms. |
35 | 32 | :type only_taxonomy: bool
|
| 33 | + :param include_literals: If true, the graph will also include triples involving data property assertions and annotations. |
| 34 | + :type include_literals: bool |
| 35 | + :param walking_method: Method for generating the walks. Choices are: deepwalk (default), node2vec, walkrdfowl. |
| 36 | + :type walking_method: str |
36 | 37 | :param walk_length: Length of the walk performed for each node
|
37 | 38 | :type walk_length: int
|
38 | 39 | :param num_walks: Number of walks performed per node
|
39 | 40 | :type num_walks: int
|
40 |
| - :param alpha: Probability of restart in the walking phase |
| 41 | + :param alpha: Probability of restart in the walking phase. Applicable with DeepWalk |
41 | 42 | :type alpha: float
|
| 43 | + :param p: Return hyperparameter. Default is 1. Applicable with Node2Vec |
| 44 | + :type p: float |
| 45 | + :param q: In-out hyperparameter. Default is 1. Applicable with Node2Vec. |
| 46 | + :type q: float |
42 | 47 | :param vector_size: Dimensionality of the word vectors. Same as :class:`gensim.models.word2vec.Word2Vec`
|
43 | 48 | :type vector_size: int
|
44 | 49 | :param wv_epochs: Number of epochs for the Word2Vec model
|
45 | 50 | :type wv_epochs: int
|
46 | 51 | :param window: Maximum distance between the current and predicted word within a sentence. Same as :class:`gensim.models.word2vec.Word2Vec`
|
47 | 52 | :type window: int
|
48 |
| - :param num_procs: Number of threads to use for the random walks and the Word2Vec model. |
49 |
| - :type num_procs: int |
| 53 | + :param workers: Number of threads to use for the random walks and the Word2Vec model. |
| 54 | + :type workers: int |
50 | 55 | '''
|
51 |
| - |
52 | 56 |
|
53 | 57 | def __init__(self, dataset, outfile, bidirectional_taxonomy=False, include_literals = False, only_taxonomy = False, walking_method = "deepwalk", walk_length = 30, wv_epochs = 10, alpha = 0, num_walks = 100, vector_size = 100, window = 5, workers = 1, p = 1, q=1):
|
54 | 58 |
|
|
0 commit comments