def evaluate_split(run_data, model_name, mixture, independent, instance_count, train_mask, test_mask):

    testing = run_data.masked(test_mask).collect_systematic([4])
    training_all = run_data.masked(train_mask)
    training_ids = sorted(training_all.ids, key = lambda _: numpy.random.rand())
    training_filtered = training_all.filter(*training_ids[:instance_count])

    if independent:
        training = training_filtered.collect_independent(mixture).only_nonempty()
    else:
        training = training_filtered.collect_systematic(mixture).only_nonempty()

    # build the model
    bins = 10
    estimators = {
        "mul_alpha=0.1": borg.models.MulEstimator(alpha = 2e-2),
        "mul-dir": borg.models.MulDirEstimator(),
        "mul-dirmix": borg.models.MulDirMixEstimator(K = 4),
        "mul-dirmatmix": borg.models.MulDirMatMixEstimator(K = 32),
        }
    model = estimators[model_name](training, bins, training_all)

    # evaluate the model
    logger.info("scoring model on %i instances", len(testing))

    score = numpy.mean(borg.models.run_data_log_probabilities(model, testing))

    logger.info(
        "score of model %s given %i runs from %i instances: %f",
        model_name,
        training.get_run_count(),
        len(training),
        score,
        )

    description = "{0} ({1})".format(mixture, "Sep." if independent else "Sys.")

    return [model_name, description, instance_count, score]
Invoke query_apply() with arguments as None
dataset/ETHPy150Open borg-project/borg/borg/experiments/ll_vs_train.py/evaluate_split--crossover with--dataset/ETHPy150Open aerospike/aerospike-client-python/test/old_tests/test_query_apply.py/TestQueryApply.test_query_apply_with_argument_is_none