tre icon indicating copy to clipboard operation
tre copied to clipboard

for some versions of scipy, need a guard around `sig = scipy.stats.pearsonr([d[2] for d in datapoints], [d[3] for d in datapoints])`

Open hughperkins opened this issue 4 years ago • 0 comments

for some versions of scipy, need a guard around sig = scipy.stats.pearsonr([d[2] for d in datapoints], [d[3] for d in datapoints]) ... otherwise scipy throws an exception about need at least one point.

The following guard prevents this issue:

    if len(datapoints) > 1:
        sig = scipy.stats.pearsonr([d[2] for d in datapoints], [d[3] for d in datapoints])
        print(template % (i, train_acc, test_acc, train_acc - test_acc, comp, sig))

(Note: in comm.ipynb)

hughperkins avatar Apr 19 '21 18:04 hughperkins