-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hey there,
So, this method is giving me some serious “math anxiety”! In my dataset (WD50k), I’ve got facts with an arity of 67. That means it tries to compute a humble 3.647111091818868e+94 permutations. 😅
To put it mildly, my CPU is now in therapy.
It would be great if there were some way to update the negative sampling or for example fix the maximum number of permutations for facts with an arity that is too big ?
def permutations(arr, position, end, res):
"""
Permutate the array
"""
if position == end:
res.append(tuple(arr))
else:
for index in range(position, end):
arr[index], arr[position] = arr[position], arr[index]
permutations(arr, position+1, end, res)
arr[index], arr[position] = arr[position], arr[index]
return resReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels