"""Complete two component functions, then run the complete baseline experiment.

python3 test_stage00.py checks your functions, including unfamiliar values.
python3 starter.py --output my-report.json runs the integrated experiment.
Read README.md for the task and stage00.py only when you want the reference.
"""
import math
import stage00


def mean_nll(probabilities):
    # Validate nonempty finite probabilities in [0,1].
    # Zero target probability means infinite loss, not zero loss.
    # Use natural logs and average over ALL targets, not documents.
    raise NotImplementedError("Implement mean_nll in starter.py")


def conditional_probability(count, context_total, vocabulary_size, alpha):
    # Add-alpha smoothing: numerator count + alpha.
    # The denominator needs alpha for EVERY possible target.
    # Reject invalid counts, vocabulary sizes and nonpositive/nonfinite alpha.
    raise NotImplementedError("Implement conditional_probability in starter.py")


if __name__ == "__main__":
    stage00.main(mean_nll, conditional_probability)
