Skip to content

Instantly share code, notes, and snippets.

View dilaragokay's full-sized avatar
🎯
Focusing

Dilara Gokay dilaragokay

🎯
Focusing
View GitHub Profile
@oshea00
oshea00 / kabsch.py
Last active April 4, 2024 04:51
3D best-fit using Kabsch algorithm
import numpy as np
from math import sqrt
scaling = False
# Implements Kabsch algorithm - best fit.
# Supports scaling (umeyama)
# Compares well to SA results for the same data.
# Input:
# Nominal A Nx3 matrix of points
@jwcarr
jwcarr / vi.py
Last active May 26, 2023 15:24
Variation of information (VI)
# Variation of information (VI)
#
# Meila, M. (2007). Comparing clusterings-an information
# based distance. Journal of Multivariate Analysis, 98,
# 873-895. doi:10.1016/j.jmva.2006.11.013
#
# https://en.wikipedia.org/wiki/Variation_of_information
from math import log