Skip to content
DeepForgeby svx
All problems
EasyInformation Theoryinfo-265

Best Information Criterion

Problem

Given a dictionary mapping model names to information criterion values, return the name of the model with the smallest value. Break ties alphabetically by choosing the first name in sorted order.

Hint

Lower AIC or BIC means a better trade-off between fit and complexity.

Test cases

case 1
in: [{"A":100,"B":98}]
expected: "B"
case 2
in: [{"X":1,"Y":1}]
expected: "X"
case 3
in: [{"P":10,"Q":20,"R":5}]
expected: "R"
case 4
in: [{"M":3}]
expected: "M"
Starter codePython
def best_information_criterion(criteria):
    # Your code here
    pass

4 test cases · run your code against them in the editor