/** * @fn Selector *Selector::initWithRule(Selector *self, const char *rule) * @memberof Selector */ static Selector *initWithRule(Selector *self, const char *rule) { self = (Selector *) super(Object, self, init); if (self) { self->rule = strtrim(rule); assert(self->rule); self->sequences = $$(SelectorSequence, parse, self->rule); assert(self->sequences->count); self->specificity = specificity(self); } return self; }
/// Return a map containing all metrics. StringMapDouble CoverMetrics::all() const { StringMapDouble m; m["tp"] = tp(); m["fp"] = fp(); m["tn"] = tn(); m["fn"] = fn(); m["precision"] = precision(); m["recall"] = recall(); m["f1score"] = f1score(); m["accuracy"] = accuracy(); m["fprate"] = fprate(); m["specificity"] = specificity(); m["fnrate"] = fnrate(); m["matthews"] = matthews(); return m; }
int specificity(){ // number of slashes in stype; a measure of the specificity return specificity(stype); }