def plotErrs(df, scoreName="Error Rate", onlySharedDatasets=True): df = extractErrRates(df, onlySharedDatasets=onlySharedDatasets) print("------------------------") print("Err Rates:") print("------------------------") print(1 - df.mean(axis=1)) print(1 - df.mean(axis=0)) title = "%s for Different Classifiers" % scoreName plotDf(df, title=title)
def plotPvals(df, lowIsBetter=True): errs = extractErrRates(df) zvals, pvals = computeRankSumZvalsPvals(errs, lowIsBetter=lowIsBetter) # make a colormap that's red for p < 5% minVal = pvals.min().min() maxVal = pvals.max().max() cutoff = (np.log10(1.96) - minVal) / (maxVal - minVal) cmap = remappedColorMap(plt.cm.RdBu, midpoint=cutoff) plotDf(np.log10(pvals), title="Log10 Rank-Sum Test P Values", cmap=cmap)
def plotZvals(df, lowIsBetter=True): errs = extractErrRates(df) zvals, pvals = computeRankSumZvalsPvals(errs, lowIsBetter=lowIsBetter) plotDf(zvals, title="Rank-Sum Test Z Values", symmetricAboutMean=True)