function compare_feats()
%% Training and Evaluating each path and feature type.
fprintf('Comparing features.\n');
[config, file_info, split_info] = config_compare_feats();

preprocess_depth(config, file_info);
compute_segments(config, file_info);

results = cell(config.n_splits, ...
               length(config.path_sets), ...
               length(config.feat_sets));

for split_ind = 1:config.n_splits
    config.split_name = [config.split_root '_' num2str(split_ind)];
    train_info = select_file_info(file_info, split_info == split_ind);
    test_info  = select_file_info(file_info, split_info ~= split_ind);

    compute_features(config, train_info, true);
    compute_features(config, test_info, false);

    for path_ind = 1:length(config.path_sets)
        for feat_ind = 1:length(config.feat_sets)
            feat_types = make_feat_set(config, path_ind, feat_ind);
            config.paths.model_results = ...
                fullfile(config.paths.results, 'compare_feats_results', ...
                         make_model_name(config, [], path_ind, feat_ind));

            model = train_models(config, train_info, feat_types);
            k_tau = evaluate_model(config, test_info, feat_types, model);
            results{split_ind, path_ind, feat_ind} = k_tau;
        end
    end
end

end
