added an extra argument "output.as.table" which is FALSE by default: this returns a list
with named vectors (class-mtrics)
for fast access through referencing/subsetting a la
$. when the above
"output.as.table" = TRUE the dataframe with all the metrics is returned (except for
"accuracy" and "error.rate")