Commit 8bb6a8ee authored by Yann Vote's avatar Yann Vote
Browse files

Merge remote-tracking branch 'origin/marc'

No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
...@@ -79,8 +79,8 @@ def get_samples_from_roi(in_rst_label,in_rst_roi,in_rst_stat ): ...@@ -79,8 +79,8 @@ def get_samples_from_roi(in_rst_label,in_rst_roi,in_rst_stat ):
col = LABEL.shape[1] col = LABEL.shape[1]
#Get the index of each sample in the non-flattened original array #Get the index of each sample in the non-flattened original array
indices = [np.empty(nb_samp),np.empty(nb_samp)] indices = [np.empty(nb_samp),np.empty(nb_samp)]
indices[0] = [l_ind // col]#the rows indices[0] = [l_ind // col] #the rows
indices[1] = [l_ind % col]#the columns indices[1] = [l_ind % col] #the columns
##set the Y array, ie taking the classes values of each sample ##set the Y array, ie taking the classes values of each sample
Y = ROI[indices].reshape((nb_samp,1)) Y = ROI[indices].reshape((nb_samp,1))
...@@ -237,7 +237,7 @@ def decision_tree(X_train, Y_train, X_test, X_img, reverse_array, raster, ...@@ -237,7 +237,7 @@ def decision_tree(X_train, Y_train, X_test, X_img, reverse_array, raster,
meta['count'] = None meta['count'] = None
write_file(out_filename, overwrite=True, array=classif, **meta) write_file(out_filename, overwrite=True, array=classif, **meta)
return y_predict return y_predict, clf
def pred_error_metrics(Y_predict, Y_test, target_names = None): def pred_error_metrics(Y_predict, Y_test, target_names = None):
"""This function calcul the main classification metrics and compute and """This function calcul the main classification metrics and compute and
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment