(data)
Get the distribution of the class variable(s).
Get the distribution of the class variable(s).
Get the distribution of the class variable ( s ) .
def class_distribution(data):
    """Get the distribution of the class variable(s)."""
    if data.domain.class_var:
        return get_distribution(data, data.domain.class_var)
    elif data.domain.class_vars:
        return [get_distribution(data, cls) for cls in data.domain.class_vars]
    else:
        raise ValueError("domain has no class attribute")
def class_distribution ( data ) : if data . domain . class_var : return get_distribution ( data , data . domain . class_var ) elif data . domain . class_vars : return [ get_distribution ( data , cls ) for cls in data . domain . class_vars ] else : raise ValueError ( "domain has no class attribute" )