Commit 5b708ee3 authored by Christian Chapman-Bird's avatar Christian Chapman-Bird
Browse files

Fixed heatmap - log of the means != mean of the logs

parent 05c166a1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -203,14 +203,16 @@ def grid_heatmap_corner(dataframe, truth_column, pred_column, log=True, ratio=Fa

                    if ratio:
                        temp = preds/truths
                        temp = np.mean(temp)
                        if log:
                            temp = np.log10(temp)
                    else:
                        temp = preds - truths
                        temp = np.mean(temp)
                        if log:
                            temp = np.log10(abs(temp))

                    heatmap_here[k,l] = np.mean(temp)
                    heatmap_here[k,l] = temp
            plotmaps.append(heatmap_here)

    vmin = np.min([np.min(hmap) for hmap in plotmaps])