Generalizes X^2 test to use G value

This commit is contained in:
LSaldyt
2018-01-12 14:19:11 -07:00
parent aed399ef34
commit 0a0369f5e1
2 changed files with 53 additions and 68 deletions

View File

@ -5,7 +5,7 @@ import pickle
from pprint import pprint
from copycat import Problem
from copycat.statistics import cross_chi_squared, cross_chi_squared_table
from copycat.statistics import cross_table
def compare_sets():
pass
@ -18,9 +18,7 @@ def main(args):
pSet = pickle.load(infile)
branchProblemSets[filename] = pSet
problemSets.append((filename, pSet))
pprint(problemSets)
pprint(cross_chi_squared(problemSets))
crossTable = cross_chi_squared_table(problemSets)
crossTable = cross_table(problemSets)
key_sorted_items = lambda d : sorted(d.items(), key=lambda t:t[0])
tableItems = key_sorted_items(crossTable)