Exemple #1
0
def run_randomforest(train_examples, train_labels, attributes, test_examples,
                     test_labels, n_trees):
    rforest = RandomForest(entropy, 2, n_trees, len(attributes))
    rforest.train_dataset(train_examples, attributes, train_labels)

    preds, error = rforest.test_dataset(test_examples, test_labels)

    return error