weka-kt

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

Extensions for weka.core.Instances

Name Summary
attributes val Instances.attributes: List<Attribute>
List of attributes.
classIndex var Instances.classIndex: Int
Class index.
filter fun <T : Filter> Instances.filter(filter: T, body: T.() -> Unit = {}): Instances
Apply a given filter to this set of instances.
get operator fun Instances.get(rowIndex: Int): Instance
Get the instance at index rowIndex.
operator fun Instances.get(rowIndex: Int, attributeIndex: Int): Double
Get the value at position (rowIndex,attributeIndex).
operator fun Instances.get(rowIndex: Int, attribute: Attribute): Double
Get the value at position (rowIndex,attribute).
operator fun Instances.get(rangeRows: IntRange, rangeAttributes: IntRange): Instances
Slice the given range of attributes out of the dataset.
isEqualTo fun Instances.isEqualTo(other: Any?): Boolean
Check if this instances is equal to another instances object.
numAttributes val Instances.numAttributes: Int
Number of attributes.
removeAttribute fun Instances.removeAttribute(attIndex: Int): Instances
Remove a given attribute by index.
removeClassAttribute fun Instances.removeClassAttribute(): Instances
Remove the class attribute of this dataset.
set operator fun Instances.set(rowIndex: Int, instance: Instance): Instance
Set the instance at position rowIndex.
operator fun Instances.set(rowIndex: Int, attributeIndex: Int, value: Number): Unit
Set the value at position (rowIndex,attributeIndex).
operator fun Instances.set(rowIndex: Int, attribute: Attribute, value: Number): Unit
Set the value at position (rowIndex,attribute).
operator fun Instances.set(rowIndex: Int, attributeIndex: Int, value: String): Unit
Set string value at position (rowIndex,attributeIndex).
operator fun Instances.set(rowIndex: Int, attribute: Attribute, value: String): Unit
Set string value at position (rowIndex,attribute).
slice fun Instances.slice(rangeRows: IntRange, rangeAttributes: IntRange): Instances
Slice the given range of attributes out of the dataset.
sliceAttributes fun Instances.sliceAttributes(range: IntRange): Instances
Slice the given range of attributes out of the dataset.
fun Instances.sliceAttributes(vararg indices: Int): Instances
Get the subset of attributes with the given indices.
sliceRows fun Instances.sliceRows(range: IntRange): Instances
Slice the given range of rows out of the dataset.
fun Instances.sliceRows(vararg indices: Int): Instances
Get the subset of rows with the given indices.
split fun Instances.split(testPercentage: Double): Pair<Instances, Instances>
Split this dataset into two separate sets with a given testPercentage.