Skip to content

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]) #2

@hughperkins

Description

@hughperkins

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions