Metric parity with Understand
Target: F1 1.000 for every metric. This page is the gap between
that and where the metrics stand. Generated by
scripts/compare/09_metric_f1.py; regenerate it after changing a
metric rather than editing the table.
Measured on the JSON fixture against Understand, over
1158 methods, constructors, classes, interfaces and packages
that both tools name identically. An entity/metric pair is a hit when
this project reports a value and it equals Understand's.
precision = hits / pairs this project answers
recall = hits / pairs Understand answers
100 long names are shared by overloads and are skipped: this project merges those into one entity and Understand does not, so a comparison keyed on the name says nothing.
| macro | micro | |
|---|---|---|
| F1 | 0.970 | 0.970 |
| F1 over pairs Understand answers | 0.971 | 0.972 |
The two rows used to be far apart, because Ent.metric() answered 0
for every entity while Understand answers only for the kinds a metric
is defined on -- which capped every class-level metric near 0.17
however right its values were. Ent.metrics() is scoped to the
entity's kind now, so the strict and the restricted score agree and
what is left is genuine disagreement about values.
| metric | F1 | F1 where Understand answers | precision | recall | hits | ours | und |
|---|---|---|---|---|---|---|---|
CCViolDensityCode |
1.000 | 1.000 | 1.00 | 1.00 | 1048 | 1048 | 1048 |
CCViolDensityLine |
1.000 | 1.000 | 1.00 | 1.00 | 1048 | 1048 | 1048 |
CountCCViol |
1.000 | 1.000 | 1.00 | 1.00 | 1048 | 1048 | 1048 |
CountCCViolType |
1.000 | 1.000 | 1.00 | 1.00 | 1048 | 1048 | 1048 |
CountClassBase |
1.000 | 1.000 | 1.00 | 1.00 | 106 | 106 | 106 |
CountClassDerived |
1.000 | 1.000 | 1.00 | 1.00 | 106 | 106 | 106 |
CountDeclClass |
1.000 | 1.000 | 1.00 | 1.00 | 4 | 4 | 4 |
CountDeclClassVariable |
1.000 | 1.000 | 1.00 | 1.00 | 110 | 110 | 110 |
CountDeclFile |
1.000 | 1.000 | 1.00 | 1.00 | 4 | 4 | 4 |
CountDeclInstanceVariable |
1.000 | 1.000 | 1.00 | 1.00 | 110 | 110 | 110 |
CountDeclMethod |
1.000 | 1.000 | 1.00 | 1.00 | 110 | 110 | 110 |
CountDeclMethodPrivate |
1.000 | 1.000 | 1.00 | 1.00 | 110 | 110 | 110 |
CountDeclMethodProtected |
1.000 | 1.000 | 1.00 | 1.00 | 110 | 110 | 110 |
MaxInheritanceTree |
1.000 | 1.000 | 1.00 | 1.00 | 106 | 106 | 106 |
Cyclomatic |
0.994 | 0.998 | 0.99 | 1.00 | 1038 | 1048 | 1040 |
CountLineBlank |
0.994 | 0.997 | 0.99 | 1.00 | 1147 | 1158 | 1150 |
MaxNesting |
0.994 | 0.997 | 0.99 | 1.00 | 1147 | 1158 | 1150 |
CyclomaticStrict |
0.993 | 0.997 | 0.99 | 1.00 | 1037 | 1048 | 1040 |
CountStmtDecl |
0.993 | 0.997 | 0.99 | 1.00 | 1146 | 1158 | 1150 |
Essential |
0.991 | 0.995 | 0.99 | 1.00 | 1035 | 1048 | 1040 |
CountSemicolon |
0.990 | 0.994 | 0.99 | 0.99 | 1143 | 1158 | 1150 |
CountPathLog |
0.987 | 0.990 | 0.98 | 0.99 | 1030 | 1048 | 1040 |
CyclomaticModified |
0.984 | 0.988 | 0.98 | 0.99 | 1027 | 1048 | 1040 |
CountLineComment |
0.983 | 0.986 | 0.98 | 0.99 | 1134 | 1158 | 1150 |
AvgCountLineBlank |
0.982 | 0.982 | 0.98 | 0.98 | 108 | 110 | 110 |
AvgEssential |
0.982 | 0.982 | 0.98 | 0.98 | 108 | 110 | 110 |
MaxCyclomatic |
0.982 | 0.982 | 0.98 | 0.98 | 108 | 110 | 110 |
MaxCyclomaticStrict |
0.982 | 0.982 | 0.98 | 0.98 | 108 | 110 | 110 |
MaxEssentialKnots |
0.969 | 0.973 | 0.97 | 0.97 | 1012 | 1048 | 1040 |
AvgCyclomatic |
0.973 | 0.973 | 0.97 | 0.97 | 107 | 110 | 110 |
AvgCyclomaticStrict |
0.973 | 0.973 | 0.97 | 0.97 | 107 | 110 | 110 |
MaxEssential |
0.973 | 0.973 | 0.97 | 0.97 | 107 | 110 | 110 |
MinEssentialKnots |
0.968 | 0.972 | 0.96 | 0.97 | 1011 | 1048 | 1040 |
CountClassCoupledModified |
0.972 | 0.972 | 0.97 | 0.97 | 103 | 106 | 106 |
CountPath |
0.966 | 0.969 | 0.96 | 0.97 | 1008 | 1048 | 1040 |
CountLineCode |
0.964 | 0.967 | 0.96 | 0.97 | 1112 | 1158 | 1150 |
RatioCommentToCode |
0.966 | 0.966 | 0.97 | 0.97 | 1119 | 1158 | 1158 |
AvgCountLineCode |
0.964 | 0.964 | 0.96 | 0.96 | 106 | 110 | 110 |
AvgCyclomaticModified |
0.964 | 0.964 | 0.96 | 0.96 | 106 | 110 | 110 |
SumCyclomatic |
0.960 | 0.960 | 0.96 | 0.96 | 1112 | 1158 | 1158 |
CountLineCodeDecl |
0.957 | 0.960 | 0.95 | 0.96 | 1104 | 1158 | 1150 |
SumCyclomaticStrict |
0.959 | 0.959 | 0.96 | 0.96 | 1110 | 1158 | 1158 |
SumEssential |
0.958 | 0.958 | 0.96 | 0.96 | 1109 | 1158 | 1158 |
AvgCountLineComment |
0.955 | 0.955 | 0.95 | 0.95 | 105 | 110 | 110 |
CountDeclMethodDefault |
0.955 | 0.955 | 0.95 | 0.95 | 105 | 110 | 110 |
CountDeclMethodPublic |
0.955 | 0.955 | 0.95 | 0.95 | 105 | 110 | 110 |
MaxCyclomaticModified |
0.955 | 0.955 | 0.95 | 0.95 | 105 | 110 | 110 |
CountLine |
0.948 | 0.951 | 0.94 | 0.95 | 1094 | 1158 | 1150 |
CountLineCodeExe |
0.945 | 0.948 | 0.94 | 0.95 | 1090 | 1158 | 1150 |
CountStmt |
0.944 | 0.947 | 0.94 | 0.95 | 1089 | 1158 | 1150 |
AvgCountLine |
0.945 | 0.945 | 0.95 | 0.95 | 104 | 110 | 110 |
CountDeclClassMethod |
0.945 | 0.945 | 0.95 | 0.95 | 104 | 110 | 110 |
CountDeclInstanceMethod |
0.945 | 0.945 | 0.95 | 0.95 | 104 | 110 | 110 |
SumCyclomaticModified |
0.945 | 0.945 | 0.94 | 0.94 | 1094 | 1158 | 1158 |
Knots |
0.941 | 0.944 | 0.94 | 0.94 | 982 | 1048 | 1040 |
CountDeclMethodAll |
0.943 | 0.943 | 0.94 | 0.94 | 100 | 106 | 106 |
CountInput |
0.935 | 0.938 | 0.93 | 0.94 | 976 | 1048 | 1040 |
CountStmtExe |
0.927 | 0.930 | 0.92 | 0.93 | 1070 | 1158 | 1150 |
CountOutput |
0.916 | 0.919 | 0.91 | 0.92 | 956 | 1048 | 1040 |
PercentLackOfCohesion |
0.912 | 0.912 | 0.91 | 0.91 | 93 | 102 | 102 |
PercentLackOfCohesionModified |
0.912 | 0.912 | 0.91 | 0.91 | 93 | 102 | 102 |
CountClassCoupled |
0.906 | 0.906 | 0.91 | 0.91 | 96 | 106 | 106 |
No Understand value on this fixture
F1 is undefined for these: Understand reports nothing to compare against, while this project answers for every entity.
CountDeclExecutableUnit-- answered for 0 entitiesCountDeclFunction-- answered for 0 entitiesCountDeclInstanceVariablePrivate-- answered for 0 entitiesCountDeclInstanceVariableProtected-- answered for 0 entitiesCountDeclInstanceVariablePublic-- answered for 0 entities