iota2.validation.results_utils

utility functions for report generation

Functions

compute_interest_matrix(all_matrix[, f_interest])

from a list of confusion matrix compute the mean of each confusion

concatenate_sample_selection(result_folder, ...)

concatenates the csv files produces by sampleselection step result_folder: folder where output csv will be written nomenclature_path: file where labels nomenclature is defined outrates_path: path of the OTB generated outrates.csv files seed: number of the seed regions: set of region numbers labels_conversion: maps i2-encoded label to original label

fig_conf_mat(conf_mat_dic, nom_dict, kappa, ...)

usage : generate a figure representing the confusion matrix

gen_confusion_matrix_fig(csv_in, out_png, ...)

usage : from a csv file representing a confusion matrix generate the corresponding figure

get_coeff(matrix)

use to extract coefficients (Precision, Recall, F-Score, OA, K) from a confusion matrix.

get_color_table(color_file)

usage parse color file

get_conf_max(conf_mat_dic, nom_dict)

get confusion max by class

get_interest_coeff(runs_coeff, nb_lab[, ...])

use to compute mean coefficient and 95% confidence interval.

get_max_labels(conf_mat_dic, nom_dict)

return the maximum len of all labels

get_nomenclature(nom_path)

usage parse nomenclature file

get_region_and_seeds(path)

search path to find the regions and seeds of outrates files

get_rgb_mat(norm_conf, diag_cmap, not_diag_cmap)

usage convert normalise confusion matrix to a RGB image

get_rgb_pre(pre_val, coeff_cmap)

convert values to a RGB code thanks to a colormap

get_rgb_rec(coeff, coeff_cmap)

usage convert normalise confusion matrix to a RGB image

merge_all_sample_selection(output_path, ...)

searches for all existing sample selections csv files and for each seed, merges them in a single file output_path: output path root containing learningSamples folder and sampleSelections folders nomenclature_path: file where labels nomenclature is defined labels_conversion: maps i2-encoded label to original label

merge_class_matrix(conf_mat_dic, merge_class)

param conf_mat_dic

a confusion matrix (index represent row reference)

normalize_conf(conf_mat_array[, norm])

function use to normalize a numpy array representing a confusion matrix with ref as row and production in column

parse_csv(csv_in)

parse OTB's confusion matrix

remove_undecidedlabel(conf_mat_dic, ...)

usage : use to remove samples with the undecidedlabel label from the confusion matrix

stats_report(csv_in, nomenclature_path, ...)

usage : sum-up statistics in a txt file

Classes

OrderedDict

Dictionary that remembers insertion order