msaf/input_output.py
def get_configuration(feature, annot_beats, framesync, boundaries_id,
                      labels_id):
    """Gets the configuration dictionary from the current parameters of the
    algorithms to be evaluated."""
    config = {}
    config["annot_beats"] = annot_beats
    config["feature"] = feature
    config["framesync"] = framesync
    bound_config = {}
    if boundaries_id != "gt":
        bound_config = \
            eval(msaf.algorithms.__name__ + "." + boundaries_id).config
        config.update(bound_config)
    if labels_id is not None:
        label_config = \
            eval(msaf.algorithms.__name__ + "." + labels_id).config

        # Make sure we don't have parameter name duplicates
        if labels_id != boundaries_id:
            overlap = set(bound_config.keys()). \
                intersection(set(label_config.keys()))
            assert len(overlap) == 0, \
                "Parameter %s must not exist both in %s and %s algorithms" % \
                (overlap, boundaries_id, labels_id)
        config.update(label_config)
    return config
def get_configuration(feature, annot_beats, framesync, boundaries_id,
                      labels_id):
    config = {}
    config["annot_beats"] = annot_beats
    config["feature"] = feature
    config["framesync"] = framesync
    bound_config = {}
    if boundaries_id != "gt":
        bound_config = \
            eval(msaf.algorithms.__name__ + "." + boundaries_id).config
        config.update(bound_config)
    if labels_id is not None:
        label_config = \
            eval(msaf.algorithms.__name__ + "." + labels_id).config

        # Make sure we don't have parameter name duplicates
        if labels_id != boundaries_id:
            overlap = set(bound_config.keys()). \
                intersection(set(label_config.keys()))
            assert len(overlap) == 0, \
                "Parameter %s must not exist both in %s and %s algorithms" % \
                (overlap, boundaries_id, labels_id)
        config.update(label_config)
    return config
def get_configuration ( feature , annot_beats , framesync , boundaries_id , labels_id ) : config = { } config [ "annot_beats" ] = annot_beats config [ "feature" ] = feature config [ "framesync" ] = framesync bound_config = { } if boundaries_id != "gt" : bound_config = eval ( msaf . algorithms . __name__ + "." + boundaries_id ) . config config . update ( bound_config ) if labels_id is not None : label_config = eval ( msaf . algorithms . __name__ + "." + labels_id ) . config # Make sure we don't have parameter name duplicates if labels_id != boundaries_id : overlap = set ( bound_config . keys ( ) ) . intersection ( set ( label_config . keys ( ) ) ) assert len ( overlap ) == 0 , "Parameter %s must not exist both in %s and %s algorithms" % ( overlap , boundaries_id , labels_id ) config . update ( label_config ) return config
Gets the configuration dictionary from the current parameters of the
    algorithms to be evaluated.
Gets the configuration dictionary from the current parameters of the algorithms to be evaluated .