Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1024191 // f1_scoreRegexpIC - percent score on positive and negative examples

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2349L/15K).

static F1<S, Double> f1_scoreRegexpIC(Cl<S> plusExamples, Cl<S> minusExamples) {
  ret func(S regexp) -> double {
    new Scorer scorer;
    fOr (S s : plusExamples)
      scorer.add(regexpICFind(regexp, s));
    fOr (S s : minusExamples)
      scorer.add(!regexpICFind(regexp, s));
    ret scorer!;
  };
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024191
Snippet name: f1_scoreRegexpIC - percent score on positive and negative examples
Eternal ID of this version: #1024191/2
Text MD5: d5af6634b57e37b84db48c7814bc0541
Transpilation MD5: 9515841fd23e100594e968464768654f
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-24 21:15:57
Source code size: 315 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 227 / 324
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)