Skip to content

Instantly share code, notes, and snippets.

View kilian-gebhardt's full-sized avatar

Kilian Gebhardt kilian-gebhardt

View GitHub Profile
@kilian-gebhardt
kilian-gebhardt / sigf.py
Created October 15, 2019 10:18 — forked from dustalov/sigf.py
An implementation of the sigf toolkit for randomization tests in Python 3
#!/usr/bin/env python
# This is an MIT-licensed implementation of the sigf toolkit
# for randomization tests: https://nlpado.de/~sebastian/software/sigf.shtml
from random import getrandbits
import sys
def randomized_test(model1, model2, score, trials):
print('# score(model1) = %f' % score(model1), file=sys.stderr)