mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-05-31 20:42:51 +00:00
Don't use test data if there is just one config
If classifier models cannot be compared, there is no reason to test.
This commit is contained in:
parent
2f9f981742
commit
c9bd57592b
@ -66,7 +66,8 @@ final class StanfordTextClassifier[F[_]: Sync: ContextShift](
|
||||
} yield res
|
||||
|
||||
def splitData(logger: Logger[F], in: RawData): F[TrainData] = {
|
||||
val nTest = (in.count * 0.15).toLong
|
||||
val f = if (cfg.classifierConfigs.size > 1) 0.15 else 0.0
|
||||
val nTest = (in.count * f).toLong
|
||||
|
||||
val td =
|
||||
TrainData(in.file.resolveSibling("train.txt"), in.file.resolveSibling("test.txt"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user