This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python implementation of the Nadeau and Bengio correction of dependent Student's t-test | |
# using the equation stated in https://www.cs.waikato.ac.nz/~eibe/pubs/bouckaert_and_frank.pdf | |
from scipy.stats import t | |
from math import sqrt | |
from statistics import stdev | |
def corrected_dependent_ttest(data1, data2, n_training_samples, n_test_samples, alpha): | |
n = len(data1) | |
differences = [(data1[i]-data2[i]) for i in range(n)] |