wekakt / com.github.stevenlang.wekakt.extensions / weka.core.Instances / filter
fun <T : Filter> Instances.filter(filter: T, body: T.() -> Unit = {}): Instances
Apply a given filter to this set of instances.
// Get data
val iris: Instances = getIris()
// Filter percentage
irisFiltered = iris.filter(RemovePercentage()) {
percentage = 20.0
invertSelection = true
}
filter - Filter instance
body - Filter function body
T - inheriting from Filter