weka-kt

wekakt / com.github.stevenlang.wekakt.extensions / weka.core.Instances / split

split

fun Instances.split(testPercentage: Double): Pair<Instances, Instances>

Split this dataset into two separate sets with a given testPercentage.

val iris: Instances = getIris()

// Split
val (train, test) = iris.split(testPercentage = 33.0)

Parameters

testPercentage - Test split percentage.