diff --git a/_modules/besskge/metric.html b/_modules/besskge/metric.html index df0b8f0..032a5c6 100644 --- a/_modules/besskge/metric.html +++ b/_modules/besskge/metric.html @@ -223,6 +223,7 @@
raise ValueError(
"`pos_score` and `candidate_score` need to have same size at dimension 0"
)
+ pos_score.nan_to_num_(-torch.inf)
if self.mode == "optimistic":
n_better = torch.sum(candidate_score > pos_score, dim=-1).to(torch.float32)
diff --git a/generated/besskge.dataset.KGDataset.html b/generated/besskge.dataset.KGDataset.html
index 8c3dada..49baa16 100644
--- a/generated/besskge.dataset.KGDataset.html
+++ b/generated/besskge.dataset.KGDataset.html
@@ -222,12 +222,12 @@ besskge.dataset.KGDataset
Parameters:
-df (Union
[DataFrame
, Dict
[str
, DataFrame
]]) – Pandas DataFrame of all triples in the knowledge graph dataset,
+
df (Union
[DataFrame
, Dict
[str
, DataFrame
]]) – Pandas DataFrame of all triples in the knowledge graph dataset,
or dictionary of DataFrames of triples for each part of the dataset split
head_column (Union
[int
, str
]) – Name of the DataFrame column storing head entities
relation_column (Union
[int
, str
]) – Name of the DataFrame column storing relations
tail_column (Union
[int
, str
]) – Name of the DataFrame column storing tail entities
-entity_types (Union
[Series
, Dict
[str
, str
], None
]) – If entities have types, dictionary or pandas Series of mappings
+
entity_types (Union
[Series
, Dict
[str
, str
], None
]) – If entities have types, dictionary or pandas Series of mappings
entity label -> entity type (as strings).
split (Tuple
[float
, float
, float
]) – Tuple to set the train/validation/test split.
Only used if no pre-defined dataset split is specified,