From 6c91ca520784ffe43d244f3093d6504ccc3c5e34 Mon Sep 17 00:00:00 2001 From: danjust <> Date: Thu, 2 Nov 2023 15:04:21 +0000 Subject: [PATCH] danjust published a site update --- _modules/besskge/metric.html | 1 + generated/besskge.dataset.KGDataset.html | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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,