Java: adjust column names and metric formulas

This commit is contained in:
Jami Cogswell
2022-12-08 21:13:52 -05:00
parent 9e0027cf5b
commit 6248efd394

View File

@@ -68,28 +68,16 @@ float getNumApisWithoutMadModel(string package) {
) )
} }
// ! Note: adjust metric formulas as needed after more discussion with Yorck
/*
* metric1:
* Proportion of manual models covered by automation: “both” / (“both” + “manual-only”)
* Auto-generated vs all positive manual (percentage of manual models covered by auto-generation)
*/
/*
* metric2:
* Coverage relative to total number of APIs: (“auto-only” + “both” + “manual-only”) / “all”
* Auto-generated vs specific pos+neg subset (top-N manual, random)
*/
from from
string package, float generatedPos, float manualPos, float bothPos, float notModeled, float all, string package, float generatedOnly, float both, float manualOnly, float non, float all,
float metric1, float metric2 float generatedCoverage, float manualCoverage
where where
generatedPos = getNumMadModels(package, "generated") and generatedOnly = getNumMadModels(package, "generated") and
manualPos = getNumMadModels(package, "manual") and manualOnly = getNumMadModels(package, "manual") and
bothPos = getNumMadModels(package, "both") and both = getNumMadModels(package, "both") and
notModeled = getNumApisWithoutMadModel(package) and non = getNumApisWithoutMadModel(package) and // ! edit this
all = generatedPos + manualPos + bothPos + notModeled and all = generatedOnly + both + manualOnly + non and
metric1 = (bothPos / (bothPos + manualPos)) and // ! I believe this metric was intended to be only on the positive ones? generatedCoverage = (both / (both + manualOnly)) and // Proportion of manual models covered by generated ones
metric2 = (generatedPos + bothPos + manualPos) / all manualCoverage = (both / (both + generatedOnly)) // Proportion of generated models covered by manual ones
select package, generatedPos, manualPos, bothPos, notModeled, all, metric1, metric2 order by package select package, generatedOnly, both, manualOnly, non, all, generatedCoverage, manualCoverage
order by package