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
metaknowledge = .1 | |
cognition = .2 | |
time = 100 | |
steps_per_unit_time = 4 | |
for i in range(time * steps_per_unit_time): | |
if i % steps_per_unit_time == 0: | |
print("At t = %d, cognition is %.2f and metaknowledge is %.2f." % (i / steps_per_unit_time, cognition, metaknowledge)) | |
d_metaknowledge = .2 * metaknowledge * cognition | |
d_cognition = .2 * metaknowledge * cognition |
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
from scipy.stats.stats import pearsonr | |
import csv | |
def show_correlation(data, var1, var2): | |
has_both_vars = [line for line in data if line[var1] != ' ' and line[var2] != ' '] | |
r = pearsonr([float(line[var1]) for line in has_both_vars], [float(line[var2]) for line in has_both_vars])[0] | |
print('Correlation between "%s" and "%s": %.4f' % (var1, var2, r)) | |
print(' ') |
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
import csv | |
""" | |
0 First I heard of this hack | |
1 I feel I should try this hack, but have never actually tried it | |
2 I tried this hack with disappointing results | |
3 I tried this hack with good results, but it stopped working | |
4 I tried this hack with good results, and I don't use it consistently, though I'd like to | |
5 I tried this hack with good results, and now use it consistently | |
6 I don't think this hack is worth trying |