Add test for filtering (still failing)

This commit is contained in:
Filip Gralinski 2020-05-13 13:32:35 +02:00
parent 252493a776
commit 698b7a5db8
5 changed files with 18 additions and 0 deletions

View File

@ -135,6 +135,8 @@ main = hspec $ do
runGEvalTest "accuracy-probs" `shouldReturnAlmost` 0.4 runGEvalTest "accuracy-probs" `shouldReturnAlmost` 0.4
it "sorted" $ it "sorted" $
runGEvalTest "accuracy-on-sorted" `shouldReturnAlmost` 0.75 runGEvalTest "accuracy-on-sorted" `shouldReturnAlmost` 0.75
it "with filtering" $
runGEvalTest "accuracy-filtering" `shouldReturnAlmost` 1.0
describe "F-measure" $ do describe "F-measure" $ do
it "simple example" $ it "simple example" $
runGEvalTest "f-measure-simple" `shouldReturnAlmost` 0.57142857 runGEvalTest "f-measure-simple" `shouldReturnAlmost` 0.57142857

View File

@ -0,0 +1,5 @@
foo
foo
bar
bar
foo
1 foo
2 foo
3 bar
4 bar
5 foo

View File

@ -0,0 +1 @@
--metric Accuracy:f<in[2]:yep>

View File

@ -0,0 +1,5 @@
foo
bar
bar
bar
bar
1 foo
2 bar
3 bar
4 bar
5 bar

View File

@ -0,0 +1,5 @@
1 yep 111
1 nope 2323
3 yep 32323
2 yep 222
11 nope sdsds
1 1 yep 111
2 1 nope 2323
3 3 yep 32323
4 2 yep 222
5 11 nope sdsds