Skip to content

Commit

Permalink
Fix denominator of mean abs error estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneymbell committed Feb 12, 2019
1 parent 8d29274 commit 6000ae0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fitness_model/antigenic_fitness.py
Expand Up @@ -267,7 +267,7 @@ def remove_nan(actual, predicted):
performance = {
'pearson_r2': stats.linregress(actual_growth, predicted_growth)[2]**2,
'spearman_r': stats.spearmanr(actual_growth, predicted_growth)[0],
'abs_error': sum([abs(a - p) for (a,p) in zip(actual_freq, predicted_freq)]) / float(len(actual_freq)),
'abs_error': sum([abs(a - p) for (a,p) in zip(actual_freq, predicted_freq)]) / float(len(predicted_freq)),
'accuracy': calc_accuracy(af),
'delta_sse': calc_delta_sse(af)}

Expand Down

0 comments on commit 6000ae0

Please sign in to comment.