<s> from disco . core import result_iterator <EOL> from discomll import dataset <EOL> from discomll . ensemble import distributed_random_forest <EOL> from discomll . utils import model_view <EOL> from discomll . utils import accuracy <EOL> train = dataset . Data ( data_tag = [ <EOL> [ "<STR_LIT>" ] ] , <EOL> id_index = <NUM_LIT:0> , <EOL> X_indices = xrange ( <NUM_LIT:1> , <NUM_LIT:10> ) , <EOL> X_meta = "<STR_LIT>" , <EOL> y_index = <NUM_LIT:10> , <EOL> delimiter = "<STR_LIT:U+002C>" ) <EOL> fit_model = distributed_random_forest . fit ( train , trees_per_chunk = <NUM_LIT:3> , max_tree_nodes = <NUM_LIT:50> , min_samples_leaf = <NUM_LIT:10> , <EOL> min_samples_split = <NUM_LIT:5> , class_majority = <NUM_LIT:1> , measure = "<STR_LIT>" , accuracy = <NUM_LIT:1> , <EOL> separate_max = True , random_state = None , save_results = True ) <EOL> print model_view . output_model ( fit_model ) <EOL> predictions = distributed_random_forest . predict ( train , fit_model ) <EOL> for k , v in result_iterator ( predictions ) : <EOL> print k , v <EOL> ca = accuracy . measure ( train , predictions ) <EOL> print ca </s>
