mceval
Description
This repository provides an evaluation scheme of multiple choice tests, based on the 'Receiver Operating Characteristic Area Under Curve (ROC AUC)'. Since a classic evaluation of 1 point for true positives and -1 point for false positives results in a skewed expectation value when guessing, the ROC AUC provides a measure to accurately calculate a score for guessing and better/worse performances. The evaluation takes multiple parameters into account, such as number of questions, number of answer possibilities per question, number of true answers, and weighting of questions. Wikipedia
Installation
Prerequisites
Install Python >=3.6
Installation via pip
pip install mceval
Usage
from mceval import MultipleChoiceEvaluator
def classic_example():
questions = 100
answer_possibilities_per_q = 4
true_answers = 200
mc = MultipleChoiceEvaluator(questions, answer_possibilities_per_q, true_answers)
true_positives = 100
false_positives = 50
score = mc.evaluate(true_positives, false_positives)
print(f"Classic Example Score: {score}")
grade, score = mc.grade(true_positives, false_positives)
print(f"Classic Example Grade: {grade}")
grade, score = mc.grade(true_positives, false_positives, grading_scheme=(0.95, 0.85, 0.75, 0.65))
print(f"Classic Example Grade (other scheme): {grade}")
def weighted_example():
questions = [60, 30]
answer_possibilities_per_q = 4
true_answers = [30, 15]
weights = [1, 2]
mc = MultipleChoiceEvaluator(questions, answer_possibilities_per_q, true_answers, weights=weights)
true_positives = [10, 5]
false_positives = [5, 6]
score = mc.evaluate(true_positives, false_positives)
print(f"Weighted Example Score: {score}")
def main():
classic_example()
weighted_example()
if __name__ == '__main__':
main()
Tests
To run the tests execute pytest.
Support
Regarding issues please feel free to contact me via zimmermannmax16@gmail.com
Contributing
Any contribution is welcome.
Authors and acknowledgment
Author: Max Zimmermann
License
This project is licensed under the EUPL (see file COPYING).
Metadata
Release files for mceval 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mceval-1.0.0.tar.gz | 10.1 kB | Without provenance | Details for mceval-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mceval-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mceval-1.0.0-py3-none-any.whl |
Total release size: 16.0 kB
Release files / mceval-1.0.0.tar.gz
| Download URL | mceval-1.0.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3d43cbd39f1420568c61c7ed6641d214103cc654a5f109c9f94438abe003abe
|
|
BLAKE2b-256 checksum How to use checksums |
aa419b1b91ad842337267e485c47f2005193508a1d030683f8fd3cad9542faa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|
Release files / mceval-1.0.0-py3-none-any.whl
| Download URL | mceval-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce59d1d1ae6b9b9e819c517f992e59b5d8746860359eca8a52a21e4f9c883e8f
|
|
BLAKE2b-256 checksum How to use checksums |
78d763c0888816eb7c43a6581a8a4f9b5a82d177a9e3ba0a5db5ca759c8df55d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|
Security for mceval 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.