plt.draw() plt.savefig("docs/charts/logarithmic.svg") plt.clf() y_axis_data = [] for probability in probabilities: y_axis_data.append(practical_score(probability)) plt.plot(x_axis_data, y_axis_data) plt.xlabel("Probability assigned to correct answer") plt.ylabel("Practical score") plt.title("Practical score for probabilities 1 % - 99 %") plt.draw() plt.savefig("docs/charts/practical.svg") plt.clf() y_axis_data = [] for probability in probabilities: y_axis_data.append(quadratic_score(probability)) plt.plot(x_axis_data, y_axis_data) plt.xlabel("Probability assigned to correct answer") plt.ylabel("Quadratic score") plt.title("Quadratic score for probabilities 1 % - 99 %") plt.draw() plt.savefig("docs/charts/quadratic.svg")
def test_100_percent(self): assert quadratic_score(1) == 1
def test_80_percent(self): assert quadratic_score(0.80) == Decimal("0.92")
def test_50_percent(self): assert quadratic_score(0.50) == 0.5
def test_20_percent(self): assert quadratic_score(0.20) == Decimal("-0.28")
def test_0_percent(self): assert quadratic_score(0.0) == -1